]> git.evergreen-ils.org Git - Evergreen.git/commit
LP#1517556 - Exclude inactive event defs from find_event_def_by_hook.
authorJosh Stompro <stomproj@larl.org>
Wed, 30 Mar 2016 13:47:57 +0000 (08:47 -0500)
committerGalen Charlton <gmc@esilibrary.com>
Tue, 24 May 2016 17:34:49 +0000 (13:34 -0400)
commita05d872a17ee05cf003ee0aa024e9cc4d76b3cdc
tree56156567c1f76aad9f11b14dc438cee19fe2cc31
parentc48288ded7b86b76ccd8f85911f5a1a979d5c6d8
LP#1517556 - Exclude inactive event defs from find_event_def_by_hook.

Currently when find_event_def_by_hook is called to find an appropriate
event_def based on the hook, it doesn't exclude inactive event defs.  So
strange behavior can happen if inactive event defs are present.

I ran into this issue when I was trying out different versions of the self
check receipt event def.  I had one ative and one inactive while I was
troubleshooting, and when the system would grab the inactive event def by
chance, the self check UI would freeze.  I think it is a resonable expectation
that an event def marked inactive doesn't get used by the system.

To test this out, clone one of the self check event defs, such as
"Self-Checkout Items Out Receipt" and mark the copy as inactive.  Now
go and trigger this event in the self check interface by attempting to
print from the Items Out screen.  It should now fail 50% of the time, since
both the active and inactive defs are returned.

After the fix the inactive event def will always be excluded, so the action
should no longer fail.

Signed-off-by: Josh Stompro <stomproj@larl.org>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm