Bug 7408 - Don't cancel found reserves.
authorKyle M Hall <kyle@bywatersolutions.com>
Thu, 8 Mar 2012 19:45:56 +0000 (14:45 -0500)
committerPaul Poulain <paul.poulain@biblibre.com>
Fri, 9 Mar 2012 15:13:54 +0000 (16:13 +0100)
At the moment, a reserve will be canceled if it has passed its
expiration date, even if the item is waiting or in the process
of being transferred. The situation could arise where someone
has a hold filled, but it is canceled while in transit, or before
the borrower can pick it up.

C4/Reserves.pm

index 44a82bd..a63e30f 100644 (file)
@@ -866,6 +866,7 @@ sub CancelExpiredReserves {
     my $sth = $dbh->prepare( "
         SELECT * FROM reserves WHERE DATE(expirationdate) < DATE( CURDATE() ) 
         AND expirationdate IS NOT NULL
+        AND found IS NULL
     " );
     $sth->execute();