Koha-clms/reports
Garry Collum 6a120f28ba 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.
(cherry picked from commit 67825637be)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit 7ac0d0b924)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 22:27:40 -05:00
..
acquisitions_stats.pl BZ6115: Acquisition reports : date filter & sorting don't work 2012-02-19 21:32:35 -05: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 17:48:49 -04: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-09-02 14:42:34 -04:00
guided_reports.pl Bug 6752: Be stricter with utf-8 encoding of output 2012-02-19 21:37:10 -05:00
issues_avg_stats.pl bug 4176: remove references to unimplemented system preference MIME 2010-10-21 21:36:45 -04:00
issues_by_borrower_category.plugin Fix FSF address in directory reports/ 2010-03-16 20:17:55 -04: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 2012-01-20 23:13:30 -05: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-19 16:03:48 -04:00
reserves_stats.pl Bug 6984 - Holds statistics doesn't work. 2012-02-19 22:27:40 -05:00
serials_stats.pl Bug 6752: Be stricter with utf-8 encoding of output 2012-02-19 21:37:10 -05: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