From 5c3c77590531383012d5b2994fa7e6a7dd64c39e Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 11 Jul 2016 12:47:49 -0300 Subject: [PATCH] Bug 15131: Instroduce AllowItemsOnHoldCheckoutSCO syspref 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 --- .../bug_15131_AllowItemsOnHoldCheckoutSCO.sql | 19 +++++++++++++++++++ installer/data/mysql/sysprefs.sql | 1 + .../en/modules/admin/preferences/circulation.pref | 6 ++++++ 3 files changed, 26 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_15131_AllowItemsOnHoldCheckoutSCO.sql diff --git a/installer/data/mysql/atomicupdate/bug_15131_AllowItemsOnHoldCheckoutSCO.sql b/installer/data/mysql/atomicupdate/bug_15131_AllowItemsOnHoldCheckoutSCO.sql new file mode 100644 index 0000000..63849f2 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_15131_AllowItemsOnHoldCheckoutSCO.sql @@ -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); +-- } diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index c9a7c7e..bf5eec5 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -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'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref index a3ce0b3..d5e56b0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -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 -- 2.9.0