lp1861319 Expired Patron Item Renewal WIP
authorKyle Huckins <khuckins@catalyte.io>
Thu, 19 Mar 2020 23:04:29 +0000 (23:04 +0000)
committerKyle Huckins <khuckins@catalyte.io>
Thu, 19 Mar 2020 23:04:29 +0000 (23:04 +0000)
- SQL Upgrade for the new Org Unit Setting
- Perl Constant for new Org Unit Setting

Signed-off-by: Kyle Huckins <khuckins@catalyte.io>
 Changes to be committed:
modified:   Open-ILS/src/perlmods/lib/OpenILS/Const.pm
new file:   Open-ILS/src/sql/Pg/upgrade/XXXX.data.org-setting-circ-renew-expired.sql

Open-ILS/src/perlmods/lib/OpenILS/Const.pm
Open-ILS/src/sql/Pg/upgrade/XXXX.data.org-setting-circ-renew-expired.sql [new file with mode: 0644]

index 7c5fb7b..4f90e04 100644 (file)
@@ -95,6 +95,7 @@ econst OILS_SETTING_VOID_LOST_PROCESS_FEE_ON_CHECKIN    => 'circ.void_lost_proc_
 econst OILS_SETTING_RESTORE_OVERDUE_ON_LOST_RETURN      => 'circ.restore_overdue_on_lost_return';
 econst OILS_SETTING_LOST_IMMEDIATELY_AVAILABLE          => 'circ.lost_immediately_available';
 econst OILS_SETTING_BLOCK_HOLD_FOR_EXPIRED_PATRON       => 'circ.holds.expired_patron_block';
+econst OILS_SETTING_BLOCK_RENEW_FOR_EXPIRED_PATRON      => 'circ.renew.expired_patron_block';
 econst OILS_SETTING_GENERATE_OVERDUE_ON_LOST_RETURN     => 'circ.lost.generate_overdue_on_checkin';
 econst OILS_SETTING_MAX_DUPLICATE_HOLDS => 'circ.holds.max_duplicate_holds';
 
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.org-setting-circ-renew-expired.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.org-setting-circ-renew-expired.sql
new file mode 100644 (file)
index 0000000..18472ff
--- /dev/null
@@ -0,0 +1,24 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+INSERT INTO config.org_unit_setting_type 
+    (grp, name, datatype, label, description)
+VALUES (
+    'circ',
+    'circ.renew.expired_patron_block', 'bool',
+    oils_i18n_gettext(
+        'circ.renew.expired_patron_block',
+        'Circulation: Block renewal request if renewal recipient privileges have expired',
+        'coust',
+        'label'
+    ),
+    oils_i18n_gettext(
+        'circ.renew.expired_patron_block',
+        'If enabled, users within the org unit who are expired may not renew items.',
+        'coust',
+        'description'
+    )
+);
+
+COMMIT;