Bug 25635 - overdue_notices.pl dies if no overdue rules are defined
Summary: overdue_notices.pl dies if no overdue rules are defined
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 17532
Blocks:
  Show dependency treegraph
 
Reported: 2020-06-01 05:31 UTC by David Cook
Modified: 2020-06-12 04:37 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2020-06-01 05:31:30 UTC
overdue_notices.pl dies if no overdue rules are defined, but there are many cases where you might not want any overdue rules to be defined.

(If you're running overdue_notices.pl within koha-foreach, koha-foreach will now die on the first instance it encounters that has no overdue rules defined.)
Comment 1 Jonathan Druart 2020-06-01 10:23:33 UTC
Yes, even with bug 25634 fixed I think we should replace the die with a warn+exit 0
Comment 2 Katrin Fischer 2020-06-01 10:26:23 UTC
Is that a regression? We certainly have libraries without rules and multiple instances on servers... Having no rules should not be seen as a problem or error, it's just configuration.
Comment 3 Jonathan Druart 2020-06-01 10:38:51 UTC
The behaviour of the script has not been modified, but the consequence on koha-foreach comes from a change in koha-shell (bug 17532)
Comment 4 Katrin Fischer 2020-06-01 10:45:28 UTC
That explains why we haven't run into this yet on production systems.
Comment 5 David Cook 2020-06-01 23:56:03 UTC
(In reply to Jonathan Druart from comment #1)
> Yes, even with bug 25634 fixed I think we should replace the die with a
> warn+exit 0

That's my thinking too.
Comment 6 Katrin Fischer 2020-06-11 20:36:30 UTC
Will this be fixed by bug 17532 or do we need to adjust the overdues script as well?
Comment 7 David Cook 2020-06-12 04:37:59 UTC
(In reply to Katrin Fischer from comment #6)
> Will this be fixed by bug 17532 or do we need to adjust the overdues script
> as well?

Bug 17532 actually makes this a problem as noted in Bug 25634. 

Bug 25634 resolves the main problem that Bug 17532 introduced, but the overdues script should be adjusted anyway.