[Bug 21530] New: overdue_notices.pl aborting because error is not caught
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21530 Bug ID: 21530 Summary: overdue_notices.pl aborting because error is not caught Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Notices Assignee: koha-bugs@lists.koha-community.org Reporter: colin.campbell@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org Saw this triggered by a situation where a branch had been removed but some rules remained. However when doing a lookup the return should always be tested for validity. Because it wasnt when methods were called on null the overdues_notices process aborts with a runtime error and subsequent branches overdues are not processed. Untested returns are one of the biggest causes of errors and often hard to track down errors in the system . -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21530 Colin Campbell <colin.campbell@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |colin.campbell@ptfs-europe. |ity.org |com --- Comment #1 from Colin Campbell <colin.campbell@ptfs-europe.com> --- Created attachment 80326 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80326&action=edit Patch to test a valid object returned Adds a run-time test to ensure the assumption of the following code is true. Without the patch process aborts on call to branchemail method. With patch applied if find fails to return a valid library we skip to the next and issue an error listing the problematic branchcode As we dont live in the "best of all possible worlds" code should be more pessimistic and test for unexpected results -- 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=21530 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21530 Hayley Mapley <hayleymapley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hayleymapley@catalyst.net.n | |z --- Comment #2 from Hayley Mapley <hayleymapley@catalyst.net.nz> --- (In reply to Colin Campbell from comment #1)
Created attachment 80326 [details] [review] Patch to test a valid object returned
Adds a run-time test to ensure the assumption of the following code is true. Without the patch process aborts on call to branchemail method.
With patch applied if find fails to return a valid library we skip to the next and issue an error listing the problematic branchcode
As we dont live in the "best of all possible worlds" code should be more pessimistic and test for unexpected results
Hi, is there some test plan for this patch? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21530 Liz Rea <wizzyrea@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wizzyrea@gmail.com --- Comment #3 from Liz Rea <wizzyrea@gmail.com> --- Hi Colin, I'm wondering if this situation will have been helped by the fix for bug 22679 - thoughts? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21530 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- I'm marking this Failed QA because comment 2 and comment 3 need to be addressed before this can be signed off. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21530 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=18086 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21530 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |RESOLVED CC| |martin.renvoize@ptfs-europe | |.com Resolution|--- |WORKSFORME --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pretty sure this is caught at this point.. either way I'm closing and we can open a fresh bug when we spot it in the wild. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org