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 (bug #5157) fix borrowers top issues 2011-03-06 08:31:08 +13:00
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 bug 4176: remove references to unimplemented system preference MIME 2010-10-21 21:36:45 -04:00
cat_issues_top.pl bug 4176: remove references to unimplemented system preference MIME 2010-10-21 21:36:45 -04:00
catalogue_out.pl bug 4176: remove references to unimplemented system preference MIME 2010-10-21 21:36:45 -04:00
catalogue_stats.pl bug 4176: remove references to unimplemented system preference MIME 2010-10-21 21:36:45 -04:00
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 follow-up: improve use of home and holding library in circ stats report 2010-11-10 19:39:03 +13:00
itemslost.pl MT 2051 : granular permissions for guided reports 2009-10-16 23:55:50 +02:00
itemtypes.plugin Fix for Bug 3431 - Catalog by itemtype report pulling from holdingbranch 2011-12-16 18:30:00 +01:00
manager.pl remove a bunch of unconditional debug warns 2010-07-02 10:57:08 -04:00
reports-home.pl Bug 2505 - Add commented use warnings where missing in the reports/ directory 2010-04-21 20:19:57 +12:00
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 Bug 2505 - Add commented use warnings where missing in the reports/ directory 2010-04-21 20:19:57 +12:00
stats.screen.pl Bug 2505 - Add commented use warnings where missing in the reports/ directory 2010-04-21 20:19:57 +12:00