Online Renewal - Tweak new standing penalty
authorTerran McCanna <tmccanna@georgialibraries.org>
Mon, 21 Nov 2022 19:26:18 +0000 (14:26 -0500)
committerJason Stephenson <jstephenson@cwmars.org>
Tue, 29 Nov 2022 20:03:27 +0000 (15:03 -0500)
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 <tmccanna@georgialibraries.org>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX-quipu-standing_penalty.sql

index c9c0e94..595d3d3 100644 (file)
@@ -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'}}
index 99f49eb..6ae2447 100644 (file)
@@ -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);
 
index 9923d17..e7d82fd 100644 (file)
@@ -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
        );