From 58c82c98bb978ceffd5a9f6c6fdf29a6b7e901be Mon Sep 17 00:00:00 2001 From: Terran McCanna Date: Mon, 11 Oct 2021 16:36:08 -0400 Subject: [PATCH] Online Renewal - Add standing penalty Signed-off-by: Terran McCanna --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm | 3 +-- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 2 +- Open-ILS/src/sql/Pg/upgrade/XXXX-quipu-standing_penalty.sql | 9 +++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX-quipu-standing_penalty.sql diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm index 4302845356..5ef85d0a31 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -3566,10 +3566,9 @@ sub has_penalties { }); #check for PATRON_TEMP_RENEWAL - ##### THIS WILL BE A DIFFERENT NUMBER ON PRODUCTION ##### my $searchpenalty_temp = new_editor()->search_actor_user_standing_penalty({ usr => $user->id, - standing_penalty => 101, + standing_penalty => 201, '-or' => [ {stop_date => undef}, {stop_date => {'>' => 'now'}} diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index 6db17d08c4..578c6eef11 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -91,7 +91,7 @@ INSERT INTO config.standing_penalty (id, name, label, staff_alert, org_depth) VA TRUE, 0 ); - +INSERT INTO config.standing_penalty (id, name, label, staff_alert, org_depth) VALUES (201, 'PATRON_TEMP_RENEWAL', 'Patron was given a 30-day temporary account renewal. Please archive this message after the account is fully renewed.', TRUE, 0); SELECT SETVAL('config.standing_penalty_id_seq', 100); diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX-quipu-standing_penalty.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX-quipu-standing_penalty.sql new file mode 100644 index 0000000000..9923d1793e --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX-quipu-standing_penalty.sql @@ -0,0 +1,9 @@ +BEGIN; + +INSERT INTO config.standing_penalty (id, name, label, staff_alert, org_depth) +VALUES (201, 'PATRON_TEMP_RENEWAL', + 'Patron was given a 30-day temporary account renewal. + Please archive this message after the account is fully renewed.', TRUE, 0 + ); + +COMMIT; \ No newline at end of file -- 2.11.0