[Koha-bugs] [Bug 32503] Holds awaiting pickup doesn't sort dates correctly
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Dec 28 23:49:06 CET 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32503
Katrin Fischer <katrin.fischer at bsz-bw.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |oleonard at myacpl.org
Status|ASSIGNED |NEW
--- Comment #2 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
Usually this works:
https://wiki.koha-community.org/wiki/DataTables_HowTo#Sorting_dates_regardless_of_date_format_preference
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.
More information about the Koha-bugs
mailing list