From 7f6b6a5be31aeb385be69f941e8389423e6459b2 Mon Sep 17 00:00:00 2001 From: Lucas Montoya Date: Mon, 19 Jan 2026 22:25:49 -0300 Subject: [PATCH] Bug 41663: Update system preferences default values - Replace default values from '' to '0' for 'ILLHistoryCheck', 'ILLOpacUnauthenticatedRequest' and 'SeparateHoldingsByGroup' avoiding warning messages to be displayed in 'About Koha' page --- .../data/mysql/atomicupdate/bug_41663.pl | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_41663.pl diff --git a/installer/data/mysql/atomicupdate/bug_41663.pl b/installer/data/mysql/atomicupdate/bug_41663.pl new file mode 100755 index 0000000000..efdf03b84d --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_41663.pl @@ -0,0 +1,32 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_success say_info); + +return { + bug_number => "41663", + description => "Change default values for 'ILLHistoryCheck', + 'ILLOpacUnauthenticatedRequest','SeparateHoldingsByGroup' and 'RequireChoosingExistingAuthority' sysprefs", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + my @sysprefs = qw(ILLHistoryCheck ILLOpacUnauthenticatedRequest SeparateHoldingsByGroup); + + for my $syspref (@sysprefs) { + $dbh->do( + "UPDATE systempreferences SET value = 0 WHERE variable = ?", + undef, + $syspref + ); + say $out "Updated system preference default value for '$syspref'"; + } + + $dbh->do("UPDATE systempreferences SET value = 1 WHERE variable = 'RequireChoosingExistingAuthority'"); + say $out "Updated system preference default value for 'RequireChoosingExistingAuthority'"; + + say_success( + $out, + "Updated system preferences ILLHistoryCheck, ILLOpacUnauthenticatedRequest, SeparateHoldingsByGroup and RequireChoosingExistingAuthority" + ); + + }, +}; -- 2.52.0