From: Terran McCanna Date: Mon, 21 Nov 2022 19:26:18 +0000 (-0500) Subject: Online Renewal - Tweak new standing penalty X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a6f8a1cad82f2a7638ed0b79f7bae86cab85745b;p=working%2FEvergreen.git Online Renewal - Tweak new standing penalty The ID of the standing penalty has to be under 100 to prevent staff from manually adding it to patron accounts through the client interface. Signed-off-by: Terran McCanna --- 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 c9c0e94d32..595d3d318f 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -3606,7 +3606,7 @@ sub has_penalties { #check for PATRON_TEMP_RENEWAL my $searchpenalty_temp = new_editor()->search_actor_user_standing_penalty({ usr => $user->id, - standing_penalty => 201, + standing_penalty => 90, '-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 99f49eb980..6ae2447bd2 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,8 @@ 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); +-- Temp renewal penalty must be under 100 to prevent staff from manually adding it through client interface +INSERT INTO config.standing_penalty (id, name, label, staff_alert, org_depth) VALUES (90, '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 index 9923d1793e..e7d82fd51b 100644 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX-quipu-standing_penalty.sql +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX-quipu-standing_penalty.sql @@ -1,7 +1,9 @@ BEGIN; +-- ID has to be under 100 in order to prevent it from appearing as a dropdown in the patron editor. + INSERT INTO config.standing_penalty (id, name, label, staff_alert, org_depth) -VALUES (201, 'PATRON_TEMP_RENEWAL', +VALUES (90, 'PATRON_TEMP_RENEWAL', 'Patron was given a 30-day temporary account renewal. Please archive this message after the account is fully renewed.', TRUE, 0 );