From 940010b2bdcf4bfecd05ac5687953047606a3d98 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 Signed-off-by: Kyle M Hall --- 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 fe92bcb2e8..629669045b 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -113,6 +113,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 6a6eae9ef6..22343430ed 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -11405,6 +11405,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 d9649c528a..0f3b66ccf0 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.39.5