]> git.evergreen-ils.org Git - Evergreen.git/commit - docs/modules/local_admin/pages/group_penalty_thresholds.adoc
LP1890822: Don't checkout in cases where a patron is eligible for a penalty, but...
authorJane Sandberg <sandbergja@gmail.com>
Tue, 2 Jan 2024 03:33:58 +0000 (19:33 -0800)
committerGalen Charlton <gmc@equinoxOLI.org>
Wed, 14 Feb 2024 14:30:22 +0000 (09:30 -0500)
commitc7f7d82fca9215dcfa84e4ef5bbfac9bef03624c
treeea702b116e04a03c933f1adce2ce29fcd49ecb8a
parentdb1264dedb16fe505ebd0b395a2ef54b76d89875
LP1890822: Don't checkout in cases where a patron is eligible for a penalty, but hasn't received it yet

To test:
1. In Local Admin > Group Penalty Threshold, set the
   PATRON_EXCEEDS_OVERDUE_COUNT threshold to 1.
2. Find a patron who has more than 1 overdue.
3. Try to check another item out to the patron.
4. Confirm that you get an alert PATRON_EXCEEDS_OVERDUE_COUNT
   and the item does not check out.

Note that this adds a penalty check to the checkout logic, rather than
to the patron retrieval logic as suggested in
https://bugs.launchpad.net/evergreen/+bug/1983621, since this will also
address SIP checkouts.

Also adds characterization tests for relevant stored procedures.

Release-note: Fix bug that allowed one checkout after a patron had reached a group penalty threshold, for example PATRON_EXCEEDS_OVERDUE_COUNT or PATRON_EXCEEDS_CHECKOUT_COUNT.

Signed-off-by: Jane Sandberg <sandbergja@gmail.com>
Sponsored-by: PaILS
Signed-off-by: Elizabeth Davis <elizabeth.davis@sparkpa.org>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
Open-ILS/src/perlmods/live_t/38-patron-circ-limit-set.t [new file with mode: 0644]
Open-ILS/src/perlmods/live_t/38-patron-exceeds-checkout-count.t [new file with mode: 0644]
Open-ILS/src/perlmods/live_t/38-patron-exceeds-overdue-count.t [new file with mode: 0644]
Open-ILS/src/sql/Pg/live_t/calculate_system_penalties.pg [new file with mode: 0644]
Open-ILS/src/sql/Pg/live_t/patron_exceeds_overdue_count.pg [new file with mode: 0644]
docs/modules/local_admin/pages/group_penalty_thresholds.adoc