Bug 72487 - EDITING: sorting columns
Summary: EDITING: sorting columns
Status: RESOLVED DUPLICATE of bug 81309
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.0.4.2 release
Hardware: Other Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-08 17:55 UTC by Joe Huard
Modified: 2014-10-28 09:13 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
a 10 row 2 column sort that works as expected (12.21 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-12-08 17:55 UTC, Joe Huard
Details
attachment-31361-0.html (3.72 KB, text/html)
2013-12-09 17:35 UTC, Joe Huard
Details
attachment-31361-1.dat (1 bytes, multipart/alternative)
2013-12-09 17:35 UTC, Joe Huard
Details
testsort1.ods (34.70 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-12-09 17:35 UTC, Joe Huard
Details
testsort2.ods (26.93 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-12-09 17:35 UTC, Joe Huard
Details
testsort1.ods Sorted in Google Sheets and Excel (198.44 KB, image/png)
2014-10-28 09:13 UTC, Luke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Huard 2013-12-08 17:55:13 UTC
Created attachment 90470 [details]
a 10 row 2 column sort that works as expected

Problem description: I try to sort 2 columns in a calc file called "Water Diary". It has the Date in column A and my Weight in column B.

Steps to reproduce:
1. ....Highlight 2 columns A & B through 1600 rows.
2. ....Click on Data, Sort
3. ....Use Column B to sort Descending; click OK.

Current behavior:It sorts Column B from high to low, but column A is sorted in ascending order and not matching the weights

Expected behavior:I wanted the weights to go in descending order with the date that it happened to be next to it. I tried this with just 2 columns and 10 rows of dates and weights on a new sheet, and it worked as expected.

              
Operating System: Windows 7
Version: 4.0.4.2 release
Comment 1 m_a_riosv 2013-12-08 23:17:13 UTC
Hi Joe, thanks for reporting.

I can't reproduce you issue with your file, sort fine for me.
Win7x64
Version 4.0.6.2 (Build ID: 2e2573268451a50806fcd60ae2d9fe01dd0ce24)

If you are sure both columns are selected, please try resetting the user profile, sometimes solves strange issues:
https://wiki.documentfoundation.org/UserProfile
Comment 2 Joe Huard 2013-12-09 03:34:18 UTC
How can you cancel a bug report so fast? You didn't ask for another 
file. The problem occurs on the file called Water Diary which I didn't 
send you. It is 1600 rows long.
If you tried that fucking file you would see my point, you dummy.
On 08/12/2013 6:17 PM, bugzilla-daemon@freedesktop.org wrote:
> mariosv <mailto:mariosv@miguelangel.mobi> changed bug 72487 
> <https://bugs.freedesktop.org/show_bug.cgi?id=72487>
> What 	Removed 	Added
> CC 		mariosv@miguelangel.mobi
>
> *Comment # 1 <https://bugs.freedesktop.org/show_bug.cgi?id=72487#c1> 
> on bug 72487 <https://bugs.freedesktop.org/show_bug.cgi?id=72487> from 
> mariosv <mailto:mariosv@miguelangel.mobi> *
> Hi Joe, thanks for reporting.
>
> I can't reproduce you issue with your file, sort fine for me.
> Win7x64
> Version 4.0.6.2 (Build ID: 2e2573268451a50806fcd60ae2d9fe01dd0ce24)
>
> If you are sure both columns are selected, please try resetting the user
> profile, sometimes solves strange issues:
> https://wiki.documentfoundation.org/UserProfile
> ------------------------------------------------------------------------
> You are receiving this mail because:
>
>   * You reported the bug.
>
Comment 3 GerardF 2013-12-09 08:16:49 UTC
(In reply to comment #2)
> How can you cancel a bug report so fast? You didn't ask for another 
> file. The problem occurs on the file called Water Diary which I didn't 
> send you. It is 1600 rows long.
> If you tried that fucking file you would see my point, you dummy.

We cannot try with a non-existing file...
Provide a file with the bug and/or give more information about this file and the way you sort.
Comment 4 m_a_riosv 2013-12-09 09:17:29 UTC
Hi Joe, I don't remember have cancelled the bug, why do you think so?, you can see the history modifications on the link top left.

comment#1, your sample file works fine for me.
Have you tried resetting user profile, as suggested?
Comment 5 Joe Huard 2013-12-09 16:28:17 UTC
Okay, I re-read your first reply, and I made a mistake thinking it was 
Removed, because I saw the word "Removed" in the top line.
So, I apologize for my behavior, I'm the dummy.

Joe
On 09/12/2013 4:17 AM, bugzilla-daemon@freedesktop.org wrote:
>
> *Comment # 4 <https://bugs.freedesktop.org/show_bug.cgi?id=72487#c4> 
> on bug 72487 <https://bugs.freedesktop.org/show_bug.cgi?id=72487> from 
> mariosv <mailto:mariosv@miguelangel.mobi> *
> Hi Joe, I don't remember have cancelled the bug, why do you think so?, you can
> see the history modifications on the link top left.
>
> comment#1  <show_bug.cgi?id=72487#c1>, your sample file works fine for me.
> Have you tried resetting user profile, as suggested?
> ------------------------------------------------------------------------
> You are receiving this mail because:
>
>   * You reported the bug.
>
Comment 6 Joe Huard 2013-12-09 17:35:40 UTC
Created attachment 90523 [details]
attachment-31361-0.html

I renamed the User folder to User-old. After restarting Libre Office 
Calc, the same problem exists.
I am attaching 2 files; testsort1 and testsort2. Testsort1 shows 2 
columns 1600 rows with dates and numbers. I sorted that in descending 
mode using the Wt. column, and the resulting mess is viewable in 
testsort2. The dates don't match the weights, and some more recent dates 
are missing and replaced by ###VALUE.
IE, the dates should NOT be all in order from past to more recent. They 
should be all mixed up. :-(

Joe
On 09/12/2013 3:16 AM, bugzilla-daemon@freedesktop.org wrote:
> GerardF <mailto:gerard.fargeot@orange.fr> changed bug 72487 
> <https://bugs.freedesktop.org/show_bug.cgi?id=72487>
> What 	Removed 	Added
> Status 	UNCONFIRMED 	NEEDINFO
> CC 		gerard.fargeot@orange.fr
> Ever confirmed 		1
>
> *Comment # 3 <https://bugs.freedesktop.org/show_bug.cgi?id=72487#c3> 
> on bug 72487 <https://bugs.freedesktop.org/show_bug.cgi?id=72487> from 
> GerardF <mailto:gerard.fargeot@orange.fr> *
> (In reply tocomment #2  <show_bug.cgi?id=72487#c2>)
> > How can you cancel a bug report so fast? You didn't ask for another
> > file. The problem occurs on the file called Water Diary which I didn't
> > send you. It is 1600 rows long.
> > If you tried that fucking file you would see my point, you dummy.
>
> We cannot try with a non-existing file...
> Provide a file with the bug and/or give more information about this file and
> the way you sort.
> ------------------------------------------------------------------------
> You are receiving this mail because:
>
>   * You reported the bug.
>
Comment 7 Joe Huard 2013-12-09 17:35:41 UTC
Created attachment 90524 [details]
attachment-31361-1.dat
Comment 8 Joe Huard 2013-12-09 17:35:41 UTC
Created attachment 90525 [details]
testsort1.ods
Comment 9 Joe Huard 2013-12-09 17:35:41 UTC
Created attachment 90526 [details]
testsort2.ods
Comment 10 m_a_riosv 2013-12-09 22:21:40 UTC
You are using a formula for dates, when sorting all dates are properly sorted, but they have relative formula so they always refer to the previous cell plus 1, the same after sort. And how the fixed date in A2 also change with the sort, in A2 you have a formula summing one to A1 what is a text, so can't be summed.

You can copy dates and with paste special paste their values without the formula, so you can sort without problem.

For me it is not a bug.
Please if you are not agree reopen it.
Comment 11 Joe Huard 2013-12-09 22:53:22 UTC
For me, I still think it is a bug. What you provided is a workaround.
Thanks though; I can work with that.

Joe
On 09/12/2013 5:21 PM, bugzilla-daemon@freedesktop.org wrote:
> mariosv <mailto:mariosv@miguelangel.mobi> changed bug 72487 
> <https://bugs.freedesktop.org/show_bug.cgi?id=72487>
> What 	Removed 	Added
> Status 	NEEDINFO 	RESOLVED
> Resolution 	--- 	NOTABUG
>
> *Comment # 10 <https://bugs.freedesktop.org/show_bug.cgi?id=72487#c10> 
> on bug 72487 <https://bugs.freedesktop.org/show_bug.cgi?id=72487> from 
> mariosv <mailto:mariosv@miguelangel.mobi> *
> You are using a formula for dates, when sorting all dates are properly sorted,
> but they have relative formula so they always refer to the previous cell plus
> 1, the same after sort. And how the fixed date in A2 also change with the sort,
> in A2 you have a formula summing one to A1 what is a text, so can't be summed.
>
> You can copy dates and with paste special paste their values without the
> formula, so you can sort without problem.
>
> For me it is not a bug.
> Please if you are not agree reopen it.
> ------------------------------------------------------------------------
> You are receiving this mail because:
>
>   * You reported the bug.
>
Comment 12 m_a_riosv 2013-12-09 23:09:17 UTC
Hi Joe not a work around, when you sort relative cells formulas, the cell formula is adapted to the new position.

If:
B14: =A14*2
and after a sort B14 is moved to B3 then:
B3: =A3*2
what is fine, because this retain the formula between cells in the row

if you don't want this change you need to have an absolute row reference.
B14: =A$14*2
and after a sort B14 is moved to B3 then:
B3: =A$14*2

I think maybe is easy, not use formulas, but fill down as you need dragging the date with the mouse.
Comment 13 Joe Huard 2013-12-09 23:42:05 UTC
I do drag the date down with the mouse. That is how I did it from the 
beginning.
Joe
On 09/12/2013 6:09 PM, bugzilla-daemon@freedesktop.org wrote:
>
> *Comment # 12 <https://bugs.freedesktop.org/show_bug.cgi?id=72487#c12> 
> on bug 72487 <https://bugs.freedesktop.org/show_bug.cgi?id=72487> from 
> mariosv <mailto:mariosv@miguelangel.mobi> *
> Hi Joe not a work around, when you sort relative cells formulas, the cell
> formula is adapted to the new position.
>
> If:
> B14: =A14*2
> and after a sort B14 is moved to B3 then:
> B3: =A3*2
> what is fine, because this retain the formula between cells in the row
>
> if you don't want this change you need to have an absolute row reference.
> B14: =A$14*2
> and after a sort B14 is moved to B3 then:
> B3: =A$14*2
>
> I think maybe is easy, not use formulas, but fill down as you need dragging the
> date with the mouse.
> ------------------------------------------------------------------------
> You are receiving this mail because:
>
>   * You reported the bug.
>
Comment 14 Jean-Baptiste Faure 2014-10-12 11:39:50 UTC
Your test file attachment 90525 [details] works as expected with version 4.3.4.0.0+ and the master (if you choose the right configuration option). It should work with version 4.3.2 too. Indeed it falls in the category solved by the fix for bug 81309.

I did not consider the test file testsort2.ods because the formula in the column A is broken, it is erroneously initialized by the value in A1 which is not a date. 

Best regards. JBF

*** This bug has been marked as a duplicate of bug 81309 ***
Comment 15 Luke 2014-10-28 09:13:14 UTC
Created attachment 108562 [details]
testsort1.ods Sorted in Google Sheets and Excel

testsort1.ods and testsort2 do not follow long established spreadsheet conventions. Giving a #REF error is not a bug as you can see by my attachment. To get the desired behavior, spreadsheets should have been created with absolute references. This report should have been marked invalid a long time ago.