[Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 7019 - Circulation History Sort Order Wrong

Nicole C. Engard nengard at bywatersolutions.com
Fri Oct 14 02:38:20 CEST 2011


From: Owen Leonard <oleonard at myacpl.org>

The return column sort was not using the right sort algorithm
because it was confused by the combination of date data and
text data ("Checked out"). I've added an explicit instruction
to sort by date. The downside to this change is that checked
out items are sorted with the oldest checkouts rather than
the newest:

Checked Out
Checked Out
10/14/1988
07/14/2005

Not perfect, but an improvement over completely incorrect
sorting. This patch also adds the necessary check for system
dateformat preference to properly sort metric dates.

Signed-off-by: Nicole C. Engard <nengard at bywatersolutions.com>
---
 .../prog/en/modules/members/readingrec.tt          |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt
index 1ab1130..0d3b76b 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt
@@ -11,9 +11,10 @@
 		type: 'text'
 	});
 	$.tablesorter.defaults.widgets = ['zebra'];
-	$("#table_readingrec").tablesorter({
+	$("#table_readingrec").tablesorter({[% IF ( dateformat_metric ) %]
+		dateFormat: 'uk',[% END %]
 		sortList: [[8,1]],
-		headers: { 1: { sorter: 'articles' }}
+		headers: { 1: { sorter: 'articles' }, 9: { sorter: 'shortDate'} }
 	}).tablesorterPager({container: $("#pagertable_readingrec"),positionFixed: false,size: 20});
 }); </script>
 </head>
-- 
1.7.2.3



More information about the Koha-patches mailing list