]> git.evergreen-ils.org Git - contrib/Conifer.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:59 +0000 (13:34 -0400)
commit11d618df05b4d82803dd1e73f4e8798178873e82
treeea080eceba354b7d455c8668812c3ed8025a61c1
parentc980529a092609af40235f28b55390f4e1ffa415
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