Bug 33192: Update AutoEmailPrimaryAddress to EmailFieldPrimary

This patch updates the database to reflect the new name for the
AutoEmailPrimaryAddress system preferences

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Martin Renvoize 2023-03-13 14:04:45 +00:00 committed by Tomas Cohen Arazi
parent 2ce97da0e7
commit 375bd68312
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
2 changed files with 15 additions and 1 deletions

View file

@ -0,0 +1,14 @@
use Modern::Perl;
return {
bug_number => "33192",
description => "Rename `AutoEmailPrimaryAddress` to `EmailFieldPrimary`",
up => sub {
my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)};
$dbh->do(q{
UPDATE systempreferences SET variable = 'EmailFieldPrimary', explanation = 'Defines the default email address field where patron email notices are sent.' WHERE variable = 'AutoEmailPrimaryAddress'
});
say $out "Updated system preference 'AutoEmailPrimaryAddress'";
},
};

View file

@ -80,7 +80,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('AutoCreateAuthorities','0',NULL,'Automatically create authorities that do not exist when cataloging records.','YesNo'),
('AutoCreditNumber', '', '', 'Automatically generate a number for account credits', 'Choice'),
('AutoEmailNewUser','0',NULL,'Send an email to newly created patrons.','YesNo'),
('AutoEmailPrimaryAddress','OFF','email|emailpro|B_email|cardnumber|OFF','Defines the default email address where \'Account Details\' emails are sent.','Choice'),
('AutoShareWithMana','subscription','','defines datas automatically shared with mana','multiple'),
('AutoLocation','0',NULL,'If ON, IP authentication is enabled, blocking access to the staff interface from unauthorized IP addresses','YesNo'),
('AutomaticItemReturn','1',NULL,'If ON, Koha will automatically set up a transfer of this item to its homebranch','YesNo'),
@ -210,6 +209,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('ElasticsearchIndexStatus_biblios', '0', 'Biblios index status', NULL, NULL),
('ElasticsearchMARCFormat', 'ISO2709', 'ISO2709|ARRAY', 'Elasticsearch MARC format. ISO2709 format is recommended as it is faster and takes less space, whereas array is searchable.', 'Choice'),
('ElasticsearchCrossFields', '1', '', 'Enable "cross_fields" option for searches using Elastic search.', 'YesNo'),
('EmailFieldPrimary','OFF','email|emailpro|B_email|cardnumber|OFF','Defines the default email address field where patron email notices are sent.','Choice'),
('EmailAddressForPatronRegistrations', '', '', ' If you choose EmailAddressForPatronRegistrations you have to enter a valid email address: ', 'free'),
('EmailAddressForSuggestions','','',' If you choose EmailAddressForSuggestions you have to enter a valid email address: ','free'),
('emailLibrarianWhenHoldIsPlaced','0',NULL,'If ON, emails the librarian whenever a hold is placed','YesNo'),