[open-ils-commits] [GIT] Evergreen ILS branch rel_2_1 updated. 14d1a2670dcb1ca1ec7ff6bab67d2806add2ae64

Evergreen Git git at git.evergreen-ils.org
Tue Nov 15 12:00:14 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, rel_2_1 has been updated
       via  14d1a2670dcb1ca1ec7ff6bab67d2806add2ae64 (commit)
      from  decf587b66b9cc5e3b2133698534771fa3810a1a (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 14d1a2670dcb1ca1ec7ff6bab67d2806add2ae64
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 bcc0b50..cf90688 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
@@ -3216,10 +3216,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