From eeef97106ae0756849763710d59421792aed4339 Mon Sep 17 00:00:00 2001 From: Garry Collum Date: Wed, 1 Feb 2012 10:15:46 -0500 Subject: [PATCH] Bug 6984 - Holds statistics doesn't work. Content-Type: text/plain; charset="utf-8" This patch fixes several errors in reserves_stats.pl and reserves_stats.tt. Testing - To test this patch, data must be in either the reserves table or old_reserves or both. The following SQL will give you the raw data that is used by the report. SELECT priority, found, reservedate, notificationdate, reminderdate, waitingdate, cancellationdate, borrowers.categorycode, items.itype, reserves.branchcode, holdingbranch, items.homebranch, items.ccode, items.location, items.itemcallnumber, borrowers.sort1, borrowers.sort2 FROM reserves LEFT JOIN borrowers on (borrowers.borrowernumber = reserves.borrowernumber) LEFT JOIN items on (items.itemnumber = reserves.itemnumber) UNION SELECT priority, found, reservedate, notificationdate, reminderdate, waitingdate, cancellationdate, borrowers.categorycode, items.itype, old_reserves.branchcode, holdingbranch, items.homebranch, items.ccode, items.location, items.itemcallnumber, borrowers.sort1, borrowers.sort2 FROM old_reserves LEFT JOIN borrowers on (borrowers.borrowernumber = old_reserves.borrowernumber) LEFT JOIN items on (items.itemnumber = old_reserves.itemnumber) To test the notificationdate and reminderdate, I added data to the old_reserves table, since I have never run notices on my test machine. Ex: UPDATE old_reserves SET notificationdate = "2012-01-29", reminderdate = "2012-01-29" WHERE timestamp = "2012-01-29 20:09:34"; --- .../prog/en/modules/reports/reserves_stats.tt | 28 +++--- reports/reserves_stats.pl | 89 ++++++++++++-------- 2 files changed, 69 insertions(+), 48 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reserves_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reserves_stats.tt index 6f5865b..f5d03f5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reserves_stats.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reserves_stats.tt @@ -89,18 +89,18 @@ - Asked - Processing - Waiting - Satisfied - Cancelled + Asked + Processing + Waiting + Satisfied + Cancelled Hold Date - + Show Calendar