From 1fd945019278c0fd05346aca4a88c0c94f0fae8a Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 18 Oct 2011 12:07:46 -0400 Subject: [PATCH] Re-fetch hold for cancel notify to correct timestamp Re-fetch the cancelled hold from the DB before passing it off to action/trigger for notification processing. Otherwise, A/T attempts to perform date math on "now" instead of a valid timestamp and subsequently croaks. Signed-off-by: Bill Erickson Signed-off-by: Lebbeous Fogle-Weekley --- Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm index 584b4c7671..e3ec8b797d 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm @@ -760,6 +760,11 @@ sub cancel_hold { $e->commit; + # re-fetch the hold to pick up the real cancel_time (not "now") for A/T + $e->xact_begin; + $hold = $e->retrieve_action_hold_request($hold->id) or return $e->die_event; + $e->rollback; + $U->create_events_for_hook('hold_request.cancel.staff', $hold, $hold->pickup_lib) if $e->requestor->id != $hold->usr; -- 2.43.2