Bugzilla – Attachment 164009 Details for
Bug 36409
System preference name consistency - change EMail to Email for SerialsDefaultEMailAddress and AcquisitionsDefaultEMailAddress
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36409: Fix capitalization for AcquisitionsDefaultEMailAddress and SerialsDefaultEMailAddress
Bug-36409-Fix-capitalization-for-AcquisitionsDefau.patch (text/plain), 8.16 KB, created by
Emily Lamancusa (emlam)
on 2024-03-27 15:11:29 UTC
(
hide
)
Description:
Bug 36409: Fix capitalization for AcquisitionsDefaultEMailAddress and SerialsDefaultEMailAddress
Filename:
MIME Type:
Creator:
Emily Lamancusa (emlam)
Created:
2024-03-27 15:11:29 UTC
Size:
8.16 KB
patch
obsolete
>From 023c0b486f43c24b470055ed0b6b526875e38d54 Mon Sep 17 00:00:00 2001 >From: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >Date: Wed, 27 Mar 2024 10:51:34 -0400 >Subject: [PATCH] Bug 36409: Fix capitalization for > AcquisitionsDefaultEMailAddress and SerialsDefaultEMailAddress > >Replace all instances in files with correct capitalization for the >sysprefs: >SerialsDefaultEMailAddress >AcquisitionsDefaultEMailAddress > >Test plan: >1. Apply patch >2. Run database update >3. Go to Administration > System Preferences > Acquisitions >-> Confirm correct capitalization for AcquisitionsDefaultEmailAddress > (should be "Email", not "EMail") >4. Go to Administration > System Preferences > Serials >-> Confirm correct capitalization for SerialsDefaultEmailAddress > (should be "Email", not "EMail") >5. Use git grep to confirm no remaining instances of "EMail" in the code > (other than the new dbrev, original dbrev and original release notes) > e.g. git grep --files-with-matches "EMail" >6. Confirm the test plan for Bug 20755 still works >--- > C4/Letters.pm | 4 ++-- > installer/data/mysql/mandatory/sysprefs.sql | 4 ++-- > .../prog/en/modules/admin/preferences/acquisitions.pref | 2 +- > .../prog/en/modules/admin/preferences/serials.pref | 2 +- > t/db_dependent/Letters.t | 8 ++++---- > 5 files changed, 10 insertions(+), 10 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index a0404ac707..ca7644cacc 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -495,8 +495,8 @@ sub SendAlerts { > ), > from => ( > $type eq 'claimissues' >- ? C4::Context->preference('SerialsDefaultEMailAddress') >- : C4::Context->preference('AcquisitionsDefaultEMailAddress') >+ ? C4::Context->preference('SerialsDefaultEmailAddress') >+ : C4::Context->preference('AcquisitionsDefaultEmailAddress') > ) > || $library->branchemail > || C4::Context->preference('KohaAdminEmailAddress'), >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index b1aba01bcb..e83983d3a8 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -7,7 +7,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('AcqItemSetSubfieldsWhenReceived','','','Upon receiving items, update their subfields if they were created when placing an order (e.g. o=5|a="foo bar")','Free'), > ('AcquisitionDetails', '1', '', 'Hide/Show acquisition details on the biblio detail page.', 'YesNo'), > ('AcquisitionLog','0',NULL,'If ON, log acquisitions activity','YesNo'), >-('AcquisitionsDefaultEMailAddress', '', NULL, 'Default email address that acquisition notices are sent from', 'Free'), >+('AcquisitionsDefaultEmailAddress', '', NULL, 'Default email address that acquisition notices are sent from', 'Free'), > ('AcquisitionsDefaultReplyTo', '', NULL, "Default email address used as reply-to for notices sent by the acquisitions module.", 'Free'), > ('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: their own only, any within their branch, or all','Choice'), > ('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'), >@@ -692,7 +692,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('SendAllEmailsTo','',NULL,'All emails will be redirected to this email if it is not empty','free'), > ('SeparateHoldings','0',NULL,'Separate current branch holdings from other holdings','YesNo'), > ('SeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings','Choice'), >-('SerialsDefaultEMailAddress', '', NULL, 'Default email address used as reply-to for notices sent by the serials module.', 'Free'), >+('SerialsDefaultEmailAddress', '', NULL, 'Default email address used as reply-to for notices sent by the serials module.', 'Free'), > ('SerialsDefaultReplyTo', '', NULL, 'Default email address that serials notices are sent from.', 'Free'), > ('SerialsSearchResultsLimit', NULL, NULL, 'Serials search results limit', 'integer'), > ('SessionRestrictionByIP','1','Check for change in remote IP address for session security. Disable only when remote IP address changes frequently.','','YesNo'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref >index d8ac0011e1..ef276b75b1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref >@@ -128,7 +128,7 @@ Acquisitions: > class: email > - > - Use the from email address >- - pref: AcquisitionsDefaultEMailAddress >+ - pref: AcquisitionsDefaultEmailAddress > class: email > - 'when sending acquisitions order and claim notices.' > - '<br>If left empty, it will fall back to the first defined address in the following list: library email, <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=KohaAdminEmailAddress">KohaAdminEmailAddress</a>.' >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref >index 17dc2620b8..7581bf5ca8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref >@@ -72,7 +72,7 @@ Serials: > Notifications: > - > - Use the from email address >- - pref: SerialsDefaultEMailAddress >+ - pref: SerialsDefaultEmailAddress > class: email > - 'when sending serial claim notices.' > - '<br>If left empty, it will fall back to the first defined address in the following list: library email, <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=KohaAdminEmailAddress">KohaAdminEmailAddress</a>.' >diff --git a/t/db_dependent/Letters.t b/t/db_dependent/Letters.t >index ade28f89ad..9a07a5c8f9 100755 >--- a/t/db_dependent/Letters.t >+++ b/t/db_dependent/Letters.t >@@ -537,7 +537,7 @@ t::lib::Mocks::mock_preference( 'KohaAdminEmailAddress', 'library@domain.com' ); > ); > > # SendAlerts should use specific email addresses if set >- t::lib::Mocks::mock_preference( 'AcquisitionsDefaultEMailAddress', 'acq-default@domain.com' ); >+ t::lib::Mocks::mock_preference( 'AcquisitionsDefaultEmailAddress', 'acq-default@domain.com' ); > t::lib::Mocks::mock_preference( 'AcquisitionsDefaultReplyTo', 'acq-replyto@domain.com' ); > > warning_like { >@@ -547,7 +547,7 @@ t::lib::Mocks::mock_preference( 'KohaAdminEmailAddress', 'library@domain.com' ); > "SendAlerts is using the mocked send_or_die routine (orderacquisition)"; > is( > $email_object->email->header('From'), 'acq-default@domain.com', >- "AcquisitionsDefaultEMailAddress is used to sent acq notification" >+ "AcquisitionsDefaultEmailAddress is used to sent acq notification" > ); > is( > $email_object->email->header('Reply-To'), 'acq-replyto@domain.com', >@@ -773,7 +773,7 @@ subtest 'SendAlerts - claimissue' => sub { > ); > } > >- t::lib::Mocks::mock_preference( 'SerialsDefaultEMailAddress', 'ser-default@domain.com' ); >+ t::lib::Mocks::mock_preference( 'SerialsDefaultEmailAddress', 'ser-default@domain.com' ); > t::lib::Mocks::mock_preference( 'SerialsDefaultReplyTo', 'ser-replyto@domain.com' ); > > { >@@ -782,7 +782,7 @@ subtest 'SendAlerts - claimissue' => sub { > qr|Fake send_or_die|, > "SendAlerts is using the mocked send_or_die routine (claimissues)"; > is( $email_object->email->header('From'), >- 'ser-default@domain.com', "SerialsDefaultEMailAddress is used to serial claim issue" ); >+ 'ser-default@domain.com', "SerialsDefaultEmailAddress is used to serial claim issue" ); > is( $email_object->email->header('Reply-To'), > 'ser-replyto@domain.com', "SerialsDefaultReplyTo is used to sent serial claim issue" ); > >-- >2.34.1
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 36409
:
164008
|
164009
|
164013
|
164014
|
164188
|
164189