[open-ils-commits] [GIT] Evergreen ILS branch master updated. 1fd945019278c0fd05346aca4a88c0c94f0fae8a

Evergreen Git git at git.evergreen-ils.org
Tue Oct 18 12:15:29 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, master has been updated
       via  1fd945019278c0fd05346aca4a88c0c94f0fae8a (commit)
      from  296264efe6fcef702bf87e1bf6dba3ced81b9645 (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 1fd945019278c0fd05346aca4a88c0c94f0fae8a
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 584b4c7..e3ec8b7 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;
 

-----------------------------------------------------------------------

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