From 4ef04fbbf703991e60704cc23e16c8b20b64584f Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 13 Mar 2013 08:36:57 -0400 Subject: [PATCH] Bug 9805 - Lost items are un-lost if returned, but not if renewed. If an item has a lost status, that status is removed when the item is returned. However, it is not removed if the item is renewed. Test Plan: 1) Check an item out to a patron, back date the due date 6 months 2) Run misc/cronjobs/longoverdue.pl -l 30=2 --confirm 3) Verify the item is now checked out but lost 4) Renew the item, verify the item is still lost 5) Apply this patch 6) Renew the item again, verify the item is no longer lost --- C4/Circulation.pm | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index f1c8662..1cb1d1f 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2565,7 +2565,15 @@ sub AddRenewal { # Update the renewal count on the item, and tell zebra to reindex $renews = $biblio->{'renewals'} + 1; - ModItem({ renewals => $renews, onloan => $datedue->strftime('%Y-%m-%d %H:%M')}, $biblio->{'biblionumber'}, $itemnumber); + ModItem( + { + renewals => $renews, + onloan => $datedue->strftime('%Y-%m-%d %H:%M'), + itemlost => 0, + }, + $biblio->{'biblionumber'}, + $itemnumber + ); # Charge a new rental fee, if applicable? my ( $charge, $type ) = GetIssuingCharges( $itemnumber, $borrowernumber ); -- 1.7.2.5