From 9c5239646e98510a143e34b91bdacf0c092d25bd Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Wed, 8 Feb 2023 16:57:51 +0000 Subject: [PATCH] Bug 32911: atomicupdate file --- .../atomicupdate/bug_19822_partner_code.pl | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_19822_partner_code.pl diff --git a/installer/data/mysql/atomicupdate/bug_19822_partner_code.pl b/installer/data/mysql/atomicupdate/bug_19822_partner_code.pl new file mode 100755 index 0000000000..7d4fdf6ae4 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_19822_partner_code.pl @@ -0,0 +1,20 @@ +use Modern::Perl; + +return { + bug_number => "19822", + description => "Add system preferences for ILL Module", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + + my $xml_config = C4::Context->config("interlibrary_loans"); + my $existing_partner_code = $xml_config->{partner_code}; + + $dbh->do(qq{ + INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) + VALUES ('ILLPartnerCode', '$existing_partner_code', NULL, 'Patrons from this patron category will be used as partners to place ILL requests with', 'free'); + }); + + say $out "Moved value of partner_code in koha-conf.xml into new system preference 'ILLPartnerCode'"; + } +}; -- 2.30.2