Bug 20747: DB Rev

This patch adds a DB rev to update the system preference in existing installations.

 # Please enter the commit message for your changes. Lines starting

Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Lisette Scheer 2025-04-21 16:01:54 +00:00 committed by Katrin Fischer
parent e061d0a718
commit ea67f54de1
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,25 @@
use Modern::Perl;
return {
bug_number => "20747",
description => "Allow LocalHoldsPriority to fill by hierarchical groups system rather than individual library ",
up => sub {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
my $local_holds_priority = C4::Context->preference('LocalHoldsPriority');
# Do you stuffs here
$dbh->do(
q{
UPDATE systempreferences
SET options='GiveLibrary|None|GiveLibraryGroup|GiveLibraryAndGroup',
value=CASE value WHEN '1' THEN 'GiveLibrary' ELSE 'None' END,
type="Choice"
WHERE variable="LocalHoldsPriority"
'Enables the LocalHoldsPriority feature', 'None' 'Choice'),
},
);
say $out "Updated system preference 'LocalHoldsPriority'";
},
};