[Bug 38306] New: Make automatic_renewals.pl cronjob quiet if EnhancedMessagingPreferences syspref is off
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38306 Bug ID: 38306 Summary: Make automatic_renewals.pl cronjob quiet if EnhancedMessagingPreferences syspref is off Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: aleisha@catalyst.net.nz QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz 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. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38306 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |aleisha@catalyst.net.nz |ity.org | Change sponsored?|--- |Sponsored -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38306 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38306 --- Comment #1 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Created attachment 173741 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173741&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38306 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |no-sandbox CC| |lisette@bywatersolutions.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38306 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38306 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173741|0 |1 is obsolete| | --- Comment #2 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 176299 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176299&action=edit 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 Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38306 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Status|Signed Off |Failed QA --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- What about: my $send_notices_pref = C4::Context->preference('AutoRenewalNotices'); if ( $send_notices_pref eq 'cron' ) { warn <<'END_WARN'; The "AutoRenewalNotices" syspref is set to 'Follow the cron switch'. The send_notices switch for this script is deprecated, you should either set the preference to 'Never send emails' or 'Follow patron messaging preferences' END_WARN -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38306 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #4 from Aleisha Amohia <aleisha@catalyst.net.nz> --- (In reply to Marcel de Rooy from comment #3)
What about:
my $send_notices_pref = C4::Context->preference('AutoRenewalNotices'); if ( $send_notices_pref eq 'cron' ) { warn <<'END_WARN';
The "AutoRenewalNotices" syspref is set to 'Follow the cron switch'. The send_notices switch for this script is deprecated, you should either set the preference to 'Never send emails' or 'Follow patron messaging preferences'
END_WARN
Sorry Marcel I wonder if there was more to add to your comment and it got left off? I don't understand the suggestion. Setting back to needs signoff. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38306 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Revisiting much too late. Trying to understand myself now.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38306 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Marcel de Rooy from comment #3)
What about:
my $send_notices_pref = C4::Context->preference('AutoRenewalNotices'); if ( $send_notices_pref eq 'cron' ) { warn <<'END_WARN';
The "AutoRenewalNotices" syspref is set to 'Follow the cron switch'. The send_notices switch for this script is deprecated, you should either set the preference to 'Never send emails' or 'Follow patron messaging preferences'
END_WARN
Lets consider this out of scope for now. It is not related to EnhancedMessaging. It was just a question if we should add verbose here too. Never mind. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38306 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38306 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176299|0 |1 is obsolete| | --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 188766 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188766&action=edit 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 Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38306 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38306 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Pragmatic here. Theoretically, could imagine that I would like to see the warn when running this manually or so. But seeing this daily in the default cron call that does not have verbose, might be more annoying. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38306 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38306 --- Comment #9 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38306 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |RESOLVED CC| |Laura.escamilla@bywatersolu | |tions.com Resolution|--- |FIXED --- Comment #10 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- This is an enhancement and will not be backported to the 25.05.x branch. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org