| Summary: | UK format dates not sorting correctly | ||
|---|---|---|---|
| Product: | Koha | Reporter: | David Roberts <david.roberts> |
| Component: | Staff interface | Assignee: | Bugs List <koha-bugs> |
| Status: | RESOLVED DUPLICATE | QA Contact: | Testopia <testopia> |
| Severity: | normal | ||
| Priority: | P5 - low | CC: | gmcharlt, raymund.delahunty |
| Version: | 16.05 | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
| Attachments: | Screenshot showing UK date sorting problem | ||
My favorite method of avoiding date parsing nightmares when sorting is to use the "title-string" option for DataTables.
\koha-tmpl\intranet-tmpl\prog\en\modules\admin\currency.tt:
30 "columnDefs": [
31 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
32: { "sType": "title-string", "aTargets" : [ "title-string" ] }
33 ],
34 }, columns_settings );
..
208 <th>Symbol</th>
209 <th>ISO code</th>
210: <th class="title-string">Last updated</th>
211 <th>Active</th>
212 <th>Archived</th>
..
223 <td><span title="[% currency.timestamp %]">[% currency.timestamp | $KohaDates %]</span></td>
I don't know if that solution would work with the checkouts table.
|
Created attachment 61956 [details] Screenshot showing UK date sorting problem When you view a user with a large number of checkouts, and you sort the checkouts by date issued, if the system uses UK date format (DD/MM/YYYY) the sorting doesn't working correctly - for example, you might see: 02/02/2017 03/03/2017 08/02/2017 10/01/2017 16/12/2016 instead of the correct order, which would be: 16/12/2016 10/01/2017 02/02/2017 08/02/2017 03/03/2017 See attached screenshot for a real example.