Bug 101183 - Hierarchical sorting of groups
Summary: Hierarchical sorting of groups
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 enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-Enhancements Group&Outline
  Show dependency treegraph
 
Reported: 2016-07-28 23:42 UTC by David F Smith
Modified: 2018-05-23 21:37 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:42 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:42:08 UTC
Created attachment 126456 [details]
Spreadsheet with three groups in column A.

Bug report 101182 describes a problem in which the group association of cells in a column is scrambled when the column is sorted.

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 individually into alphabetical order regardless of group, but the rows in each group remain unchanged.  

I would like to see group information used during the sort, such that subgroup items are sorted within each group, while the groups are sorted (and remain together) based on the sorting of the group heads.

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

So the groups would appear in order (Bird, Cat, Dog) after the sort, and within each group, the sub-items would also be in order (Chickadee, Nuthatch, Robin, Woodpecker, and so on).

I just completed a task for a friend, the alphabetizing of a book index with both main and sub-entries.  Hierarchical sorting in a spreadsheet, as proposed here, would have made that task much, much easier.
Comment 1 Buovjaga 2016-08-09 13:20:29 UTC
Ok, setting to NEW.