Bug 145242 - EDITING: In Calc, Data->Sort should allow separate Custom Sort Orders for all Sort Keys
Summary: EDITING: In Calc, Data->Sort should allow separate Custom Sort Orders for all...
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.2.1.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsUXEval
Depends on:
Blocks:
 
Reported: 2021-10-20 15:52 UTC by irrevdjohn
Modified: 2023-05-16 11:25 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description irrevdjohn 2021-10-20 15:52:54 UTC
Description:
A complex data sort may require different Custom Sort Orders to be applied to Sort Keys 1, 2, and 3. Currently this is not possible.

Actual Results:
At present Calc sorts all keys according to one custom sort list, when specified in Data->Sort->Options. Values not found in the custom sort list are appended to the rest in default order.

Expected Results:
e.g. I need to custom sort on Sort Key 1, and sub-sort Sort Key 2 with another custom sort, both custom lists being previously defined in Preferences->Libre Office Calc->Sort Lists. 


Reproducible: Always


User Profile Reset: No



Additional Info:
As a further enhancement, might it be possible to do a sort based on a list defined by a range in the .ods itself? This would obviate the need to define a one-off sort list globally in Libre Office->Preferences.
Comment 1 Buovjaga 2023-03-02 14:17:10 UTC
I could add this to the user experience design team's agenda. First, it would be good if you provided some concrete example.

Help page for reference:
https://help.libreoffice.org/latest/en-US/text/shared/optionen/01060400.html
Comment 2 irrevdjohn 2023-04-13 17:32:20 UTC
When I was trying to use multiple custom sorts, it was frustrating that ascending/descending could be set separately for each sort key column under the Sort Criteria tab, but that the Options tab assigned global criteria.

Thus, a custom sort order could be used, but it would only work for one column, e.g. Mon,Tue,Wed,Thu,Fri,Sat,Sun. Another column with its own distinct sort order, e.g. county districts in geographical order, could not be sorted efficiently in the same process.

I suppose a result might possibly be achieved by concatenating all the custom sorts into one long list, i.e. days of the week followed by districts, and applying the mega list globally, but I have not tried this.
Comment 3 Heiko Tietze 2023-04-14 07:43:21 UTC
You can sort ascending or descending for any key. 

unsorted		Asc	Asc	Asc	Des	Des	Asc	Des	Des
A	B		A	B	A	B	A	B	A	B
1	A		1	A	1	Z	4	A	4	Z
1	Z		1	Z	1	A	4	Z	4	A
3	Z		2	A	2	Z	3	A	3	Z
3	A	"=>"	2	Z	2	A	3	Z	3	A
2	A		3	A	3	Z	2	A	2	Z
2	Z		3	Z	3	A	2	Z	2	A
4	Z		4	A	4	Z	1	A	1	Z
4	A		4	Z	4	A	1	Z	1	A

What is missing?

(Besides a version number on your report; please copy/paste from the About dialog.)
Comment 4 ady 2023-04-14 08:34:19 UTC
(In reply to Heiko Tietze from comment #3)
> You can sort ascending or descending for any key. 
> What is missing?

In the "Sort" dialog, there is one tab for "Sort Criteria", and a second tab for "Options". IIUC, the request seems to be to have the possibility to set different "Options" for each "Sort Key" within "Sort Criteria", instead of the current setting of "Options", which currently applies to all sort keys as a whole.

IOW, request for "Options" per "Sort Key".
Comment 5 Heiko Tietze 2023-05-16 11:25:46 UTC
Options per sort key in terms of case sensitivity or natural sort are presumably not what is needed. And would bloat the search for no good reason.

Resolving ISD as OP did not reply.