Summary: | Dates are not well sorted on Transfers to receive | ||
---|---|---|---|
Product: | Koha | Reporter: | Sophie MEYNIEUX <sophie.meynieux> |
Component: | Circulation | Assignee: | Adrien SAURAT <adrien.saurat> |
Status: | CLOSED FIXED | QA Contact: | Paul Poulain <paul.poulain> |
Severity: | minor | ||
Priority: | P5 - low | CC: | adrien.saurat, chris, gmcharlt, kyle.m.hall, liz, melia, paul.poulain |
Version: | 3.8 | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Bug Depends on: | |||
Bug Blocks: | 5345 | ||
Attachments: |
proposed patch
[Signed off] Bug 8234 - Dates are not well sorted on transfers to receive |
Description
Sophie MEYNIEUX
2012-06-11 14:55:46 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. 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' }} }); Created attachment 12432 [details] [review] proposed patch TEST PLAN : 1) As dateformat (in sysprefs) you have to chose the metric system (dd/mm/yyyy). 2) Prepare several transfers from one library to another. 3) Change the dates of these tranfers (table "branchtransfers"), you especially have to create a possible confusion between days and months. 4) Display the "Transfers to receive page". The sort doesn't work properly as dates are treated like "MM/DD/YYYY" dates. Once the patch is applied, the metric system format is handled ok. 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! Created attachment 12797 [details] [review] [Signed off] Bug 8234 - Dates are not well sorted on transfers to receive 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) Patch pushed to master I just tested iso case (see my previous comment), it's OK, so forget the comment ;-) (it's not an ENH, but a minor bugfix) Pushed to 3.8.x will be in 3.8.7 Pushed to 3.6.x will be in 3.6.11. |