Bug 38307

Summary: Make overdue_notices.pl quiet if there are no libraries with active overdue rules
Product: Koha Reporter: Aleisha Amohia <aleisha>
Component: Command-line UtilitiesAssignee: Aleisha Amohia <aleisha>
Status: Pushed to main --- QA Contact: Marcel de Rooy <m.de.rooy>
Severity: enhancement    
Priority: P5 - low CC: anke.bruns, dcook, lisette, m.de.rooy, robin
Version: MainKeywords: no-sandbox
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25635
GIT URL: Change sponsored?: Sponsored
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.05.00
Circulation function:
Attachments: Bug 38307: Make overdue_notices.pl die quietly if no branches have overdue rules
Bug 38307: Make overdue_notices.pl die quietly if no branches have overdue rules
Bug 38307: Make overdue_notices.pl die quietly if no branches have overdue rules

Description Aleisha Amohia 2024-10-31 03:16:51 UTC

    
Comment 1 Aleisha Amohia 2024-10-31 03:23:06 UTC
Created attachment 173742 [details] [review]
Bug 38307: Make overdue_notices.pl die quietly if no branches have overdue rules

If no patron categories require overdue notices, then there will be no overdue rules/status triggers. This isn't necessarily a bad thing and shouldn't be noisy.

To test:

1. Go to Administration -> Patron categories
2. Set all your category types to have overdue notice required: No
3. Go to Tools -> Overdue notices/status triggers
4. Notice you're unable to set any overdue rules
5. Run the cronjob misc/cronjobs/overdue_notices.pl and notice the error about no overdue rules is printed
6. Apply the patch and restart services
7. Run the cronjob misc/cronjobs/overdue_notices.pl and notice the error is not printed
8. Run the cronjob misc/cronjobs/overdue_notices.pl --verbose and notice the error is printed

Sponsored-by: Catalyst IT
Comment 2 David Cook 2024-11-01 01:26:18 UTC
*** Bug 25635 has been marked as a duplicate of this bug. ***
Comment 3 Anke Bruns 2024-12-16 10:49:15 UTC
Not testable in a sandbox.
Comment 4 Imani 2025-01-10 17:53:22 UTC
Created attachment 176383 [details] [review]
Bug 38307: Make overdue_notices.pl die quietly if no branches have overdue rules

If no patron categories require overdue notices, then there will be no overdue rules/status triggers. This isn't necessarily a bad thing and shouldn't be noisy.

To test:

1. Go to Administration -> Patron categories
2. Set all your category types to have overdue notice required: No
3. Go to Tools -> Overdue notices/status triggers
4. Notice you're unable to set any overdue rules
5. Run the cronjob misc/cronjobs/overdue_notices.pl and notice the error about no overdue rules is printed
6. Apply the patch and restart services
7. Run the cronjob misc/cronjobs/overdue_notices.pl and notice the error is not printed
8. Run the cronjob misc/cronjobs/overdue_notices.pl --verbose and notice the error is printed

Sponsored-by: Catalyst IT
Signed-off-by: Imani Thomas <imani.thomas@bywatersolutions.com>
Comment 5 Marcel de Rooy 2025-02-21 10:42:07 UTC
Created attachment 178476 [details] [review]
Bug 38307: Make overdue_notices.pl die quietly if no branches have overdue rules

If no patron categories require overdue notices, then there will be no overdue rules/status triggers. This isn't necessarily a bad thing and shouldn't be noisy.

To test:

1. Go to Administration -> Patron categories
2. Set all your category types to have overdue notice required: No
3. Go to Tools -> Overdue notices/status triggers
4. Notice you're unable to set any overdue rules
5. Run the cronjob misc/cronjobs/overdue_notices.pl and notice the error about no overdue rules is printed
6. Apply the patch and restart services
7. Run the cronjob misc/cronjobs/overdue_notices.pl and notice the error is not printed
8. Run the cronjob misc/cronjobs/overdue_notices.pl --verbose and notice the error is printed

Sponsored-by: Catalyst IT
Signed-off-by: Imani Thomas <imani.thomas@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 6 Katrin Fischer 2025-02-21 15:44:36 UTC
Pushed for 25.05!

Well done everyone, thank you!