A/T ApplyPatronPenalty reactor misreads environment
Bug #1859502 reported by
Jason Etheridge
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Undecided
|
Unassigned | ||
3.6 |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
In the handler for ApplyPatronPena
my $user = $$env{environme
my $context_org = $$env{environme
It should be:
my $user = $$env{user};
my $context_org = $$env{context_org};
user and context_org are labels for their corresponding environment path entries.
I'll throw a patch up once LP gives me a bug number.
Changed in evergreen: | |
milestone: | none → 3.6.1 |
tags: | added: cleanup |
Changed in evergreen: | |
milestone: | 3.6.1 → 3.6.2 |
Changed in evergreen: | |
milestone: | 3.6.2 → 3.6.3 |
Changed in evergreen: | |
milestone: | 3.6.3 → 3.6.4 |
Changed in evergreen: | |
milestone: | 3.6.4 → 3.7.2 |
Changed in evergreen: | |
assignee: | nobody → Chris Sharp (chrissharp123) |
tags: | added: signedoff |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
There was also a typo that this patch fixes:
collab/ phasefx/ lp1859502- ApplyPatronPena lty @ working/ Evergreen. git
To test this, you could create the following A/T definition:
Owning Library: CONS PATRON_ EXCEEDS_ FINES
Name: test lp1859502
Hook: penalty.
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:
ApplyPatron Penalty: missing parameters
And no ALERT_NOTE penalty. With the patch you should see a "test message" alert note
when reloading the patron.