From d25a585f07c22ddb17793ae67aa5b36904b56735 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 21 Apr 2015 11:17:14 -0400 Subject: [PATCH] Bug 11747 - Add system preference DefaultToLoggedInLibraryOverdueTriggers Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart Signed-off-by: Jonathan Druart Amended patch: INSERT IGNORE INTO + msg --- installer/data/mysql/sysprefs.sql | 1 + installer/data/mysql/updatedatabase.pl | 11 +++++++++++ .../prog/en/modules/admin/preferences/admin.pref | 7 +++++++ 3 files changed, 19 insertions(+) diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index f49b77b..6cd5cba 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -110,6 +110,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('defaultSortOrder','dsc','asc|dsc|az|za','Specify the default sort order','Choice'), ('DefaultToLoggedInLibraryCircRules', '0', NULL , 'If enabled, circ rules editor will default to the logged in library''s rules, rather than the ''all libraries'' rules.', 'YesNo'), ('DefaultToLoggedInLibraryNoticesSlips', '0', NULL , 'If enabled,slips and notices editor will default to the logged in library''s rules, rather than the ''all libraries'' rules.', 'YesNo'), +('DefaultToLoggedInLibraryOverdueTriggers', '0', NULL , 'If enabled, overdue status triggers editor will default to the logged in library''s rules, rather than the ''default'' rules.', 'YesNo'), ('delimiter',';',';|tabulation|,|/|\\|#||','Define the default separator character for exporting reports','Choice'), ('Display856uAsImage','OFF','OFF|Details|Results|Both','Display the URI in the 856u field as an image, the corresponding Staff Client XSLT option must be on','Choice'), ('DisplayClearScreenButton','0','','If set to ON, a clear screen button will appear on the circulation page.','YesNo'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 6da0a11..e46c661 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -11110,6 +11110,17 @@ if(CheckVersion($DBversion)) { SetVersion($DBversion); } +$DBversion = "3.19.00.XXX"; +if(CheckVersion($DBversion)) { + $dbh->do(q{ + INSERT IGNORE INTO systempreferences ( variable, value, options, explanation, type ) + VALUES ('DefaultToLoggedInLibraryOverdueTriggers', '0', NULL, 'If enabled, overdue status triggers editor will default to the logged in library''s rules, rather than the ''default'' rules.', 'YesNo') + }); + + print "Upgrade to $DBversion done (Bug 11747 - add pref DefaultToLoggedInLibraryOverdueTriggers)\n"; + SetVersion($DBversion); +} + # DEVELOPER PROCESS, search for anything to execute in the db_update directory # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref index fe41e6a..5681356 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref @@ -64,6 +64,13 @@ Administration: yes: "logged in library's" no: "all libraries" - notices and slips by default. + - + - When editing overdue notice/status triggers show the + - pref: DefaultToLoggedInLibraryOverdueTriggers + choices: + yes: "logged in library's" + no: "all libraries" + - rules by default. Login options: - - Automatically log out users after -- 2.1.0