Bug 266223 - Cannot reliably sort rows with some empty cells
Summary: Cannot reliably sort rows with some empty cells
Status: RESOLVED FIXED
Alias: None
Product: calligrasheets
Classification: Applications
Component: general (show other bugs)
Version: 2.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Calligra Sheets (KSpread) Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-13 20:14 UTC by Vincent Poinot
Modified: 2011-08-24 08:53 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
To reproduce the bug (3.63 KB, application/octet-stream)
2011-02-13 20:14 UTC, Vincent Poinot
Details
First attempt, sorry the test are failing and I need help with this test. (4.87 KB, patch)
2011-04-03 18:17 UTC, Juan Aquino
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Poinot 2011-02-13 20:14:58 UTC
Created attachment 57221 [details]
To reproduce the bug

Version:           2.2 (using KDE 4.6.0) 
OS:                Linux

Given a spreadsheet with a couple of rows and two columns A and B. Let's say you want to sort against column A; further assume that some cells in column B are empty.
Then sorting the spreadsheet will make a mess of values in column B.

Reproducible: Always

Steps to Reproduce:
1) With the following spreadsheet:
A   1
C
B   3

2) Select the area A1 to B3
3) Select option Data / Sort...
4) Make sure that "Sort data grouped in rows vertically"
5) Click OK


Actual Results:  
The result is:

A   1
B   3
C   3

Which is obviously wrong

Expected Results:  
Result shoud be:
A   1
B
C   3

Note that I tested this in version 2.3.1, which is not selectable in the bug report.
Comment 1 Juan Aquino 2011-04-03 18:17:11 UTC
Created attachment 58546 [details]
First attempt, sorry the test are failing and I need help with this test.
Comment 2 Vincent Poinot 2011-04-03 20:24:40 UTC
Hi Juan,

Are you saying that you cannot reproduce the problem? If so, this is surprising because I have just retried with the sample ods file I attached to the bug, and the behaviour is clearly wrong here...

I did made a mistake in the bug description, though: of course the result should be:
A 1
B 3
C
Comment 3 Juan Aquino 2011-04-03 21:48:14 UTC
Its reproducible, the patch fix the problem, my problem is to create a unit test... please test the path and comment..thx
Comment 4 Juan Aquino 2011-06-19 13:47:42 UTC
Test my patch, please, please...and help me with the unit test, 

thx Boud for remembering the bugs with patches.
Comment 5 Vincent Poinot 2011-06-20 20:40:50 UTC
Juan, are you asking me to test your patch ?
I am sorry, but I cannot do that: I don't have a KDE dev environment, and cannot compile KOffice...

I still hope you will be able to release your fix soon.
Comment 6 Halla Rempt 2011-06-21 13:37:16 UTC
I can confirm that the bug is fixed by the patch. I don't know about the unittest. Marijn -- can you look at the unittest?
Comment 7 Sebastian Sauer 2011-08-24 08:52:56 UTC
Patch applied with 43e285d3. Tons of thanks to Juan Aquino. Amazing work! :-)
Comment 8 Sebastian Sauer 2011-08-24 08:53:20 UTC
btw see also https://git.reviewboard.kde.org/r/102411/