Bug 142145 - UI - Sort suppresses the first output data row when there are multiple heading lines and the sort is done on a column with concatenated headings
Summary: UI - Sort suppresses the first output data row when there are multiple headin...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.0.4.2 release
Hardware: x86-64 (AMD64) macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 142146 (view as bug list)
Depends on:
Blocks: Sorting
  Show dependency treegraph
 
Reported: 2021-05-07 08:24 UTC by Raymond Smith
Modified: 2023-04-06 17:11 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
output file sorted correctly after sort on a column without concatenated headings (572.07 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-05-07 08:24 UTC, Raymond Smith
Details
output file sorted incorrectly after sort on a column with concatenated headings (570.69 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-05-09 17:57 UTC, Raymond Smith
Details
1 - LibreOffice spreadsheet with 3-line headings - before sort (569.98 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-05-09 18:00 UTC, Raymond Smith
Details
input file described in the comments of June 17 (27.26 KB, application/octet-stream)
2021-06-17 12:49 UTC, Raymond Smith
Details
output file from new test - sorted incorrectly on column I (27.51 KB, application/octet-stream)
2021-06-17 12:52 UTC, Raymond Smith
Details
Output file from new test sorted correctly on column J (28.27 KB, application/octet-stream)
2021-06-17 12:53 UTC, Raymond Smith
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Raymond Smith 2021-05-07 08:24:58 UTC
Created attachment 171733 [details]
output file sorted correctly after sort on a column without concatenated headings

When sorting files with multiple heading lines (attached fille 1), the first output row is incorrectly SUPPRESSED from the output sorted file if the sort is done on a column with concatenated heading lines (column W in the attached file 1) - see attached output file 2 where line 5 in the input file has been suppressed. 

The sort works correctly if the sort is done on a column with the full number of heading lines (column Y in the attached file 1) - see attached output file 3.

In this case there were 3 input heading lines, but the problem is the same with files with 2 heading lines when sorting on columns with concatenated headings.
Comment 1 Julien Nabet 2021-05-09 15:14:49 UTC
*** Bug 142146 has been marked as a duplicate of this bug. ***
Comment 2 Raymond Smith 2021-05-09 17:57:57 UTC
Created attachment 171802 [details]
output file sorted incorrectly after sort on a column with concatenated headings
Comment 3 Raymond Smith 2021-05-09 18:00:32 UTC
Created attachment 171803 [details]
1 - LibreOffice spreadsheet with 3-line headings - before sort
Comment 4 Raymond Smith 2021-06-13 10:32:03 UTC
surely this is not all that minor a problem, when LO loses a key record when sorting this type of file. Shouldn't someone be investigating?
Comment 5 Raymond Smith 2021-06-13 10:35:40 UTC
Surely this isn't all that minor a problem, if LO effectively loses a key record when sorting files of this type. Shouldn't someone be investigating?
Comment 6 psidiumcode 2021-06-16 18:38:34 UTC
Hi Raymond Smith, 

Can you detail the steps you used to sort the table?
Comment 7 Raymond Smith 2021-06-17 12:43:49 UTC
I used the following procedure with the input file (attached file 1) :
Verify the print-range settings:
- Print range: $A1:$K107
- Rows to repeat: $1:$2
- Columns to repeat: none

Select all (click on top left-hand cell)

Select Data->Sort

Select Options, and then select:
- case sensitive
- range contains column headings
- Direction: Top to bottom (sort rows)

Select Sort Criteria, and then specify:
- Sort Key 1: PREVIOUS 7-DAY AVERAGE ▲ (column I)
  => Descending
- Sort Key 2: COUNTRY (column F) 
=> Ascending
The output file, incorrectly sorted, is attached (file 2)

When following the above procedure with Sort Key column J , the result is correct (file 3)
Comment 8 Raymond Smith 2021-06-17 12:49:37 UTC
Created attachment 172969 [details]
input file described in the comments of June 17

Input file to new test
Comment 9 Raymond Smith 2021-06-17 12:52:13 UTC
Created attachment 172970 [details]
output file from new test - sorted incorrectly on column I

output file from new test - sorted incorrectly on column I
Comment 10 Raymond Smith 2021-06-17 12:53:53 UTC
Created attachment 172971 [details]
Output file from new test sorted correctly on column J

Output file from new test sorted correctly on column J
Comment 11 psidiumcode 2021-06-17 15:27:40 UTC
I could reproduce it with the attachments and also in a new Calc document.
The missing values from the columns seem to be "behind" the merged headings.

Version: 7.0.6.2
Build ID: 144abb84a525d8e30c9dbbefa69cbbf2d8d4ae3b
CPU threads: 12; OS: Mac OS X 10.15.7; UI render: default; VCL: osx
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded

Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: de7356c2e0cb099fac396808b5a86a0393b48e5f
CPU threads: 12; OS: Mac OS X 10.15.7; UI render: default; VCL: osx
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded
Comment 12 Raymond Smith 2021-06-25 07:57:53 UTC
For info: the sort doesn't work under Excel either (on either columns I or J) - it returns an error message in both cases declaring that my headings are unacceptable (!).

At least LO sorts correctly on column J...
Comment 13 Raymond Smith 2022-03-01 17:41:57 UTC
Hello, is there any outlook for getting this bug fixed?