From fd78cac85ac4efbe2c82583e17be6c880ef1555a 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 00000000000..cf081c5fb7a --- /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 35a5d15dd8f..95653617237 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -253,6 +253,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', '', '', 'Email SMS send driver from address override', 'Free'), ('EnableAdvancedCatalogingEditor','0','','Enable the Rancor advanced cataloging editor','YesNo'), ('EnableBooking','1',NULL,'If enabled, activate every functionnalities 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 d94bc0dd4bc..84e0431c3f7 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