Bug 30728: Add RealTimeHoldsQueue syspref
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 10 May 2022 17:17:17 +0000 (14:17 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 13 May 2022 08:17:45 +0000 (22:17 -1000)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
installer/data/mysql/atomicupdate/bug_30728.pl [new file with mode: 0755]
installer/data/mysql/mandatory/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref

diff --git a/installer/data/mysql/atomicupdate/bug_30728.pl b/installer/data/mysql/atomicupdate/bug_30728.pl
new file mode 100755 (executable)
index 0000000..320d670
--- /dev/null
@@ -0,0 +1,15 @@
+use Modern::Perl;
+
+return {
+    bug_number  => "30728",
+    description => "Allow opting out of real-time holds queue updating possible",
+    up => sub {
+        my ($args) = @_;
+        my ($dbh) = @$args{qw(dbh)};
+
+        $dbh->do(q{
+            INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
+            ('RealTimeHoldsQueue', '0', NULL, 'Enable updating the holds queue in real time.', 'YesNo')
+        });
+    },
+};
index d8f6f09..adbc01c 100644 (file)
@@ -556,6 +556,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
 ('QueryWeightFields','1',NULL,'If ON, enables field weighting','YesNo'),
 ('QuoteOfTheDay','','intranet,opac','Enable or disable display of Quote of the Day on the OPAC and staff interface home page','multiple'),
 ('RandomizeHoldsQueueWeight','0',NULL,'if ON, the holds queue in circulation will be randomized, either based on all location codes, or by the location codes specified in StaticHoldsQueueWeight','YesNo'),
+('RealTimeHoldsQueue', '1', NULL, 'Enable updating the holds queue in real', 'YesNo')
 ('RecallsLog','1',NULL,'If ON, log create/cancel/expire/fulfill actions on recalls','YesNo'),
 ('RecallsMaxPickUpDelay','7',NULL,'Define the maximum time a recall can be awaiting pickup','Integer'),
 ('RecordLocalUseOnReturn','0',NULL,'If ON, statistically record returns of unissued items as local use, instead of return','YesNo'),
index 750e731..6810f25 100644 (file)
@@ -682,6 +682,12 @@ Circulation:
                   virtual: "'virtual' priorities, where each group is numbered separately"
             - "."
         -
+            - pref: RealTimeHoldsQueue
+              choices:
+                  1: Enable
+                  0: Disable
+            - updating the holds queue in real time.
+        -
             - pref: AllowHoldItemTypeSelection
               choices:
                   1: Allow