Bug 101182 - Sort destroys group information
Summary: Sort destroys group information
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.0.5.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Group&Outline
  Show dependency treegraph
 
Reported: 2016-07-28 23:24 UTC by David F Smith
Modified: 2023-04-16 23:59 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Spreadsheet with three groups in column A. (10.11 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-07-28 23:24 UTC, David F Smith
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David F Smith 2016-07-28 23:24:15 UTC
Created attachment 126455 [details]
Spreadsheet with three groups in column A.

The attached spreadsheet, Grouped Animals.ods, contains a single column with three groups: Bird (with group items Robin, Chickadee, Nuthatch, and Woodpecker), Dog (with group items Spaniel, Poodle, Retriever, and Chihuahua), and Cat (with group items Persian, Siamese, and Manx).  When I sort the column, the items are sorted into alphabetical order regardless of group, but the rows in each group remain unchanged.  That is, the first group is still defined as rows 3-6, the second as rows 8-11, and the third as rows 13-15, even though those no longer make sense.

Before sort:        After sort:
   Animals            Animals
   Bird               Bird
 |-Robin            |-Cat
 | Chickadee        | Chickadee
 | Nuthatch         | Chihuahua
 |-Woodpecker       |-Dog
   Dog                Manx
 |-Spaniel          |-Nuthatch
 | Poodle           | Persian
 | Retriever        | Poodle
 |-Chihuahua        |-Retriever
   Cat                Robin
 |-Persian          |-Siamese
 | Siamese          | Spaniel
 |-Manx             |-Woodpecker

So before the sort, the group headings are Bird, Dog, and Cat; after the sort, the headings are Bird, Manx, and Robin.

I will submit a separate enhancement request for this situation, but at the very least, the Sort should refuse to act on a grouped column (or row) if doing so will destroy the group associations.

(To duplicate the behavior, open the attached Grouped animals.ods spreadsheet, select a cell in column A, and choose Data > Sort.  The Sort Options should have "Range contains column labels" checked, and the Sort Key should be Animals.)
Comment 1 David F Smith 2016-07-28 23:43:13 UTC
Bug 101183 (Hierarchical sorting of groups) is my enhancement request for this situation.
Comment 2 Buovjaga 2016-08-09 13:18:31 UTC
Confirmed.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.2.0.4
Build ID: 5.2.0-1
CPU Threads: 8; OS Version: Linux 4.6; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8)
Comment 3 QA Administrators 2017-09-01 11:20:44 UTC Comment hidden (obsolete)
Comment 4 David F Smith 2017-09-01 15:26:25 UTC Comment hidden (obsolete)
Comment 5 QA Administrators 2019-03-28 04:20:24 UTC Comment hidden (obsolete)
Comment 6 David F Smith 2019-04-15 15:47:49 UTC
This bug is still present in LibreOffice 6.2.2.2 under Windows 10 Pro (10.0.17134).
There are no changes from the originally reported behavior.


Version: 6.2.2.2 (x64)
Build ID: 2b840030fec2aae0fd2658d8d4f9548af4e3518d
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
Comment 7 QA Administrators 2021-04-15 03:42:56 UTC Comment hidden (obsolete)
Comment 8 David F Smith 2021-04-15 12:22:47 UTC
This bug is still present in LibreOffice v7.0.5.2 under Windows 10 Pro.
There are no changes from the originally reported behavior.

Version: 7.0.5.2 (x64)
Build ID: 64390860c6cd0aca4beafafcfd84613dd9dfb63a
CPU threads: 4; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 9 QA Administrators 2023-04-16 03:24:38 UTC Comment hidden (obsolete)
Comment 10 David F Smith 2023-04-16 23:59:55 UTC
This bug is still present in LibreOffice v7.4.6.2 under Windows 10 Pro.
There are no changes from the originally reported behavior.

Version: 7.4.6.2 (x64) / LibreOffice Community
Build ID: 5b1f5509c2decdade7fda905e3e1429a67acd63d
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded