Bug 12802: Update system preference

Allow the EmailFieldPrimary preference to accept multiple selections

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Axelle Clarisse <axelle.clarisse@univ-amu.fr>
Signed-off-by: Mathieu Saby <mathsabypro@gmail.com>
Signed-off-by: Aleisha Amohia <aleisha@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Martin Renvoize 2023-12-19 17:08:27 +00:00 committed by Katrin Fischer
parent ab2aa5415c
commit 49271317fa
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
3 changed files with 16 additions and 2 deletions

View File

@ -0,0 +1,14 @@
use Modern::Perl;
return {
bug_number => '12802',
description => 'Change type of system preference EmailFieldPrimary to multiple',
up => sub {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
$dbh->do("UPDATE systempreferences SET type='multiple' WHERE variable='EmailFieldPrimary'");
say $out "Updated system preference 'EmailFieldPrimary' to have type 'multiple'";
},
};

View File

@ -229,7 +229,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('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'),
('EmailFieldPrecedence','email|emailpro|B_email','','Ordered list of patron email fields to use when AutoEmailPrimaryAddress is set to first valid','multiple'),
('EmailFieldPrimary','OFF','email|emailpro|B_email|cardnumber|OFF','Defines the default email address field where patron email notices are sent.','Choice'),
('EmailFieldPrimary','OFF','email|emailpro|B_email|cardnumber|OFF','Defines the default email address field where patron email notices are sent.','multiple'),
('emailLibrarianWhenHoldIsPlaced','0',NULL,'If ON, emails the librarian whenever a hold is placed','YesNo'),
('EmailOverduesNoEmail','1',NULL,'Send send overdues of patrons without email address to staff','YesNo'),
('EmailPatronRegistrations', '0', '0|EmailAddressForPatronRegistrations|BranchEmailAddress|KohaAdminEmailAddress', 'Choose email address that new patron registrations will be sent to: ', 'Choice'),

View File

@ -194,7 +194,7 @@ Patrons:
- "Use the patron's"
- pref: EmailFieldPrimary
default: "OFF"
choices:
multiple:
email: primary email
emailpro: secondary email
B_email: alternate email