Bug 124012 - EDITING Pivot table row field sort direction is not applied
Summary: EDITING Pivot table row field sort direction is not applied
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Pivot-Table
  Show dependency treegraph
 
Reported: 2019-03-12 07:56 UTC by Gabor Kelemen
Modified: 2019-04-11 20:16 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Calc with pivot table (8.94 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-03-12 07:56 UTC, Gabor Kelemen
Details
Screenshot of the problem in Calc (78.22 KB, image/png)
2019-03-12 07:56 UTC, Gabor Kelemen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen 2019-03-12 07:56:07 UTC
Created attachment 149902 [details]
Example file from Calc with pivot table

When creating a pivot table and trying to change the data field sort order, the order is not changed unless a different sort criteria is selected too.


Steps to reproduce:
    1. Create a simple data table, 3x3 in Calc
    2. Select all the data and create a pivot table from it
    3. Set two columns (Year and Sales in my example) of the three as Row Fields in the Pivot Table Layout Window and the third as Data Fields
    4. Double click on the first row field (Year in my example). The Data Field window opens.
    5. Click Options in the Data Field window
    6. Next to the Sort by dropdown, select Descending instead of the default Ascending. Do not select the Manual option, that one seems to work :).
    7. Close the Data Field Options window by clicking OK and the Data Field window too.
    8. Reopen the Data Field and Data Field Options window. Notice that the sorting order is still Ascending, despite the former selection.
    9. Now in the Sort by dropdown select a different option (Sum – Expenses in my example) and select the Descending option.
    10. Close the Data Field Options window by clicking OK and the Data Field window too.
    11. Reopen the Data Field and Data Field Options window. Notice that the sorting order is now changed to Descending.


Actual results:
The sort order is not changed from Ascending to Descending (or vice versa) without changing the row field used for sorting.

Expected results:
The sort order should be changed without changing the row field used for sorting.

LibreOffice details:
Version: 6.3.0.0.alpha0+
Build ID: 65438bcda46bab4f2fe6fb555f44aace45e11e5e
CPU threads: 4; OS: Windows 6.3; UI render: GL; VCL: win; 
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: threaded

Also happens with:
Verzió: 5.4.0.3
Build az.: 92c2794a7c181ba4c1c5053618179937228ed1fb
CPU szálak: 4; OS: Windows 6.2; Felületmegjelenítés: GL; 
Területi beállítások: hu-HU (hu_HU); Calc: CL

Verzió: 4.4.7.2
Build az.: f3153a8b245191196a4b6b9abd1d0da16eead600
Területi beállítások: hu_HU

Verzió: 4.2.0.4
Build az.: 05dceb5d363845f2cf968344d7adab8dcfb2ba71

But not with:
Verzió: 4.1.0.4
Build az.: 89ea49ddacd9aa532507cbf852f2bb22b1ace28

Verzió: 4.0.0.3 (Build az.: 7545bee9c2a0782548772a21bc84a9dcc583b89)

LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735
Comment 1 Gabor Kelemen 2019-03-12 07:56:57 UTC
Created attachment 149903 [details]
Screenshot of the problem in Calc
Comment 2 Durgapriyanka 2019-03-12 18:52:04 UTC
Thank you for reporting the bug. I can confirm the bug present 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 3 Buovjaga 2019-04-11 20:16:39 UTC
Bibisected with win32-4.3 to https://gerrit.libreoffice.org/plugins/gitiles/core/+/7e491281d2ba71490fa22cce1e43ba91f60395e3^!/
fdo#69984: Handle duplicate field names correctly.

Had to skip a few commits, but luckily it did not matter.