Description: If you have a spreadsheet that you frequently sort with headers in the first row, your sorting criteria is preserved every time you invoke Data | Sort. But if you reorder the columns by dragging them with the Alt key pressed, Calc will ignore that fact and still use the columns by their order in the spreadsheet. Example: you have a spreadsheet with columns ID (A), Description (B), Date (C), Cost (D), Manufacturer (E), and invoke Data | Sort to get them ordered first by Date, then by Manufacturer, and then by Cost. Every time you invoke Data | Sort, you'll have these columns preselected. But if you then reorder the columns, so that they become for example Manufacturer (A), Date (B), Cost (C), ID (D), and Description (E), the next time you invoke Data | Sort your preselected columns will be Cost, then Description, then ID. This is kiiind of technically correct but it's in no way what the user expects, so I consider it a bug. Steps to Reproduce: See description. Actual Results: See description. Expected Results: See description. Reproducible: Always User Profile Reset: No Additional Info: [Information automatically included from LibreOffice] Locale: en-US Module: SpreadsheetDocument [Information guessed from browser] OS: Windows (All) OS is 64bit: no
Created attachment 171604 [details] Sample spreadsheet showing the bug This has been marked as "unconfirmed" so I'm attaching a sample file to illustrate. Sort by the Date Column by using Data | Sort. Then, click on the Date column header (C) to highlight it, and drag it to the right of the Cost column while pressing the Alt key so that the two columns switch positions. Now invoke Data | Sort again. Calc will offer you to sort by Cost, which is now column C. I consider this a bug because if Calc is smart enough to recognize the column header, it should be smart enough to know that this column is not the same as before, and you STILL want to sort by date, not cost.
Any news on this? Still happens in LibreOffice 7.2.
Reasonable enhancement request to also switch the sort criteria after exchanging columns. Should be the same for rows if the sorting has been done "left to right". To some extend I can follow the bug evaluation as the sort dialog falsely indicates the sorting. (In reply to Nadie Nada Nunca from comment #2) > Any news on this? Sorry for the delay, QA tries the best to give at least feedback on tickets. You did everything to describe the problem as best as possible. Next is to find volunteers to work on the issue.