Bug 13525 - Date sorting on accounts (fines) tab doesn't work correctly
Summary: Date sorting on accounts (fines) tab doesn't work correctly
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-06 21:34 UTC by Katrin Fischer
Modified: 2015-12-03 22:02 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 13525 - Date sorting on accounts (fines) tab doesn't work correctly (3.29 KB, patch)
2015-01-07 13:31 UTC, Owen Leonard
Details | Diff | Splinter Review
wrongly sorted dates in accountlines (12.50 KB, image/png)
2015-01-13 06:58 UTC, Katrin Fischer
Details
[PASSED QA] Bug 13525 - Date sorting on accounts (fines) tab doesn't work correctly (3.39 KB, patch)
2015-01-19 06:26 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 13525 - Date sorting on accounts (fines) tab doesn't work correctly (3.44 KB, patch)
2015-01-19 12:52 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 Katrin Fischer 2015-01-06 21:34:55 UTC
The date sorting in the new datatable on the first 'fines' tab in the patron account is off and not working correctly.
Comment 1 Owen Leonard 2015-01-07 13:31:05 UTC Comment hidden (obsolete)
Comment 2 the.invinnysible.one 2015-01-13 00:53:34 UTC
We all tryed to recreate the bug but were unable to replicate it.
Comment 3 Katrin Fischer 2015-01-13 06:58:19 UTC
Created attachment 35137 [details]
wrongly sorted dates in accountlines

Thx for testing! It's easier to see when you have a lot of different dates and change the dateformat system preference to "dd/mm/yyyy".
Comment 4 Katrin Fischer 2015-01-19 06:26:02 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2015-01-19 12:52:05 UTC
Created attachment 35377 [details] [review]
Bug 13525 - Date sorting on accounts (fines) tab doesn't work correctly

Date sorting of charges under Patron -> Fines -> Account is done based
on formatted dates, so sorting is broken depending on your dateformat
system preference. This patch implements the standard "title-string"
date sorting method.

To test, apply the patch and view the Account tab. Test sorting of
charges under various settings of the dateformat system preference. Date
sorting should work correctly in all cases.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described and fixes sorting problem.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 6 Jonathan Druart 2015-01-19 12:54:02 UTC
I must note I was not able to reproduce the issue, even with dd/mm/yyyy, I got:
15/07/2013
11/06/2014
20/08/2014
19/01/2015

I can confirm this patch introduces the correct way to sort dates with datatables and I did not find any regression.

Marked as Passed QA
Comment 7 Tomás Cohen Arazi 2015-01-21 14:39:44 UTC
Patch pushed to master.

Thanks Owen!
Comment 8 Chris Cormack 2015-02-02 08:59:45 UTC
Pushed to 3.18.x will be in 3.18.4