[open-ils-commits] [GIT] Evergreen ILS branch rel_2_1 updated. 3185fc377b3005ca831813d77f8a5b9d4df40a7b
Evergreen Git
git at git.evergreen-ils.org
Tue Oct 18 12:15:50 EDT 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, rel_2_1 has been updated
via 3185fc377b3005ca831813d77f8a5b9d4df40a7b (commit)
from cefcbc4689b30b61fc53f1f3471b7c2a695934d7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 3185fc377b3005ca831813d77f8a5b9d4df40a7b
Author: Bill Erickson <berick at esilibrary.com>
Date: Tue Oct 18 12:07:46 2011 -0400
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 <berick at esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
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 f16c31a..0b7adad 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
@@ -661,6 +661,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;
-----------------------------------------------------------------------
Summary of changes:
.../perlmods/lib/OpenILS/Application/Circ/Holds.pm | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list