lp1859502 fix A/T ApplyPatronPenalty reactor
authorJason Etheridge <jason@EquinoxInitiative.org>
Mon, 13 Jan 2020 17:38:53 +0000 (12:38 -0500)
committerJason Etheridge <jason@EquinoxInitiative.org>
Thu, 6 Aug 2020 17:30:18 +0000 (13:30 -0400)
commit518d59f7fbf8df520b940315ee5c55b9376d5823
treee784c3042faae4560e4902005469e8c71ec9b31b
parent0ebbd2f4a5ff47f7fc6aa0da97fda5336df5c727
lp1859502 fix A/T ApplyPatronPenalty reactor

To test this, you could create the following A/T definition:

    Owning Library: CONS
    Name: test lp1859502
    Hook: penalty.PATRON_EXCEEDS_FINES
    Enabled: True
    Processing Delay: 00:00:00
    Processing Group Context Field: usr
    Reactor: ApplyPatronPenalty
    Validator: NOOP_TRUE
    Max Event Validity Delay: 1 day
    Template: test message

with environment:

    Field Path: usr
    Label: user

    Field Path: usr.home_ou
    Label: context_org

with event params:

    Parameter Name: standing_penalty
    Parameter Value: ALERT_NOTE

Then bill a test patron for $100 and run something like:

/openils/bin/action_trigger_runner.pl --osrf-config /openils/conf/opensrf_core.xml --run-pending

Without the patch, you'll get something like this in osrfsys.log:

ApplyPatronPenalty: missing parameters

And no ALERT_NOTE penalty.  With the patch you should see a "test message" alert note
when reloading the patron.

Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor/ApplyPatronPenalty.pm