Bug 124379 - Calc does not sort category formatted columns by multiple Sort Criteria
Summary: Calc does not sort category formatted columns by multiple Sort Criteria
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Sorting
  Show dependency treegraph
 
Reported: 2019-03-27 23:43 UTC by sam3232
Modified: 2023-09-08 03:20 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
spreadsheet of a route (33.00 KB, application/x-ole-storage)
2019-03-27 23:45 UTC, sam3232
Details
search for whitespaces (106.92 KB, image/png)
2019-03-30 17:11 UTC, Oliver Brinzing
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sam3232 2019-03-27 23:43:23 UTC
Description:
i highlight the entire file go to data, sort, then enter the parameters and the file does not get sorted properly

Steps to Reproduce:
1.go to data 
2.go to sort
3.enter parameters to sort by
4.hit ok 

Actual Results:
certain items refuse to sort even after reentering the data to ensure correctness

Expected Results:
certain items are left out of the sort process in every file every time


Reproducible: Always


User Profile Reset: No



Additional Info:
sorted the entire file
Comment 1 sam3232 2019-03-27 23:45:22 UTC
Created attachment 150333 [details]
spreadsheet of a route
Comment 2 Timur 2019-03-28 13:52:05 UTC
Please be specific, which exactly parameters you use and which items (rows?) refuse to sort.
Comment 3 sam3232 2019-03-28 16:20:16 UTC
i try to sort using columns F, D,then C
if you look at the bottom of the file you will see that not everything is being sorted
Comment 4 Oliver Brinzing 2019-03-28 18:19:31 UTC
Thank you for reporting the bug. 

Please add a detailed description how the bug can be reproduced, e.g.:

- select range: B1:G200
- Menu Data/Sort...
- ...

I have set the bug's status to 'NEEDINFO'. 
Please change it back to 'UNCONFIRMED' once the requested info is provided.
Comment 5 Timur 2019-03-29 10:23:29 UTC
If we just open attachment 150333 [details] and Data-Sort per D, it doesn't sort. It sorts only if all data cells are selected. Maybe because column D is formatted as Numbers.
Than even if we select all data and Data-Sort per F and D or C and D, D won't be sorted. Similar if we sort per F and C.
Seems like inherited from OO and up to master 6.3+. 
I'll confirm so far until better explanation or previous bug.
Comment 6 sam3232 2019-03-29 11:41:04 UTC
I  don't what else i can tell you these are the steps that i follow
1) i highlight the entire file
2) i select data
3) i select sort
4) i select column F
5) i select column D
6) i select column C
7) i select OK

after following these steps i have found that not every line item gets sorted
i have report this issue previously this has happened in several files that i work with
Comment 7 GerardF 2019-03-29 20:59:21 UTC
The sort works fine with data as they are...

Many cell contents in column D have trailing spaces.
Ctrl+H, search for write a space followed with $ then search all and you will see.
Comment 8 sam3232 2019-03-30 16:25:27 UTC
could you tell me exactly how to find the trailing spaces and how to correct them
as there are also cells in column C that are not sorting correctly
Comment 9 Oliver Brinzing 2019-03-30 17:11:43 UTC
Created attachment 150415 [details]
search for whitespaces

should be possible with search & replace dialog -> regular expressions
Comment 10 sam3232 2019-03-30 22:10:48 UTC
i did exactly what was said (search for whitespaces

should be possible with search & replace dialog -> regular expressions)
and I keep getting "search key not found" Could you tell me how to get rid of the trailing spaces please?
Comment 11 Oliver Brinzing 2019-03-31 06:42:12 UTC
(In reply to sam3232 from comment #10)
> i did exactly what was said (search for whitespaces
> should be possible with search & replace dialog -> regular expressions)
> and I keep getting "search key not found" Could you tell me how to get rid
> of the trailing spaces please?

- open attached spreadsheet "spreadsheet of a route"
- open search & replace dialog
- enter in "Find" field: " $" (a whitespace follwoed by a $)
- select [x] Regular expressions
- [Replace All]

will replace 109 occurrences
Comment 12 QA Administrators 2021-03-31 03:41:10 UTC Comment hidden (obsolete)
Comment 13 QA Administrators 2023-04-01 03:23:19 UTC Comment hidden (obsolete)
Comment 14 Kira Tubo 2023-09-08 03:20:30 UTC
Removing the trailing white spaces as suggested by Oliver in Comment 11 allowed the spreadsheet to sort correctly. I believe this is working as designed, so I will close this issue as NOTABUG. Feel free to reopen this issue otherwise. Thanks! 

Version: 7.6.0.3 (X86_64) / LibreOffice Community
Build ID: 69edd8b8ebc41d00b4de3915dc82f8f0fc3b6265
CPU threads: 6; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 9a37652b79001bf5208841b9221dee851b9b6d0f
CPU threads: 6; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded