]> 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:35:21 +0000 (13:35 -0400)
commit0491c69c64a1478a548f41ddb827b527e15fca86
tree47698566b45ad0372f29fa8ce38911c0632fd6ad
parentf9c1455f84e27781949352ac4ed6839812aad9c1
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