[open-ils-commits] [GIT] Evergreen ILS branch rel_3_0 updated. 353ffdfd6ca5fea72715bc75f443caad9e20f153

Evergreen Git git at git.evergreen-ils.org
Thu May 10 16:02:23 EDT 2018


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_3_0 has been updated
       via  353ffdfd6ca5fea72715bc75f443caad9e20f153 (commit)
      from  06fe3824d7f71913a7bfd99156bd3a176f2c324c (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 353ffdfd6ca5fea72715bc75f443caad9e20f153
Author: Bill Erickson <berickxx at gmail.com>
Date:   Mon Apr 30 14:27:41 2018 -0400

    LP#1740537 Transit dialog showing wrong branch
    
    Always retrieve the latest copy transit from the server when displaying
    the copy transit dialog.  This resolves an issue where a just-closed
    transit is used instead.
    
    Add a filter to avoid canceled transits.
    
    Make the transit lookup call authoritative, since the transit may have
    just been created.
    
    To test (test plan courtesy of John Amundson):
    
    1. Sign in as Library A.
    2. Check in an item owned by Library B that does not have any holds
       associated with it. This will send the item in transit to its home,
       Library B.
    3. Place a hold on the item to be picked up at Library C.
    4. Sign in as Library B.
    5. Check in the item. The transit pop-up and printout will show that
       the item needs to be transited to Library B instead of Library C.
    6. Apply the patch and repeat steps 1-5 using a different item. This
       time, the transit pop-up will show that the item needs
       to be transited to Library C.
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/web/js/ui/default/staff/circ/services/circ.js b/Open-ILS/web/js/ui/default/staff/circ/services/circ.js
index 58277d1..f522390 100644
--- a/Open-ILS/web/js/ui/default/staff/circ/services/circ.js
+++ b/Open-ILS/web/js/ui/default/staff/circ/services/circ.js
@@ -864,11 +864,12 @@ function($uibModal , $q , egCore , egAlertDialog , egConfirmDialog,
     service.find_copy_transit = function(evt, params, options) {
         if (angular.isArray(evt)) evt = evt[0];
 
-        if (evt && evt.payload && evt.payload.transit)
-            return $q.when(evt.payload.transit);
+        // NOTE: evt.payload.transit may exist, but it's not necessarily
+        // the transit we want, since a transit close + open in the API
+        // returns the closed transit.
 
          return egCore.pcrud.search('atc',
-            {   dest_recv_time : null},
+            {   dest_recv_time : null, cancel_time : null},
             {   flesh : 1, 
                 flesh_fields : {atc : ['target_copy']},
                 join : {
@@ -881,7 +882,7 @@ function($uibModal , $q , egCore , egAlertDialog , egConfirmDialog,
                 },
                 limit : 1,
                 order_by : {atc : 'source_send_time desc'}, 
-            }
+            }, {authoritative : true}
         ).then(function(transit) {
             transit.source(egCore.org.get(transit.source()));
             transit.dest(egCore.org.get(transit.dest()));

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

Summary of changes:
 .../web/js/ui/default/staff/circ/services/circ.js  |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list