Bug 15131: Instroduce AllowItemsOnHoldCheckoutSCO syspref
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 11 Jul 2016 15:47:49 +0000 (12:47 -0300)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 21 Oct 2016 17:27:06 +0000 (17:27 +0000)
This patch introduces a new syspref AllowItemsOnHoldCheckoutSCO, so the current
AllowItemsOnHoldCheckout syspref can be decoupled for the SCO module, giving
the library more flexibility.

During upgrade, it gets its value from the original AllowItemsOnHoldCheckout syspref.

Sponsored-by: NEKLS

Signed-off-by: George <george@nekls.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

installer/data/mysql/atomicupdate/bug_15131_AllowItemsOnHoldCheckoutSCO.sql [new file with mode: 0644]
installer/data/mysql/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref

diff --git a/installer/data/mysql/atomicupdate/bug_15131_AllowItemsOnHoldCheckoutSCO.sql b/installer/data/mysql/atomicupdate/bug_15131_AllowItemsOnHoldCheckoutSCO.sql
new file mode 100644 (file)
index 0000000..63849f2
--- /dev/null
@@ -0,0 +1,19 @@
+INSERT IGNORE INTO systempreferences ( variable, value, options, explanation, type )
+    SELECT 'AllowItemsOnHoldCheckoutSCO',
+         COALESCE(value,0),
+         '',
+         'Do not generate RESERVE_WAITING and RESERVED warning in the SCO module when checking out items reserved to someone else. This allows self checkouts for those items.',
+         'YesNo'
+    FROM systempreferences WHERE variable='AllowItemsOnHoldCheckout';
+
+-- $DBversion = '16.06.00.XXX';
+-- if ( CheckVersion($DBversion) ) {
+--     $dbh->do(q{
+--         INSERT IGNORE INTO systempreferences ( variable, value, options, explanation, type )
+--          SELECT 'AllowItemsOnHoldCheckoutSCO',COALESCE(value,0),'','Do not generate RESERVE_WAITING and RESERVED warning in the SCO module when checking out items reserved to someone else. This allows self checkouts for those items.','YesNo'
+--          FROM systempreferences WHERE variable='AllowItemsOnHoldCheckout';
+--     });
+
+--     print "Upgrade to $DBversion done (Bug 15131: Give SCO separate control for AllowItemsOnHoldCheckout)\n";
+--     SetVersion($DBversion);
+-- }
index 5a90b7c..3caac49 100644 (file)
@@ -22,6 +22,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
 ('AllowHoldsOnDamagedItems','1','','Allow hold requests to be placed on damaged items','YesNo'),
 ('AllowHoldsOnPatronsPossessions','1',NULL,'Allow holds on records that patron have items of it','YesNo'),
 ('AllowItemsOnHoldCheckout','0','','Do not generate RESERVE_WAITING and RESERVED warning when checking out items reserved to someone else. This allows self checkouts for those items.','YesNo'),
+('AllowItemsOnHoldCheckoutSCO','0','','Do not generate RESERVE_WAITING and RESERVED warning in the SCO module when checking out items reserved to someone else. This allows self checkouts for those items.','YesNo'),
 ('AllowMultipleCovers','0','1','Allow multiple cover images to be attached to each bibliographic record.','YesNo'),
 ('AllowMultipleIssuesOnABiblio',1,'Allow/Don\'t allow patrons to check out multiple items from one biblio','','YesNo'),
 ('AllowNotForLoanOverride','0','','If ON, Koha will allow the librarian to loan a not for loan item.','YesNo'),
index fc9706b..1f6edef 100644 (file)
@@ -169,6 +169,12 @@ Circulation:
                   no: "Don't allow"
             - checkouts of items reserved to someone else. If allowed do not generate RESERVE_WAITING and RESERVED warning. This allows self checkouts for those items.
         -
+            - pref: AllowItemsOnHoldCheckoutSCO
+              choices:
+                  yes: Allow
+                  no: "Don't allow"
+            - checkouts of items reserved to someone else in the SCO module. If allowed do not generate RESERVE_WAITING and RESERVED warning. This allows self checkouts for those items.
+        -
             - pref: AllFinesNeedOverride
               choices:
                   yes: Require