[open-ils-commits] [GIT] Evergreen ILS branch rel_3_3 updated. 1412d3f304b32bb5dd7bdb80dcfc432a80248255

Evergreen Git git at git.evergreen-ils.org
Tue Feb 25 17:55:50 EST 2020


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_3 has been updated
       via  1412d3f304b32bb5dd7bdb80dcfc432a80248255 (commit)
      from  cc8e216a22701f5b9971d093cab1786bc9491467 (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 1412d3f304b32bb5dd7bdb80dcfc432a80248255
Author: Josh Stompro <stompro at stompro.org>
Date:   Tue Feb 25 13:53:08 2020 -0600

    LP#850160 - Event Def Environment Fleshing Might Have Issue
    
    When the action trigger environment gets fleshed out, there is a bug
    with how might_have relations are fleshed ever other time they are
    evaluated.
    
    The first time they are correctly evaluated, but then the next time the
    same path gets evaluated, the object gets reset to the first value in
    the object.
    
    See https://bugs.launchpad.net/evergreen/+bug/850160 for testing notes.
    
    The fix is to add an extra check to only grab the first element if the object is
    an array.  If it isn't an array it means it has already been fleshed.
    
    Testing notes:
    
    One way to test this bug is by looking at the self check
    receipt, hours of operations bug.
    https://bugs.launchpad.net/evergreen/+bug/793627
    
    By default, the self check receipt will fail for even numbers of items checked
    out because the hours of operation doesn't get fleshed correctly.
    
    With this change, the receipt should print for even and odd numbers of items.
    
    Another test is to add user.money_summary to a lost/bill action trigger
    event notification.  Before the fix, if you have an even number of items billec, the
    user.money_summary gets set to the first object in that table, and for odd
    numbers of items, user.money_summary.balanced_owed gets set correctly.
    
    Signed-off-by: Josh Stompro <stompro at stompro.org>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Event.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Event.pm
index bd85e387dd..4291eeb407 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Event.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Event.pm
@@ -693,7 +693,7 @@ sub _object_by_path {
             }
             $$node{$$label[-1]} = $obj;
         } else {
-            $obj = $$obj[0] if $rtype eq 'might_have';
+            $obj = $$obj[0] if $rtype eq 'might_have' and ref($obj) eq 'ARRAY';
             $context->$step( $obj ) if ($obj);
         }
     }

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

Summary of changes:
 Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Event.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list