From 72deefe8cf4f2d1cc24e7577ef2d2b8a44945f18 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 2 Sep 2020 17:32:42 +0000 Subject: [PATCH] Bug 24197: (QA follow-up) Shorten syspref name to AddressForFailedEmailNotices If you define the address we use it, if not we fallback, it's not really a redirect, and that just makes the name longer. Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart --- ...24197-new_RedirectAddressForFailedOverdueNotices_syspref.sql | 2 +- installer/data/mysql/sysprefs.sql | 2 +- .../intranet-tmpl/prog/en/modules/admin/preferences/admin.pref | 2 +- misc/cronjobs/overdue_notices.pl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_24197-new_RedirectAddressForFailedOverdueNotices_syspref.sql b/installer/data/mysql/atomicupdate/bug_24197-new_RedirectAddressForFailedOverdueNotices_syspref.sql index 36e30f9881..42c601ea33 100644 --- a/installer/data/mysql/atomicupdate/bug_24197-new_RedirectAddressForFailedOverdueNotices_syspref.sql +++ b/installer/data/mysql/atomicupdate/bug_24197-new_RedirectAddressForFailedOverdueNotices_syspref.sql @@ -1 +1 @@ -INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('RedirectAddressForFailedOverdueNotices', '', NULL, 'Destination email for failed overdue notices. If left empty then it will fallback to the first defined address in the following list: Library ReplyTo, Library Email, ReplytoDefault and KohaAdminEmailAddress', 'free'); +INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('AddressForFailedOverdueNotices', '', NULL, 'Destination email for failed overdue notices. If left empty then it will fallback to the first defined address in the following list: Library ReplyTo, Library Email, ReplytoDefault and KohaAdminEmailAddress', 'free'); diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index c9d0ad2199..b9634398ee 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -9,6 +9,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: his own only, any within his branch or all','Choice'), ('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'), ('AdditionalFieldsInZ3950ResultSearch', '', NULL, 'Determines which MARC field/subfields are displayed in -Additional field- column in the result of a search Z3950', 'Free'), +('AddressForFailedOverdueNotices', '', NULL, 'Destination email for failed overdue notices. If left empty then it will fallback to the first defined address in the following list: Library ReplyTo, Library Email, ReplytoDefault and KohaAdminEmailAddress', 'free'), ('AddressFormat','us','us|de|fr','Choose format to display postal addresses', 'Choice'), ('AdlibrisCoversEnabled','0',NULL,'Display cover images in OPAC results and detail listing from Swedish retailer Adlibris.','YesNo'), ('AdlibrisCoversURL','http://www.adlibris.com/se/organisationer/showimagesafe.aspx',NULL,'Base URL for Adlibris cover image web service.','Free'), @@ -529,7 +530,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('QuoteOfTheDay','','intranet,opac','Enable or disable display of Quote of the Day on the OPAC and staff interface home page','multiple'), ('RandomizeHoldsQueueWeight','0',NULL,'if ON, the holds queue in circulation will be randomized, either based on all location codes, or by the location codes specified in StaticHoldsQueueWeight','YesNo'), ('RecordLocalUseOnReturn','0',NULL,'If ON, statistically record returns of unissued items as local use, instead of return','YesNo'), -('RedirectAddressForFailedOverdueNotices', '', NULL, 'Destination email for failed overdue notices. If left empty then it will fallback to the first defined address in the following list: Library ReplyTo, Library Email, ReplytoDefault and KohaAdminEmailAddress', 'free'), ('RefundLostOnReturnControl','CheckinLibrary','CheckinLibrary|ItemHomeBranch|ItemHoldingBranch','If a lost item is returned, choose which branch to pick rules for refunding.','Choice'), ('RenewAccruingItemWhenPaid','0','','If enabled, when the fines on an item accruing is paid off, attempt to renew that item. If the syspref "RenewalPeriodBase" is set to "due date", renewed items may still be overdue','YesNo'), ('RenewAccruingItemInOpac','0','','If enabled, when the fines on an item accruing is paid off in the OPAC via a payment plugin, attempt to renew that item. If the syspref "RenewalPeriodBase" is set to "due date", renewed items may still be overdue','YesNo'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref index 470d49d7a9..787516cc31 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref @@ -22,7 +22,7 @@ Administration: - "(Leave this field empty to send messages to their normal recipient.)" - - "Email address failed overdue notices are sent to: " - - pref: RedirectAddressForFailedOverdueNotices + - pref: AddressForFailedOverdueNotices class: email - "If left empty then it will fallback to the first defined address in the following list: Library ReplyTo, Library Email, ReplytoDefault and KohaAdminEmailAddress" - diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl index fd2ab40a6a..2d6a5bb397 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -455,7 +455,7 @@ foreach my $branchcode (@branches) { my $library = Koha::Libraries->find($branchcode); my $admin_email_address = $library->branchemail || C4::Context->preference('KohaAdminEmailAddress'); - my $branch_email_address = C4::Context->preference('RedirectAddressForFailedOverdueNotices') + my $branch_email_address = C4::Context->preference('AddressForFailedOverdueNotices') || $library->inbound_email_address; my @output_chunks; # may be sent to mail or stdout or csv file. -- 2.39.5