Bug 148293 - Sorting columns with AutoFilter moves the AutoFilter button
Summary: Sorting columns with AutoFilter moves the AutoFilter button
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.3.6.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: AutoFilter Sorting
  Show dependency treegraph
 
Reported: 2022-03-31 14:55 UTC by Aron Budea
Modified: 2023-11-14 07:57 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample ODS with filter (8.65 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-03-31 14:55 UTC, Aron Budea
Details
Screencast (676.33 KB, video/mp4)
2022-04-01 23:39 UTC, Aron Budea
Details
Video showing the problem (115.36 KB, video/mp4)
2022-06-10 18:26 UTC, Rafael Lima
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2022-03-31 14:55:08 UTC
Created attachment 179237 [details]
Sample ODS with filter

When an autofiltered range is sorted using Sort Ascending / Sort Descending, the following discrepancies happen:
- the filter icon moves along with the first item to its sorted place,
- if the first is a header item, it is included in the sort, while it shouldn't be.

See the attached sample with a simple autofilter, where the first item, "4" in A1 is a header in one sheet, and not in the other.
Expectation when sorting:
- when "4" is a header item, it should stay in A1, and the filter as well,
- when "4" is data, it should be sorted, the filter should stay in A1,
- when "4" is data and sort in the filter popup is used, the filter should stay in A1.

When "4" is a header item and sort in the filter popup is used, both the item and the filter stays in A1 as expected, unlike the above three cases.

For reference, Excel keeps the filter in its original place when sorting.
Whether first element is kept in place depends on if one only selects the autofilter area, or the whole column, but I also haven't seen header/data distinction in Excel, first element is header by default (perhaps there's a special way to set it as data).
Comment 1 m_a_riosv 2022-04-01 23:08:22 UTC
Works for me.
Version: 7.2.6.2 (x64) / LibreOffice Community
Build ID: b0ec3a565991f7569a5a7f5d24fed7f52653d754
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL
Comment 2 Aron Budea 2022-04-01 23:38:24 UTC
(In reply to Aron Budea from comment #0)
> When an autofiltered range is sorted using Sort Ascending / Sort Descending,
> the following discrepancies happen:
My bad, I wasn't clear, I meant the Sort Ascending / Sort Descending toolbar buttons, not the similar autofilter functions in the first two cases (and the functions in the dropdown in the other two).

Let me attach a screencast, out of the 4 cases only the last works as expected.

On a sidenote, if I show the 1st case by sorting using the toolbar buttons, undo it, and then do the 4th case using the filter dropdown, it behaves differently (badly).
Comment 3 Aron Budea 2022-04-01 23:39:08 UTC
Created attachment 179262 [details]
Screencast
Comment 4 Rafael Lima 2022-06-10 18:26:43 UTC
Created attachment 180670 [details]
Video showing the problem

Repro with LO 7.4 alpha

Version: 7.4.0.0.alpha1+ / LibreOffice Community
Build ID: 118bafcfd1ce4a26ec9df912197ebd466d1bd497
CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: CL

I attached a video showing how to reproduce the bug. First create an AutoFilter and then try to sort using the toolbar.

I'm setting this to NEW.

As a sidenote, notice that the Down arrow stays on top of the "4" value in my video, which is another bug.
Comment 5 Stéphane Guillou (stragu) 2022-08-29 16:57:41 UTC
Still as shown in attachment 179262 [details] in:

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 24087697d5cf78aac346d4dcea0596373e15a95c
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

And same thing in:

Version: 6.3.6.2
Build ID: 2196df99b074d8a661f4036fca8fa0cbfa33a497
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3; 
Locale: en-AU (en_AU.UTF-8); UI-Language: en-US
Calc: threaded
Comment 6 Andreas Heinisch 2023-11-13 21:02:55 UTC
This seems to be fixed in:
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 0b8fd4aa900ac1e6102f4b2581cabbb1b81a7b13
CPU threads: 6; OS: Windows 10.0 Build 19045; UI render: default; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: CL threaded
Comment 7 Aron Budea 2023-11-14 02:12:11 UTC
Unfortunately I can see no improvement, are you sure you tested the three problem cases from the description?

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c60a9db1f2a8e2a088c6b89bcdff4901b28f2864
CPU threads: 16; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 8 Andreas Heinisch 2023-11-14 07:57:14 UTC
Thank you for your testing. I missed the second tab where there is no heading.