bug 2252: item-level hold not waiting until priority = 0
authorGalen Charlton <galen.charlton@liblime.com>
Mon, 23 Jun 2008 20:33:32 +0000 (15:33 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Wed, 25 Jun 2008 16:39:20 +0000 (11:39 -0500)
When returning an item that has an item-level hold on it,
CheckReserves() will not consider it waiting unless the
priority has been set to 0 (i.e., the item has specifically
been marked as filling the request.)

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Reserves.pm

index f011b9e..75c6614 100644 (file)
@@ -653,7 +653,7 @@ sub CheckReserves {
         foreach my $res (@reserves) {
             # FIXME - $item might be undefined or empty: the caller
             # might be searching by barcode.
-            if ( $res->{'itemnumber'} == $item ) {
+            if ( $res->{'itemnumber'} == $item && $res->{'priority'} == 0) {
                 # Found it
                 return ( "Waiting", $res );
             }