]> git.evergreen-ils.org Git - Evergreen.git/commit
LP#1986479: fix lookup of user locale during A/T event processing
authorGalen Charlton <gmc@equinoxOLI.org>
Fri, 9 Sep 2022 20:42:05 +0000 (16:42 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Tue, 11 Oct 2022 19:50:03 +0000 (15:50 -0400)
commitf4f3fa58ed5db2e21b182b66019a30eb0b6f6b01
tree486cbaaab15db832472beeee54e21ab15b97ebf9
parent5480e30d30af4a3b43d7a98595d40833c1f2ca4e
LP#1986479: fix lookup of user locale during A/T event processing

This patch fixes an issue with the new user-locale-sensitive
alternate Action Trigger template selection that supports letting
patrons receive notifications in their preferred language. In
particular, it corrects an assumption that the event target is
the user itself. With the patch, the the event definition's
context user path is consulted to identify the relevant user.

To test
-------
[1] Set up a patron with an email address and check out an item.
[2] Use the Quick Receipt drop-down to attempt an email checkout
    receipt.
[3] No email will be generated an the event will fail. The logs
    should contain something like

    Can't use an undefined value as a HASH reference at
    /usr/local/share/perl/5.28.1/OpenILS/Application/Trigger/Event.pm
    line 518.
[4] Apply the patch and repeat steps 1 and 2. This time, the email
    should be sent (or, at least, the A/T event will be successfully
    processed).

Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Event.pm