Bug 42489: Add RealTimeHoldsQueueUnallocated syspref

Adds a new system preference to control whether the real-time
holds queue processes only unallocated holds (faster, additive)
or rebuilds the entire queue for the affected biblio (current
behavior, more thorough).

Default is off (preserving current behavior).

Test plan:
1. Apply patch
2. Run:
   $ ktd --shell
  k$ perl installer/data/mysql/updatedatabase.pl
=> SUCCESS: New preference added
3. Verify RealTimeHoldsQueueUnallocated appears in
   Administration > System preferences > Circulation
4. Sign off :-D

Signed-off-by: Alex Carver [Acerock7] <alex@rcls.org>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
Tomás Cohen Arazi 2026-05-02 11:33:29 -03:00 committed by Pedro Amorim
parent 2431af105d
commit 5345fbf908
No known key found for this signature in database
GPG Key ID: 06B75BA7F3894D55
3 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,20 @@
use Modern::Perl;
use Koha::Installer::Output qw(say_success);
return {
bug_number => "42489",
description => "Add RealTimeHoldsQueueUnallocated system preference",
up => sub {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
$dbh->do(
q{
INSERT IGNORE INTO systempreferences (variable, value)
VALUES ('RealTimeHoldsQueueUnallocated', '0')
}
);
say_success( $out, "Added new system preference 'RealTimeHoldsQueueUnallocated'" );
},
};

View File

@ -692,6 +692,7 @@ INSERT INTO systempreferences ( `variable`, `value` ) VALUES
('QuoteOfTheDay',''),
('RandomizeHoldsQueueWeight','0'),
('RealTimeHoldsQueue', '0'),
('RealTimeHoldsQueueUnallocated', '0'),
('RecallsLog','1'),
('RecallsMaxPickUpDelay','7'),
('RecordLocalUseOnReturn','0'),

View File

@ -838,6 +838,13 @@ Circulation:
1: Enable
0: Disable
- updating the holds queue in real time.
-
- "When RealTimeHoldsQueue is enabled:"
- pref: RealTimeHoldsQueueUnallocated
choices:
1: only process unallocated holds
0: rebuild the entire queue for the affected biblio
- ". Processing only unallocated holds is faster but will not recalculate existing allocations."
-
- pref: AllowHoldItemTypeSelection
choices: