From 375bd6831226a29b0972b7ad752ddb596fa6214c Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 13 Mar 2023 14:04:45 +0000 Subject: [PATCH] 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 Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- installer/data/mysql/atomicupdate/bug_33192.pl | 14 ++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug_33192.pl diff --git a/installer/data/mysql/atomicupdate/bug_33192.pl b/installer/data/mysql/atomicupdate/bug_33192.pl new file mode 100644 index 0000000000..4efbf44813 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_33192.pl @@ -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'"; + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 4f72102516..ab53e04b0c 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -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'), -- 2.39.5