Bug 23173: Add ILLCheckAvailability syspref
authorAndrew Isherwood <andrew.isherwood@ptfs-europe.com>
Fri, 21 Jun 2019 09:17:03 +0000 (10:17 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 6 Apr 2020 10:03:27 +0000 (11:03 +0100)
This patch adds the new syspref "ILLCheckAvailability"

Sponsored-by: Public Health England
Signed-off-by: Niamh Walker-Headon <Niamh.Walker-Headon@tudublin.ie>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

installer/data/mysql/atomicupdate/bug_23173_add_ILLCheckAvailability_syspref.perl [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_23173_add_ILLCheckAvailability_syspref.perl b/installer/data/mysql/atomicupdate/bug_23173_add_ILLCheckAvailability_syspref.perl
new file mode 100644 (file)
index 0000000..a20ebfa
--- /dev/null
@@ -0,0 +1,9 @@
+$DBversion = 'XXX'; # will be replaced by the RM
+if( CheckVersion( $DBversion ) ) {
+    # you can use $dbh here like:
+    # $dbh->do( q| INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('ILLCheckAvailability', '0', 'If enabled, during the ILL request process third party sources will be checked for current availability', '', 'YesNo'); | );
+
+    # Always end with this (adjust the bug info)
+    SetVersion( $DBversion );
+    print "Upgrade to $DBversion done (Bug 23173 - Add ILLCheckAvailability syspref)\n";
+}
index 0006e1b..8f9fd9e 100644 (file)
@@ -231,6 +231,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
 ('HTML5MediaExtensions','webm|ogg|ogv|oga|vtt','','Media file extensions','free'),
 ('HTML5MediaYouTube',0,'Embed|Don\'t embed','YouTube links as videos','YesNo'),
 ('IdRef','0','','Disable/enable the IdRef webservice from the OPAC detail page.','YesNo'),
+('IllCheckAvailability', 0, '', 'If ON, during the ILL request process third party sources will be checked for current availability', 'YesNo'),
 ('IllLog', 0, '', 'If ON, log information about ILL requests', 'YesNo'),
 ('ILLModule','0','If ON, enables the interlibrary loans module.','','YesNo'),
 ('ILLModuleCopyrightClearance','','70|10','Enter text to enable the copyright clearance stage of request creation. Text will be displayed','Textarea'),
index bdd1aef..d9823c7 100644 (file)
@@ -863,6 +863,13 @@ Circulation:
                   yes: Enable
                   no: Disable
             - the circulation of ILL requested items
+        -
+            - pref: ILLCheckAvailability
+              default: 0
+              choices:
+                  yes: Check
+                  no: Don't check
+            - external sources for availability during the request process
     Fines Policy:
         -
             - pref: finesCalendar