[open-ils-commits] [GIT] Evergreen ILS branch master updated. 6c8d8bc88eda71c54b9833d2480ff8859b2c088f

Evergreen Git git at git.evergreen-ils.org
Tue Nov 15 12:00:02 EST 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  6c8d8bc88eda71c54b9833d2480ff8859b2c088f (commit)
      from  240685d185761087aba05b48efccc7796d91aecb (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 6c8d8bc88eda71c54b9833d2480ff8859b2c088f
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Oct 24 16:27:29 2011 -0400

    Clear shelf canceled holds notification fix
    
    After cancelling a batch of holds via the clear-shelf process, before we
    send the holds off to action/trigger for potential notification
    generation, re-fetch the holds from the DB to pick up the calculated
    cancel_time value (i.e. get a real value for "now").  Otherwise, A/T may
    die attempting to create a DateTime object by parsing "now".
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Mike Rylander <mrylander at gmail.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 3719afc..ad5e9ad 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
@@ -3347,10 +3347,18 @@ sub clear_shelf_process {
         # tell the client we're done
         $client->respond_complete({cache_key => $cache_key});
 
+        # ------------
         # fire off the hold cancelation trigger and wait for response so don't flood the service
+
+        # refetch the holds to pick up the caclulated cancel_time, 
+        # which may be needed by Action/Trigger
+        $e->xact_begin;
+        my $updated_holds = $e->search_action_hold_request({id => $hold_ids}, {substream => 1});
+        $e->rollback;
+
         $U->create_events_for_hook(
             'hold_request.cancel.expire_holds_shelf', 
-            $_, $org_id, undef, undef, 1) for @holds;
+            $_, $org_id, undef, undef, 1) for @$updated_holds;
 
     } else {
         # tell the client we're done

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

Summary of changes:
 .../perlmods/lib/OpenILS/Application/Circ/Holds.pm |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list