From c1a137410065a46f6cd8d31a380d0da95c2169d6 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 Signed-off-by: Katrin Fischer --- 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 e300c00d51..d8dcdba7d2 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 2f4f577fbd..0d040f2fd9 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.' - '
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 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.' - '
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 4bc82f44fa..eff6e3fd40 100755 --- a/t/db_dependent/Letters.t +++ b/t/db_dependent/Letters.t @@ -538,7 +538,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 { @@ -548,7 +548,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.39.5