Bug 8234 - Dates are not well sorted on Transfers to receive
Summary: Dates are not well sorted on Transfers to receive
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: 3.8
Hardware: All All
: P5 - low minor
Assignee: Adrien SAURAT
QA Contact: Paul Poulain
URL:
Keywords:
Depends on:
Blocks: 5345
  Show dependency treegraph
 
Reported: 2012-06-11 14:55 UTC by Sophie MEYNIEUX
Modified: 2013-12-05 20:01 UTC (History)
7 users (show)

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


Attachments
proposed patch (1.14 KB, patch)
2012-09-21 13:52 UTC, Adrien SAURAT
Details | Diff | Splinter Review
[Signed off] Bug 8234 - Dates are not well sorted on transfers to receive (1.20 KB, patch)
2012-10-12 17:27 UTC, Melia Meggs
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Sophie MEYNIEUX 2012-06-11 14:55:46 UTC
In "Transfers to receive" table, date are not well sorted. 
DataTable should be used as in other tt
Comment 1 Adrien SAURAT 2012-06-15 14:00:00 UTC
They are sorted, but with an UK date format.
Parameter :
 dateFormat: 'uk'

For the 10th of June, 2012, we have the following date in France:
10/06/2012

But the DataTable consider this to be
06/10/2012

This breaks the sorting for Koha installations using non UK-dates.
The problem could be present in other pages.
I still have to see how to correct this.
Comment 2 Adrien SAURAT 2012-06-15 14:08:40 UTC
But shouldn't this MM/DD/YY way of writing dates be the US format?

In fact, it looks like the case was supposed to be handled (there's a IF checking for metric format), but it doesn't work well.

$("#transferst[% branchesloo.branchcode %]").tablesorter({[% IF ( branchesloo.dateformat_metric ) %]
        dateFormat: 'uk',[% END %]
        sortList: [[0,0]],
        headers: { 1: { sorter: 'articles' }}
    });
Comment 3 Adrien SAURAT 2012-09-21 13:52:45 UTC Comment hidden (obsolete)
Comment 4 Melia Meggs 2012-10-12 17:16:34 UTC
Before applying the patch, with dateformat set to dd/mm/yyyy, the dates of transfer on my transfers to receive page were incorrectly organized like this:
03/11/2012 - this is Nov 3
09/09/2012 - this is Sept 9
12/09/2012 - this is Sept 12
12/10/2012 - this is Oct 12

After applying the patch, with dateformat set to dd/mm/yyyy, the dates of transfer on my transfers to receive page are correctly organized like this:
09/09/2012 - this is Sept 9
12/09/2012 - this is Sept 12
12/10/2012 - this is Oct 12
03/11/2012 - this is Nov 3

So it looks like this works!
Comment 5 Melia Meggs 2012-10-12 17:27:55 UTC
Created attachment 12797 [details] [review]
[Signed off] Bug 8234 - Dates are not well sorted on transfers to receive
Comment 6 Paul Poulain 2012-10-25 15:31:00 UTC
QA comment: one line patch

passed QA

I suspect there's something wrong with sorting when your syspref is iso, but it was already the case before this patch (untested, but we deal only dateformat_metric yes / no)
Comment 7 Paul Poulain 2012-10-25 15:33:34 UTC
Patch pushed to master

I just tested iso case (see my previous comment), it's OK, so forget the comment ;-)
Comment 8 Paul Poulain 2012-10-25 15:33:57 UTC
(it's not an ENH, but a minor bugfix)
Comment 9 Chris Cormack 2012-10-27 01:19:52 UTC
Pushed to 3.8.x will be in 3.8.7
Comment 10 Liz Rea 2012-11-19 02:16:21 UTC
Pushed to 3.6.x will be in 3.6.11.