Invalid A/T group field value can cause batch of events to remain in "collected" state
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
New
|
Undecided
|
Unassigned |
Bug Description
An Action Trigger event definition that has an invalid group field can cause an entire set of events to fail to be processed, leaving the events in the "collected" state.
This can be triggered by, for example, setting up a notification on the au.expired hook specifying "usr" rather than "id" as the grouping field (as might happen with copy-and-pasting from a circulation notice event definition). If such an event definition has a granularity of Daily, then the following error can happen after the events are collected:
srfsh# request open-ils.trigger open-ils.
Received Exception:
Name: osrfMethodException
Status: *** Call to [open-ils.
No field by the name usr in Fieldmapper:
This exception ends the method call and leaves any events not yet processed (which potentially could be thousands from dozens of event definitions) in the "collected" state.
As a side note, this sort of uncaught exception ends up not being readily logged when it occurs during an action_
This bug is similar to bug 1741337. Better exception handling would at least contain the damage to the broken event definition, but it should also be possible to test for certain kinds of problems with the event definition and warn the user if they're trying to save a broken definition.
Evergreen 3.1+
tags: | added: actiontrigger |