From 2fa7de9a0babfef24c9ba39728e806d46c68d686 Mon Sep 17 00:00:00 2001 From: Emily Lamancusa 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 Signed-off-by: Lucas Gass Signed-off-by: Nick Clemens --- 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 a0404ac7075..ca7644caccb 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 b1aba01bcbd..e83983d3a81 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 d8ac0011e19..ef276b75b14 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.' - '
If left empty, it will fall back to the first defined address in the following list: library email, KohaAdminEmailAddress.' 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 17dc2620b8f..7581bf5ca81 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.' - '
If left empty, it will fall back to the first defined address in the following list: library email, KohaAdminEmailAddress.' diff --git a/t/db_dependent/Letters.t b/t/db_dependent/Letters.t index ade28f89ad5..9a07a5c8f91 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.30.2