Bug 292951 - sort by due date wrong
Summary: sort by due date wrong
Status: RESOLVED FIXED
Alias: None
Product: zanshin
Classification: Applications
Component: general (show other bugs)
Version: 0.2
Platform: Ubuntu Linux
: NOR normal
Target Milestone: already done
Assignee: Kevin Ottens
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-31 10:41 UTC by Matthias Kretz
Modified: 2012-02-03 15:30 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
screenshot that shows the problem (16.07 KB, image/png)
2012-01-31 10:41 UTC, Matthias Kretz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Kretz 2012-01-31 10:41:41 UTC
Created attachment 68367 [details]
screenshot that shows the problem

Version:           unspecified (using KDE 4.8.0) 
OS:                Linux

Sorting the tasks by "Due Date" doesn't work correctly. It certainly changes the sort order, but it's not in the correct order.

Reproducible: Always

Steps to Reproduce:
* add some actions to a project
* assign due dates to the actions
* click on the "Due Date" column header to set the sorting order

Actual Results:  
Tasks are ordered as
Feb 1, Jan 31, Feb 7, Feb 6

Expected Results:  
Tasks should be ordered chronologically:
Jan 31, Feb 1, Feb 6, Feb 7

OS: Linux (x86_64) release 3.0.0-15-generic
Compiler: gcc
Comment 1 Matthias Kretz 2012-02-03 15:30:35 UTC
Git commit 4135a9d4f9f8e4a67dd3deb348fbebfbdb8e888a by Matthias Kretz.
Committed on 01/02/2012 at 18:03.
Pushed by mkretz into branch 'master'.

fix sorting by due date

Since this method returned a QString instead of a QDate the sorting was
according to the textual date representation. So, basically Fri, Mon,
Sat, Sun, Thu, Tue, Wed. This must return a QDate to function properly.
Formatting the QDate for display must be done in the Delegate.

M  +1    -1    src/todomodel.cpp

http://commits.kde.org/zanshin/4135a9d4f9f8e4a67dd3deb348fbebfbdb8e888a