From 552cc917bbe6f5f323bdd34342a46545c2f92f57 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Mon, 5 Oct 2020 17:48:45 +0000 Subject: [PATCH] Bug 26664: Fix sorting for date last seen in inventory tool This adds the standard datatable sorting for dates to the inventory table as described here: https://wiki.koha-community.org/wiki/DataTables_HowTo#Sorting_dates_regardless_of_date_format_preference To test: - Go to the inventory tool - Search for a big sample list of items with different date last seen - Sort the table now by "date last seen" by clicking on the table header cell - Try different settings of the DateFormat system preferences - Verify sorting is incorrect (alphabetic, not by date) - Apply patch - Repeat testing and very all is sorting correctly now Signed-off-by: Chris Cormack --- koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt index 5346304268..8e6b66009b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt @@ -200,7 +200,7 @@ Lost Damaged Withdrawn - Last seen + Last seen Problems @@ -239,7 +239,7 @@ [% result.withdrawn | html %] - [% result.datelastseen | $KohaDates %] + [% result.datelastseen | $KohaDates%] [% FOREACH problem IN result.problems %] @@ -350,6 +350,7 @@ "aoColumnDefs": [ { "sType": "anti-the", "aTargets" : [ "anti-the" ] }, { "bSortable": false, "bSearchable": false, "aTargets": [ 0 ] }, + { "sType": "title-string", "aTargets" : [ "title-string" ] }, ], // 3rd column is callnumber "aaSorting": [[ 2, "asc" ]], -- 2.11.0