From 1dbba207ec03198615abeadc9237f5582cdfb811 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Wed, 22 Jun 2011 10:48:58 -0400 Subject: [PATCH] Check if hold is really available in Trigger::Validator. Add checks for shelf time and no fulfillment time in HoldIsAvailable in OpenILS::Application::Trigger::Validator. We've had some issues with poorly migrated data and people messing with holds that causes the original logic to trigger for unfilled holds. Plus, the extra precaution of checking more precise conditions of an actually filled hold can't hurt, can it? Signed-off-by: Jason Stephenson Signed-off-by: Mike Rylander --- .../src/perlmods/lib/OpenILS/Application/Trigger/Validator.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Validator.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Validator.pm index 260af53def..98e18ccd1f 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Validator.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Validator.pm @@ -77,6 +77,8 @@ sub HoldIsAvailable { !$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; return 0; -- 2.43.2