From 9adafd6404cfdc3f1fc52445e32d8f8b121ccc4e 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 Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart --- 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 a7f76f552e..9520be538f 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.39.5