[Bug 32503] New: waitingreserves: UK format dates not sorting correctly
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 Bug ID: 32503 Summary: waitingreserves: UK format dates not sorting correctly Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Dates in the waiting reserves page are not sorting correctly when UK dates are used. When you view the waiting reserves page with a large number of resereves, and you sort them by 'Waiting since' or 'Date hold placed', 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 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 Ray Delahunty <r.delahunty@arts.ac.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |r.delahunty@arts.ac.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|waitingreserves: UK format |Holds awaiting pickup |dates not sorting correctly |doesn't sort dates | |correctly -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |katrin.fischer@bsz-bw.de |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 144884 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144884&action=edit Bug 32503: Fix date sorting for holds awaiting pickup tables This patch is a little experimental, but seems to do the trick. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |oleonard@myacpl.org Status|ASSIGNED |NEW --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Usually this works: https://wiki.koha-community.org/wiki/DataTables_HowTo#Sorting_dates_regardle... But this was already implemented here: <td><span data-order="[% reserveloo.waitingdate | html %]">[% reserveloo.waitingdate | $KohaDates %]</span></td> <td><span data-order="[% reserveloo.reservedate | html %]">[% reserveloo.reservedate | $KohaDates %]</span></td> <td><span data-order="[% reserveloo.expirationdate | html %]">[% reserveloo.expirationdate | $KohaDates %]</span></td> And the source shows, it looks like we want it to: <td><span data-order="2022-12-28">28/12/2022</span></td> <td><span data-order="2022-12-28">28/12/2022</span></td> <td><span data-order="2023-03-03">03/03/2023</span></td> But... the sorting doesn't work. So I googled.... and came up with this: <th data-type="@data-sort"></th> which seems to do the trick. But as we use data-order a lot and this might affect other pages where this worked before, it definitely needs more investigation/someone more knowledgeable about datatables to have a look here. Tested 3 holds with the following dates: 02/02/2017 03/03/2017 08/02/2017 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|katrin.fischer@bsz-bw.de |koha-bugs@lists.koha-commun | |ity.org -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144884|0 |1 is obsolete| | --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 144885 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144885&action=edit Bug 32503: Fix date sorting for holds awaiting pickup tables This patch is a little experimental, but seems to do the trick. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 144886 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144886&action=edit Bug 32503: (follow-up) Move data-order attributes It looks like the data-order attributes were at the wrong level to me, i.e. not part of the 'td' but instead part of the cell content. This patch moves those data-order attributes where possible and drops the data-type definitions on the headers. However, for the cancellation case, this isn't as clear cut as we may well display more than one cancellation request date in the same cell. For this case I've left Katrins data-type="@data-order" trick. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- My Google foo is weak today.. where did you find the suggestion to use `data-type="@data-sort"` Katrin? I think I spotted the issue with most of the sorting and have removed the data-type definition stuff.. but the cancellation date is more challenging. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144885|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 144980 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144980&action=edit Bug 32503: Fix date sorting for holds awaiting pickup tables This patch is a little experimental, but seems to do the trick. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144886|0 |1 is obsolete| | --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 144981 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144981&action=edit Bug 32503: (follow-up) Move data-order attributes It looks like the data-order attributes were at the wrong level to me, i.e. not part of the 'td' but instead part of the cell content. This patch moves those data-order attributes where possible and drops the data-type definitions on the headers. However, for the cancellation case, this isn't as clear cut as we may well display more than one cancellation request date in the same cell. For this case I've left Katrins data-type="@data-order" trick. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 144982 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144982&action=edit Bug 32503: Use first cancellation for date ordering -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144980|0 |1 is obsolete| | --- Comment #9 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 145051 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145051&action=edit Bug 32503: Fix date sorting for holds awaiting pickup tables This patch is a little experimental, but seems to do the trick. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144981|0 |1 is obsolete| | --- Comment #10 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 145052 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145052&action=edit Bug 32503: (follow-up) Move data-order attributes It looks like the data-order attributes were at the wrong level to me, i.e. not part of the 'td' but instead part of the cell content. This patch moves those data-order attributes where possible and drops the data-type definitions on the headers. However, for the cancellation case, this isn't as clear cut as we may well display more than one cancellation request date in the same cell. For this case I've left Katrins data-type="@data-order" trick. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144982|0 |1 is obsolete| | --- Comment #11 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 145053 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145053&action=edit Bug 32503: Use first cancellation for date ordering Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #145051|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #145052|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #145053|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 147142 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147142&action=edit Bug 32503: Fix date sorting for holds awaiting pickup tables This patch is a little experimental, but seems to do the trick. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 147143 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147143&action=edit Bug 32503: (follow-up) Move data-order attributes It looks like the data-order attributes were at the wrong level to me, i.e. not part of the 'td' but instead part of the cell content. This patch moves those data-order attributes where possible and drops the data-type definitions on the headers. However, for the cancellation case, this isn't as clear cut as we may well display more than one cancellation request date in the same cell. For this case I've left Katrins data-type="@data-order" trick. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 --- Comment #14 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 147144 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147144&action=edit Bug 32503: Use first cancellation for date ordering Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 --- Comment #15 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.05. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|23.05.00 |23.05.00,22.11.04 released in| | Status|Pushed to master |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 --- Comment #16 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Nice work everyone! Pushed to stable for 22.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |RESOLVED CC| |lucas@bywatersolutions.com Resolution|--- |FIXED --- Comment #17 from Lucas Gass <lucas@bywatersolutions.com> --- Merge conflicts with 22.05.x, no backport. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org