From 9f7a8bad92ad22fec419e0ee4a63f1b8f411f589 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Thu, 31 Oct 2024 02:30:04 +0000 Subject: [PATCH] Bug 38306: Only print EnhancedMessagingPreferences warning if run with verbose This enhancement will amend the automatic_renewals.pl script to only print a warning about the EnhancedMessagingPreferences system preference being disabled if the script was run with verbose. To test: 1. Disable EnhancedMessagingPreferences 2. Run misc/cronjobs/automatic_renewals.pl 3. Notice the warning is printed 4. Apply the patch and restart services 5. Run misc/cronjobs/automatic_renewals.pl and notice the warning is not printed 6. Run misc/cronjobs/automatic_renewals.pl --verbose and notice the warning is printed 7. Enable EnhancedMessagingPreferences 8. Run misc/cronjobs/automatic_renewals.pl and notice the warning is not printed Sponsored-by: Catalyst IT --- misc/cronjobs/automatic_renewals.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/cronjobs/automatic_renewals.pl b/misc/cronjobs/automatic_renewals.pl index 48d18b72e4a..22b7f3cd492 100755 --- a/misc/cronjobs/automatic_renewals.pl +++ b/misc/cronjobs/automatic_renewals.pl @@ -120,7 +120,7 @@ END_WARN # Since advance notice options are not visible in the web-interface # unless EnhancedMessagingPreferences is on, let the user know that # this script probably isn't going to do much -if ( !C4::Context->preference('EnhancedMessagingPreferences') ) { +if ( !C4::Context->preference('EnhancedMessagingPreferences') && $verbose ) { warn <<'END_WARN'; The "EnhancedMessagingPreferences" syspref is off. -- 2.39.5