Bug 123202 - EDITING Sorting of the filtered data is incorrect
Summary: EDITING Sorting of the filtered data is incorrect
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: medium normal
Assignee: Tünde Tóth
URL:
Whiteboard: target:7.2.0 target:7.1.2
Keywords:
: 97969 (view as bug list)
Depends on:
Blocks: AutoFilter
  Show dependency treegraph
 
Reported: 2019-02-06 08:20 UTC by NISZ LibreOffice Team
Modified: 2024-03-25 13:36 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
sample.ods (9.78 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-02-06 08:21 UTC, NISZ LibreOffice Team
Details
Edited sample.ods. (9.23 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-02-06 08:26 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2019-02-06 08:20:41 UTC
Description:
Sorting of the filtered data is incorrect when we select Data→Sort/Sort Ascending/Sort Descending. (This is correct when we select Sort Ascending/Sort Descending in the AutoFilter popup window.)

Steps to Reproduce:
    1. Open the attached sample.ods spreadsheet in LibreOffice Calc.
    2. Select the A1 and B1 cells and click Data→AutoFilter.
    3. Click on the AutoFilter popup menu button in B1 cell.
    4. In the AutoFilter window select text1 item and deselect text2 and text3 items.
    5. Click on the OK button.
    6. Select the A2:B11 cells and click Data→Sort Descending.


Actual Results:
column1	column2
10	text1
6	text3
4	text2
1	text1

Expected Results:
column1	column2
10	text1
7	text1
5	text1
1	text1


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 NISZ LibreOffice Team 2019-02-06 08:21:57 UTC
Created attachment 148942 [details]
sample.ods
Comment 2 NISZ LibreOffice Team 2019-02-06 08:26:12 UTC
Created attachment 148943 [details]
Edited sample.ods.
Comment 3 Durgapriyanka 2019-02-06 17:34:26 UTC
Thank you for reporting the bug. I can confirm the bug in

Version: 6.3.0.0.alpha0+
Build ID: b6b28931435e44aca92b8c0e1659f701e3ed1a87
CPU threads: 2; OS: Windows 6.1; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2019-01-30_06:57:04
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
Comment 4 Commit Notification 2021-02-15 14:12:55 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8f4dda644d1ed08ef846b5d09ead365236c57952

tdf#123202 calc: fix sorting of autofiltered rows

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2021-02-15 19:23:48 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/e51f4419645305037af92d051b7ca40d77da4678

tdf#123202 calc: fix sorting of autofiltered rows

It will be available in 7.1.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 NISZ LibreOffice Team 2021-03-10 12:43:54 UTC
Verified in:

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 72841008bf422dfd8553240b3a78f0474d03523c
CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: threaded Jumbo
Comment 7 Timur 2021-09-23 15:24:49 UTC
*** Bug 97969 has been marked as a duplicate of this bug. ***