]> git.evergreen-ils.org Git - Evergreen.git/commit
LP#1752334 - BadContact, use additional note if provided.
authorJosh Stompro <stompro@stompro.org>
Thu, 28 Feb 2019 16:41:01 +0000 (10:41 -0600)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 31 Mar 2023 13:48:44 +0000 (09:48 -0400)
commit72c6eabaad6ef3ba017055ae857eacb64d8b00cd
tree1202ac3b1f1dc299ce8c0da5a474cddd1a3fd5ca
parent46d34807ee5b14839e96640f7340965790c1b144
LP#1752334 - BadContact, use additional note if provided.

If an additional note is provided when marking a contact invalid,
then that note should be appended to the penalty note field.

This change adds that functionality.  This doesn't change the results
for staff that are using the invalidate buttons in the client, since
there isn't a chance to add an additional note from that interface.

But if someone is calling open-ils.actor.invalidate.email via some other
method, then you can specify the additional note.

I would like to be able to add extra notes when automatically processing
bounced emails, to give staff a clue as to why the email failed.  Such as
"<email> Account over quota for past 3 weeks, ask patron to check their account."

Includes a new perl live test to check the new behavior, along with all
the open-ils.actor.invalidate.* call options.

Testing plan:

Before fix.
1. Choose a patron with an email address and note their patron id number.
2. Run an srfsh shell.
3. Login to get an auth token 'login username password'
4. Run the invalidate email command to mark the users email invalid, including
   an addition note value.
  srfsh# request open-ils.actor open-ils.actor.invalidate.email "<authtoken>" "<patronid>" "Testing Additional Note"
5. Take a look at the patron account and see that the penalty message only
   includes a copy of the email address that was marked invalid.

After fix.
1. Restart the opensrf actor service if needed to re-read the changed perl module.
  osrf_control -l --service open-ils.actor --restart
2. Remove the penalty and re-add email address to test patron's account.
3. Run an srfsh shell.
4. Login to get an auth token 'login username password'
5. Run the invalidate email command to mark the users email invalid,
   including an addition note value.
  srfsh# request open-ils.actor open-ils.actor.invalidate.email "<authtoken>" "<patronid>" "Testing Additional Note"
6. Take a look at the patron account and see that the penalty message note
   now includes the additional note.

Run the live test at Evergreen/Open-ILS/src/perlmods/live_t
perl ./36-lp1752334-badcontact.t

Signed-off-by: Josh Stompro <stomproj@larl.org>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/perlmods/lib/OpenILS/Utils/BadContact.pm
Open-ILS/src/perlmods/live_t/36-lp1752334-badcontact.t [new file with mode: 0644]