Koha/reports
Garry Collum 67825637be Bug 6984 - Holds statistics doesn't work.
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";

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Confirm original bug -- Reports work as expected now!
prove t xt t/db_dependent no different from master.
2012-02-03 14:14:15 +01:00
..
acquisitions_stats.pl BZ6115: Acquisition reports : date filter & sorting don't work 2012-01-20 14:18:33 +01:00
bor_issues_top.pl
borrowers_out.pl Bug 6078: Request to find borrowers without issues overload the server 2011-08-10 21:13:39 +12:00
borrowers_stats.pl
cat_issues_top.pl
catalogue_out.pl
catalogue_stats.pl
dictionary.pl Fix for Bug 6602 - Reports dictionary doesn't properly recognize text columns 2011-08-25 11:49:04 +12:00
guided_reports.pl Bug 6752: Be stricter with utf-8 encoding of output 2012-01-27 12:11:06 +01:00
issues_avg_stats.pl Bug 5453 Move declarations out of conditionals 2011-07-15 15:50:23 +12:00
issues_by_borrower_category.plugin Bug 2616: Remove unnecessary 'use HTML::Template' calls 2011-12-06 11:34:05 +01:00
issues_stats.pl
itemslost.pl
itemtypes.plugin Fix for Bug 3431 - Catalog by itemtype report pulling from holdingbranch 2011-12-16 18:30:00 +01:00
manager.pl
reports-home.pl
reservereport.pl Bug 6050 Make calls to GetItemsInfo consistent 2011-06-14 14:12:02 +12:00
reserves_stats.pl Bug 6984 - Holds statistics doesn't work. 2012-02-03 14:14:15 +01:00
serials_stats.pl Bug 6752: Be stricter with utf-8 encoding of output 2012-01-27 12:11:06 +01:00
stats.print.pl
stats.screen.pl