Bug 39802: Atomic update file

Sponsored-by: MAIN Library Alliance
Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Nick Clemens 2025-08-06 18:01:50 +00:00 committed by Lucas Gass
parent f5377250f5
commit 6cf5b8d509
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,25 @@
use Modern::Perl;
use Koha::Installer::Output qw(say_warning say_success say_info);
return {
bug_number => "39802",
description => "Add LostChargesControl system preference",
up => sub {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
# Get the existing value from the CircControl system preference
my ($circcontrol) = $dbh->selectrow_array(
q|
SELECT value FROM systempreferences WHERE variable='CircControl';
|
);
$dbh->do(
q{
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
('LostChargesControl',?,'PickupLibrary|PatronLibrary|ItemHomeLibrary','Specify the agency that controls the charges for items being marked lost','Choice')
}, undef, $circcontrol
);
say $out "Added new system preference 'LostChargesControl'";
},
};