From 60aed1c6d152beb8beac9ed1ad31380118f77c5b Mon Sep 17 00:00:00 2001 From: David Cook Date: Mon, 19 Aug 2013 12:35:51 +1000 Subject: [PATCH] Bug 8752 - Log circulation renewal Currently, circulation renewals are not being logged. This patch logs renewals under the Circulation module with an action of RENEW. At the moment, it relies on the "IssueLog" preference, but we could add a new syspref for "RenewLog". Personally, I figure it's just a "re-issue" so I don't know that we need another preference, but system preferences are cheap, so if people think a follow-up is necessary, I'm open to the idea. Test Plan: 0) Turn on IssueLog and ReturnLog in the system preferences 1) Checkout an item 2) Note that there is a CIRCULATION ISSUE log entry 3) Renew that item 4) Note that there is NOT a log entry 5) Return that item 6) Note that there is a CIRCULATION RETURN log entry 7) Apply patch 8) Repeat Step #3 (i.e. renew that item). 9) Note that there is now a CIRCULATION RENEW log entry N.B. Logs can be viewed by directly querying the database, viewing the Modification Log for the patron attached to the checkout/renew/ return, or by viewing the logs in the Tools module using the item's itemnumber as the "Object". Signed-off-by: Owen Leonard This works as advertised, and I think it's an appropriate extension to the scope of IssueLog. Signed-off-by: Kyle M Hall --- C4/Circulation.pm | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 1dc7a45..d787422 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2612,6 +2612,8 @@ sub AddRenewal { # Log the renewal UpdateStats( $branch, 'renew', $charge, '', $itemnumber, $item->{itype}, $borrowernumber, undef, $item->{'ccode'}); + logaction("CIRCULATION", "RENEW", $borrowernumber, $item->{'itemnumber'}) + if C4::Context->preference("IssueLog"); return $datedue; } -- 1.7.2.5