From 2f0057eefe7a55492a7ca9b0d3d240a8b2a628af Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 13 Dec 2011 14:32:45 -0500 Subject: [PATCH] Clear hold shelf/shelf_expire time for pickup lib change If a hold is on the holds shelf and the pickup library changes, clear the shelf_time and shelf_expire_time, since the hold is now in transit. This is particularly important for avoiding action_trigger events for the "hold_request.shelf_expires_soon" hook for what is now an in-transit item. Signed-off-by: Bill Erickson Signed-off-by: Thomas Berezansky --- Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm index 6da152f4c4..c8444ce8ab 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm @@ -838,6 +838,10 @@ sub update_hold_impl { # create the new transit my $evt = transit_hold($e, $orig_hold, $hold, $e->retrieve_asset_copy($hold->current_copy)); return $evt if $evt; + + # hold is leaving the shelf + $hold->clear_shelf_time; + $hold->clear_shelf_expire_time; } } -- 2.11.0