From 00ecc9b1927f58a4ff4c499298918aa29026535f 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 | 8 ++++++++ 3 files changed, 25 insertions(+) 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 1a7cd033e90..99e5a08b5bc 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -241,6 +241,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'), ('EnableBorrowerFiles','0',NULL,'If enabled, allows librarians to upload and attach arbitrary files to a borrower record.','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 3db000432f9..6a30b24c1e3 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 @@ -219,6 +219,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.2