Issue 101653 - Sorting a table does not work properly
Summary: Sorting a table does not work properly
Status: CLOSED DUPLICATE of issue 101690
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: OOO310m9
Hardware: Other Windows Vista
: P2 Trivial (vote)
Target Milestone: ---
Assignee: spreadsheet
QA Contact: issues@sc
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-07 18:20 UTC by phildetroy
Modified: 2009-05-12 11:28 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
calc sheet to test Data / Sort broken in OOo3.1, used to work in 1.x~3.0.1 (38.17 KB, application/vnd.oasis.opendocument.spreadsheet)
2009-05-12 09:50 UTC, ped
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description phildetroy 2009-05-07 18:20:53 UTC
Misfunction in new OOO 3.1 with an XLS file created by excel and previously
edited with OOO 3.0
The table is wide (53 columns, most with formulas and 500 lines).  I use to
select the relevant columns and sort with option "range includes column labels".

Formulas are no longer updated properly according to new line position
=IF(AC28>0;ROUND($Coeff.$B$19*(101-1000*LOG(AC28/$Coeff.$D$19));0);0) remains
AC28 when line is sorted to line 2, should become AC2
Comment 1 jbf.faure 2009-05-10 08:48:33 UTC
Please could you attach a document which shows the problem ?

regards
JBF
Comment 2 ped 2009-05-12 09:50:58 UTC
Created attachment 62190 [details]
calc sheet to test Data / Sort broken in OOo3.1, used to work in 1.x~3.0.1
Comment 3 ped 2009-05-12 09:51:42 UTC
Me too, did work since OOo 1.x till OOo3.0.1, broken in OOo3.1.

Steps to reproduce it on attached file:

- move cursor somewhere into the names of tracks (column B, first sheet TRACKS),
for example at last line with "Yas Marina" which is unsorted.

- Alt+D, S (Data / Sort)
 * calc will auto select relevant data range (ok) and ask for sort criteria (ok)

- 1) choose sort by Column B (alphabetical sort by track names)
 * the "Yas Marina" will be moved to correct place at line 174, but accompanied
lap length is wrong, it is calculated by formula
"=VLOOKUP(B177;ALLtracks.$C$3:$G$300;5;0)" which should be
"=VLOOKUP(B174;ALLtracks.$C$3:$G$300;5;0)".
 Basically all formulas accompanied with moved names are moved into new sort
order, but they are not updated to reflect new line numbers. With correct
behaviour they should either not move at all and just recalculation of them is
needed, or if their target cell (name) moves, it should be updated inside
formula too.

- 2) choose sort by Column C (by lap length)
 * The final order of track names and data in columns D..I are correct, but
formulas in column B are again broken and giving wrong results, not reflecting
movement of the name cell.


Attached file was created in OOo1.x, never edited in anything else then OOo,
only converted to ODS with OOo2.x, the function always did work as expected till
OOo3.1 hitting me hard, for me this is critical regression.
Comment 4 niklas.nebel 2009-05-12 11:28:01 UTC
Duplicate of 101690.

*** This issue has been marked as a duplicate of 101690 ***
Comment 5 niklas.nebel 2009-05-12 11:28:38 UTC
closing duplicate