From 9401ef74cd04cda7117edf55297bdc469d376063 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Mon, 12 Aug 2024 23:57:16 +0000 Subject: [PATCH] Bug 37598: Add EmailRecipientField syspref --- ...ug_37598_-_add_EmailRecipientField_syspref.pl | 16 ++++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../en/modules/admin/preferences/patrons.pref | 9 ++++++++- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100755 installer/data/mysql/atomicupdate/bug_37598_-_add_EmailRecipientField_syspref.pl diff --git a/installer/data/mysql/atomicupdate/bug_37598_-_add_EmailRecipientField_syspref.pl b/installer/data/mysql/atomicupdate/bug_37598_-_add_EmailRecipientField_syspref.pl new file mode 100755 index 0000000000..cf081c5fb7 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_37598_-_add_EmailRecipientField_syspref.pl @@ -0,0 +1,16 @@ +use Modern::Perl; + +return { + bug_number => "37598", + description => "Ability to use the BCC field for sending notices to multiple addresses, rather than the To field", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{ INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('EmailRecipientField', 'to', 'to|cc|bcc', 'If sending to a selection of email addresses, choose which recipient field should be used in the email', 'Choice') } + ); + + say $out "Added system preference 'EmailRecipientField'"; + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 585d7a5d8d..37a8550edf 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -256,6 +256,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('EmailPatronRegistrations', '0', '0|EmailAddressForPatronRegistrations|BranchEmailAddress|KohaAdminEmailAddress', 'Choose email address that new patron registrations will be sent to: ', 'Choice'), ('EmailPatronWhenHoldIsPlaced', '0', NULL, 'Email patron when a hold has been placed for them', 'YesNo'), ('EmailPurchaseSuggestions','0','0|EmailAddressForSuggestions|BranchEmailAddress|KohaAdminEmailAddress','Choose email address that new purchase suggestions will be sent to: ','Choice'), +('EmailRecipientField', 'to', 'to|cc|bcc', 'If sending to a selection of email addresses, choose which recipient field should be used for the email', 'Choice'), ('EmailSMSSendDriverFromAddress', '', NULL, 'Email SMS send driver from address override', 'Free'), ('EnableAdvancedCatalogingEditor','0',NULL,'Enable the Rancor advanced cataloging editor','YesNo'), ('EnableBooking','1',NULL,'If enabled, activate every functionalities related with Bookings module','YesNo'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref index d94bc0dd4b..84e0431c3f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref @@ -229,7 +229,14 @@ Patrons: email: primary email emailpro: secondary email B_email: alternate email - - . + - "using the" + - pref: EmailRecipientField + choices: + to: "To" + cc: "Copy (CC)" + bcc: "Blind copy (BCC)" + - "recipient field." + - '
NOTE: When EmailRecipientField is set to "CC" or "BCC", the "first valid" email address will be used in the "To" field, as set in EmailFieldPrecedence.' - - pref: TalkingTechItivaPhoneNotification choices: -- 2.39.5