From 97af563b0d77a8043a9ac3c378f1dff9a690f9fc Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 24 Jun 2016 11:34:01 -0300 Subject: [PATCH] Bug 14642: Add HoldsLog syspref This patch introduces a new syspref 'HoldsLog' which is to be used for controlling holds actions logs. Sponsored-by: NEKLS Signed-off-by: Jonathan Druart --- .../data/mysql/atomicupdate/bug_14642_holds_logging.sql | 13 +++++++++++++ installer/data/mysql/sysprefs.sql | 1 + .../prog/en/modules/admin/preferences/logs.pref | 6 ++++++ 3 files changed, 20 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_14642_holds_logging.sql diff --git a/installer/data/mysql/atomicupdate/bug_14642_holds_logging.sql b/installer/data/mysql/atomicupdate/bug_14642_holds_logging.sql new file mode 100644 index 0000000..aca2ee3 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_14642_holds_logging.sql @@ -0,0 +1,13 @@ +INSERT IGNORE INTO systempreferences ( variable, value, options, explanation, type ) VALUES +('HoldsLog','1',NULL,'If ON, log create/cancel/suspend/resume actions on holds.','YesNo'); + +-- $DBversion = "16.06.00.XXX"; +-- if ( CheckVersion($DBversion) ) { +-- $dbh->do(q{ +-- INSERT IGNORE INTO systempreferences ( variable, value, options, explanation, type ) VALUES +-- ('HoldsLog','1',NULL,'If ON, log create/cancel/suspend/resume actions on holds.','YesNo'); +-- }); + +-- print "Upgrade to $DBversion done (Bug 14642: Add logging of hold modifications)\n"; +-- SetVersion($DBversion); +-- } diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 46f89d5..3922b43 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -168,6 +168,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('HighlightOwnItemsOnOPAC','0','','If on, and a patron is logged into the OPAC, items from his or her home library will be emphasized and shown first in search results and item details.','YesNo'), ('HighlightOwnItemsOnOPACWhich','PatronBranch','PatronBranch|OpacURLBranch','Decides which branch\'s items to emphasize. If PatronBranch, emphasize the logged in user\'s library\'s items. If OpacURLBranch, highlight the items of the Apache var BRANCHCODE defined in Koha\'s Apache configuration file.','Choice'), ('HoldFeeMode','not_always','always|not_always','Set the hold fee mode','Choice'), +('HoldsLog','1',NULL,'If ON, log create/cancel/suspend/resume actions on holds.','YesNo'), ('HoldsQueueSkipClosed', '0', NULL, 'If enabled, any libraries that are closed when the holds queue is built will be ignored for the purpose of filling holds.', 'YesNo'), ('HoldsToPullStartDate','2',NULL,'Set the default start date for the Holds to pull list to this many days ago','Integer'), ('HomeOrHoldingBranch','holdingbranch','holdingbranch|homebranch','Used by Circulation to determine which branch of an item to check with independent branches on, and by search to determine which branch to choose for availability ','Choice'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref index 8d6c4c8..4aa5790 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref @@ -31,6 +31,12 @@ Logging: off: "Don't log" - when fines are charged, paid, or forgiven. - + - pref: HoldsLog + choices: + on: Log + off: "Don't log" + - any actions on holds (create, cancel, suspend, resume, etc). + - - pref: IssueLog choices: on: Log -- 2.8.1