]> git.evergreen-ils.org Git - Evergreen.git/commit
LP1790896: Receipt Errors with invalid emails
authorJason Boyer <jboyer@library.in.gov>
Thu, 7 Feb 2019 18:48:13 +0000 (13:48 -0500)
committerGalen Charlton <gmc@equinoxinitiative.org>
Thu, 23 May 2019 21:25:58 +0000 (17:25 -0400)
commit2f99851892d460b83e1cb4e08ff1988f3d6bb15d
tree63358b3739627987e83741ed5818d66a7b49b778
parent4030d39f54386229cfc949921af1846e065f11a1
LP1790896: Receipt Errors with invalid emails

The attempt at belt-and-suspenders checking for a valid
email for use in the has_email template field sadly
causes the JS to trip over said suspenders if there is
a value in the field but it doesn't contain a '@'.

The raw return from "".match() (either an array or null)
is enough to do the right thing when converted into a
Boolean and doesn't cause the same problems.

To test
-------
[1] Set up a patron record with an invalid email address,
    e.g., one that lacks the '@' character.
[2] Check out an item the patron, then from the Items Out
    tab, print an item receipt.
[3] Note that nothing happens and an error is logged in the
    browser console.
[4] Apply the patch and repeat step 2. This time, a receipt
    should be generated.

Signed-off-by: Jason Boyer <jboyer@library.in.gov>
Signed-off-by: Josh Stompro <stompro@stompro.org>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/web/js/ui/default/staff/circ/patron/bills.js
Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js
Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js