Bug 38306

Summary: Make automatic_renewals.pl cronjob quiet if EnhancedMessagingPreferences syspref is off
Product: Koha Reporter: Aleisha Amohia <aleisha>
Component: Command-line UtilitiesAssignee: Aleisha Amohia <aleisha>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: robin
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: Sponsored Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 38306: Only print EnhancedMessagingPreferences warning if run with verbose

Description Aleisha Amohia 2024-10-31 00:10:31 UTC
And the cronjob isn't being called with $verbose

If the EnhancedMessagingPreferences system preference is off, the automatic_renewals.pl cronjob will print this daily, even if the script is not run with $verbose

/etc/cron.daily/koha-common:

The "EnhancedMessagingPreferences" syspref is off.
Therefore, it is unlikely that this script will actually produce any messages to be sent.
To change this, edit the "EnhancedMessagingPreferences" syspref.
Comment 1 Aleisha Amohia 2024-10-31 02:33:42 UTC
Created attachment 173741 [details] [review]
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