From 9a9a05aee80f9dad8fb6a00ae5f9195521b86a6e Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 15 Apr 2014 12:15:41 -0400 Subject: [PATCH] Bug 12088: Improve date handling and sorting in holds to pull report The holds to pull report could be improved by improving sorting on the title and date columns. This patch adds "anti-the" sorting to the title column and "title-string" sorting to the date column. Date formatting of another variable has been moved to the template for formatting using KohaDates. The patch includes other corrections for HTML validity. To test, apply the patch and view the holds to pull report. - Sorting by date should work correctly regardless of dateformat system preference setting. - Sorting of the title columns should correctly ignore articles. - Formatting of the "Reported on" date should be correct. Revision incorporates the corrections made by Bug 12127 and converts those changes to use class-based sorting. Signed-off-by: David Cook The patch works as described. Thanks for including and improving the changes from Bug 12127, Owen! Signed-off-by: Katrin Fischer Passes QA script and tests. No regressions found, works as advertised. Signed-off-by: Galen Charlton --- circ/pendingreserves.pl | 4 +- .../prog/en/modules/circ/pendingreserves.tt | 38 +++++++++---------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl index c34c52c056..7370819326 100755 --- a/circ/pendingreserves.pl +++ b/circ/pendingreserves.pl @@ -165,7 +165,7 @@ if ( $run_report ) { push( @reservedata, { - reservedate => format_date( $data->{l_reservedate} ), + reservedate => $data->{l_reservedate}, priority => $data->{priority}, name => $data->{l_patron}, title => $data->{title}, @@ -196,7 +196,7 @@ if ( $run_report ) { } $template->param( - todaysdate => format_date($todaysdate), + todaysdate => $todaysdate, from => $startdate, to => $enddate, run_report => $run_report, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt index 6a49e1c766..c596ab3ec9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt @@ -1,3 +1,4 @@ +[% USE KohaDates %] [% INCLUDE 'doc-head-open.inc' %] Koha › Circulation › Holds to pull [% INCLUDE 'doc-head-close.inc' %] @@ -5,16 +6,15 @@ [% INCLUDE 'datatables.inc' %] -