Bugzilla – Attachment 148054 Details for
Bug 29046
Allow libraries to specify email order for "AutoEmailPrimaryAddress"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29046: Add 'EmailFieldPrecidence' preference
Bug-29046-Add-EmailFieldPrecidence-preference.patch (text/plain), 3.88 KB, created by
Martin Renvoize
on 2023-03-10 10:48:58 UTC
(
hide
)
Description:
Bug 29046: Add 'EmailFieldPrecidence' preference
Filename:
MIME Type:
Creator:
Martin Renvoize
Created:
2023-03-10 10:48:58 UTC
Size:
3.88 KB
patch
obsolete
>From 0dfde71eff78477c834dfc1d15334bcf82b35aad Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 10 Mar 2023 10:46:51 +0000 >Subject: [PATCH] Bug 29046: Add 'EmailFieldPrecidence' preference > >This patch adds a new EmailFieldPrecidence systempreference to allow >users to set the precicence in which patron email fields should be used >for communications. >--- > installer/data/mysql/atomicupdate/bug_29046.pl | 16 ++++++++++++++++ > installer/data/mysql/mandatory/sysprefs.sql | 1 + > .../en/modules/admin/preferences/patrons.pref | 6 ++++++ > 3 files changed, 23 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_29046.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_29046.pl b/installer/data/mysql/atomicupdate/bug_29046.pl >new file mode 100644 >index 0000000000..db6ae80dbb >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_29046.pl >@@ -0,0 +1,16 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "29046", >+ description => "Allow setting first_valid_email_address field precidence order", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ >+ $dbh->do(q{ >+ INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES >+ ('EmailFieldPrecidence', 'email|emailpro|B_email', NULL, 'Ordered list of patron email fields to use when AutoEmailPrimaryAddress is set to first valid', 'multi') >+ }); >+ say $out "Added new system preference 'EmailFieldPrecidence'"; >+ }, >+}; >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index b12f1ce170..d4adcef476 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -210,6 +210,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('ElasticsearchCrossFields', '1', '', 'Enable "cross_fields" option for searches using Elastic search.', 'YesNo'), > ('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'), >+('EmailFieldPrecidence','email|emailpro|B_email','','Ordered list of patron email fields to use when AutoEmailPrimaryAddress is set to first valid','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'), >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 685a09b2e6..c4c11104ce 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 >@@ -183,6 +183,12 @@ Patrons: > cardnumber: cardnumber as > "OFF": first valid > - "patron email address for sending out emails." >+ - >+ - Use the following patron email fields in order of highest precidence first >+ - pref: EmailFieldPrecidence >+ class: multi >+ - when selecting which email address to use to send patron notices. >+ - '<br><strong>NOTE:</strong> This preference only takes effect if <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=AutoEmailPrimaryAddress">AutoEmailPrimaryAddress</a> is set to <strong>first valid<strong>' > - > - pref: TalkingTechItivaPhoneNotification > choices: >-- >2.39.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 29046
:
148054
|
148055
|
148056
|
148057
|
148145
|
148146
|
148147
|
148155
|
149385
|
149386
|
149387
|
149959
|
149960
|
149961
|
149962
|
149963
|
150124
|
150125
|
150126
|
150127
|
150128
|
150129