Bug 101183

Summary: Hierarchical sorting of groups
Product: LibreOffice Reporter: David F Smith <davidjudysmith>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: enhancement CC: ilmari.lauhakangas
Priority: medium    
Version: 5.0.5.2 release   
Hardware: x86-64 (AMD64)   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 107977, 116661    
Attachments: Spreadsheet with three groups in column A.

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.