Bug 18985 - SQL reports 'Last edit' and 'Last run' columns sort alphabetically, not chronologically
Summary: SQL reports 'Last edit' and 'Last run' columns sort alphabetically, not chron...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 14365
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-26 02:34 UTC by Nick Clemens (kidclamp)
Modified: 2018-06-04 20:10 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 18985 - SQL reports 'Last edit' and 'Last run' columns sort alphabetically, not chronologically (2.40 KB, patch)
2017-08-02 12:47 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 18985 - SQL reports 'Last edit' and 'Last run' columns sort alphabetically, not chronologically (2.54 KB, patch)
2017-08-04 14:09 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 18985 - SQL reports 'Last edit' and 'Last run' columns sort alphabetically, not chronologically (2.61 KB, patch)
2017-08-10 19:08 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2017-07-26 02:34:34 UTC
To recreate:
Edit and run some reports and then modify the last edited/run dates to be:
7/24/2017 12:12:12
7/25/2016 12:12:12
7/26/2017 12:12:12

Sort by each column and note they will sort in the order above instead of the expected:
7/25/2016 12:12:12
7/24/2017 12:12:12
7/26/2017 12:12:12
Comment 1 Marc Véron 2017-07-28 14:12:06 UTC
Do we have the same with other dates in data tables as well?
Comment 2 Owen Leonard 2017-08-02 12:47:11 UTC
Created attachment 65423 [details] [review]
Bug 18985 - SQL reports 'Last edit' and 'Last run' columns sort alphabetically, not chronologically

This patch alters the DataTables configuration of the SQL reports list
so that date columns are identified via class rather than position.

To test, apply the patch and go to Reports -> Use saved.

Test the re-ordering of the creation date, last edit, and last run
columns. Each should sort correctly based on the date.
Comment 3 Marc Véron 2017-08-04 13:58:08 UTC
(In reply to Marc Véron from comment #1)
> Do we have the same with other dates in data tables as well?

Virtual shelves results (lists) have a 'Date added' column that is not sortable.
Comment 4 Marc Véron 2017-08-04 14:09:58 UTC
Created attachment 65500 [details] [review]
Bug 18985 - SQL reports 'Last edit' and 'Last run' columns sort alphabetically, not chronologically

This patch alters the DataTables configuration of the SQL reports list
so that date columns are identified via class rather than position.

To test, apply the patch and go to Reports -> Use saved.

Test the re-ordering of the creation date, last edit, and last run
columns. Each should sort correctly based on the date.

Signed-off-by: Marc Véron <veron@veron.ch>
Comment 5 Jonathan Druart 2017-08-10 19:08:39 UTC
Created attachment 65849 [details] [review]
Bug 18985 - SQL reports 'Last edit' and 'Last run' columns sort alphabetically, not chronologically

This patch alters the DataTables configuration of the SQL reports list
so that date columns are identified via class rather than position.

To test, apply the patch and go to Reports -> Use saved.

Test the re-ordering of the creation date, last edit, and last run
columns. Each should sort correctly based on the date.

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Jonathan Druart 2017-08-10 19:31:00 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 7 Fridolin Somers 2017-09-29 09:54:39 UTC
Pushed to 17.05.x, will be in 17.05.05.
Comment 8 Katrin Fischer 2017-10-01 21:41:46 UTC
There is no 'Last Run' in 16.11.x as this is a 17.05 feature. Also no 'Last edit'.