current_shelf_lib : ML misc trigger validator
authorBill Erickson <berick@esilibrary.com>
Tue, 27 Dec 2011 21:34:46 +0000 (16:34 -0500)
committerBill Erickson <berick@esilibrary.com>
Wed, 28 Dec 2011 18:50:39 +0000 (13:50 -0500)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Validator.pm

index 54847b3..57563e0 100644 (file)
@@ -75,11 +75,13 @@ sub HoldIsAvailable {
 
     return 1 if 
         !$hold->cancel_time and
-        $hold->capture_time and 
-        $hold->current_copy and
-        $hold->shelf_time and
         !$hold->fulfillment_time and
-        $hold->current_copy->status == OILS_COPY_STATUS_ON_HOLDS_SHELF;
+        $hold->current_shelf_lib and
+        $hold->current_shelf_lib eq $hold->pickup_lib and
+        $hold->capture_time and # redundant
+        $hold->current_copy and # redundant
+        $hold->shelf_time and   # redundant
+        $hold->current_copy->status == OILS_COPY_STATUS_ON_HOLDS_SHELF; # redundant
 
     return 0;
 }