[Bug 29223] New: Auto-renewals can fail when not digested per branch and patron requests digest
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29223 Bug ID: 29223 Summary: Auto-renewals can fail when not digested per branch and patron requests digest Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Notices Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Bug 28581 updated send_digest in automatic_renewals.pl to use $library->from_email_address, however, there is no branchcode parameter passed when not doing 'digest_as_branch' and so the call will fail -- 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=29223 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |28581 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28581 [Bug 28581] Patron's queue_notice uses inbound_email_address incorrectly -- 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=29223 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=29223 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 126222 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126222&action=edit Bug 29223: Use patron's branchcode for digest if not sending digest per branch To test: 1 - Set system preference AutoRenewalNotices to 'according to patron messaging preferences' 2 - Set circ rule for auto renewal - 100 renewals allowed - no renewal before 100 This shoud make a checkout eligible for many auto renewals for testing 3 - Checkout an item to a patron, ensure item is from a different branch than patron 4 - Ensure the patron has an email, and set an email for patron's branch and items branch 5 - Set the patron messaging preferences for auto-renewal to 'email' and 'wants digest' 6 - perl misc/cronjobs/automatic_renewals.pl --send-notices --confirm 7 - Job dies: Can't call method "from_email_address" on an undefined value at /usr/share/koha/bin/cronjobs/automatic_renewals.pl line 286. 8 - Apply patch 9 - Repeat 10 - NO errors 11 - Check patron notices tab, should be a notice enqueued, check DB to see from address is patron's branch 12 - perl misc/cronjobs/automatic_renewals.pl --send-notices --confirm --digest-per-branch 13 - No errors 14 - Check patron notices tab, should be a notice enqueued, check DB to see from address is item's branch -- 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=29223 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- 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=29223 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126222|0 |1 is obsolete| | --- Comment #2 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 126228 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126228&action=edit Bug 29223: Use patron's branchcode for digest if not sending digest per branch To test: 1 - Set system preference AutoRenewalNotices to 'according to patron messaging preferences' 2 - Set circ rule for auto renewal - 100 renewals allowed - no renewal before 100 This shoud make a checkout eligible for many auto renewals for testing 3 - Checkout an item to a patron, ensure item is from a different branch than patron 4 - Ensure the patron has an email, and set an email for patron's branch and items branch 5 - Set the patron messaging preferences for auto-renewal to 'email' and 'wants digest' 6 - perl misc/cronjobs/automatic_renewals.pl --send-notices --confirm 7 - Job dies: Can't call method "from_email_address" on an undefined value at /usr/share/koha/bin/cronjobs/automatic_renewals.pl line 286. 8 - Apply patch 9 - Repeat 10 - NO errors 11 - Check patron notices tab, should be a notice enqueued, check DB to see from address is patron's branch 12 - perl misc/cronjobs/automatic_renewals.pl --send-notices --confirm --digest-per-branch 13 - No errors 14 - Check patron notices tab, should be a notice enqueued, check DB to see from address is item's branch Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> -- 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=29223 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com --- Comment #3 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- This worked as described. In step 14, the from_address matches the item's *holding branch.* I tried it with both possible values for HomeOrHolding, in case it was following that, but it didn't make a difference. I wasn't clear if that was the intended behavior, from the test plan. -- 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=29223 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- 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=29223 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joonas.kylmala@iki.fi QA Contact|testopia@bugs.koha-communit |joonas.kylmala@iki.fi |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29223 --- Comment #4 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- (In reply to Andrew Fuerste-Henry from comment #3)
This worked as described.
In step 14, the from_address matches the item's *holding branch.* I tried it with both possible values for HomeOrHolding, in case it was following that, but it didn't make a difference. I wasn't clear if that was the intended behavior, from the test plan.
The step 14 just just describing that the --digest-per-branch behaviour is the same before and after this patch, the patch here doesn't change that at all (so if it is buggy you need to open a new bug report for that). I actually noticed also two other bugs in this script as well: 1) The individual messages are sent also in addition to the digest messages (only digest should be sent if enabled) 2) The individual messages don't use the branch specific letter templates, only global But those are unrelated to this bug, just mentioning them here... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29223 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=29223 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126228|0 |1 is obsolete| | --- Comment #5 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- Created attachment 127137 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127137&action=edit Bug 29223: Use patron's branchcode for digest if not sending digest per branch To test: 1 - Set system preference AutoRenewalNotices to 'according to patron messaging preferences' 2 - Set circ rule for auto renewal - 100 renewals allowed - no renewal before 100 This shoud make a checkout eligible for many auto renewals for testing 3 - Checkout an item to a patron, ensure item is from a different branch than patron 4 - Ensure the patron has an email, and set an email for patron's branch and items branch 5 - Set the patron messaging preferences for auto-renewal to 'email' and 'wants digest' 6 - perl misc/cronjobs/automatic_renewals.pl --send-notices --confirm 7 - Job dies: Can't call method "from_email_address" on an undefined value at /usr/share/koha/bin/cronjobs/automatic_renewals.pl line 286. 8 - Apply patch 9 - Repeat 10 - NO errors 11 - Check patron notices tab, should be a notice enqueued, check DB to see from address is patron's branch 12 - perl misc/cronjobs/automatic_renewals.pl --send-notices --confirm --digest-per-branch 13 - No errors 14 - Check patron notices tab, should be a notice enqueued, check DB to see from address is item's branch Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29223 --- Comment #6 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- Passing QA. And btw: (In reply to Joonas Kylmälä from comment #4)
1) The individual messages are sent also in addition to the digest messages (only digest should be sent if enabled)
This was not true, I glanced over the code too quickly. Will file new bug reports for those other bugs in this script discussed here (also found yet another bug, the digest messages are sent every day / cron run if the reason is auto_too_soon) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29223 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127137|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29223 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126228|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29223 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA --- Comment #7 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- (In reply to Joonas Kylmälä from comment #6)
Passing QA.
Have to take back the PQA. The letter template is changed from global to the patron's library specific one. For the individual messages we use currently the global letter template. The line
branchcode => $params->{branchcode},
should be restored basically so we will use the default template when $params->{branchcode} is undef. As discussed in the bug 23296 we should probably use the branch defined by CircControl but that development can be continued in bug 23296. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29223 --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Joonas Kylmälä from comment #7)
(In reply to Joonas Kylmälä from comment #6)
Passing QA.
Have to take back the PQA. The letter template is changed from global to the patron's library specific one. For the individual messages we use currently the global letter template. The line
branchcode => $params->{branchcode},
should be restored basically so we will use the default template when $params->{branchcode} is undef. As discussed in the bug 23296 we should probably use the branch defined by CircControl but that development can be continued in bug 23296.
I think this change is correct, defaulting to the borrowers branch for a digest and falling back to general only if one is not defined -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29223 --- Comment #9 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- (In reply to Nick Clemens from comment #8)
I think this change is correct, defaulting to the borrowers branch for a digest and falling back to general only if one is not defined
Hmm, I see. I guess the feature change introduced in this bug fix is not too bad: the user can just remove the branch specific digest messages and it will use the global one. So the same behaviour can be gained even after this change. I'm unobsoleting the patch I signed off and marking this as PQA. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29223 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127137|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29223 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29223 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126228|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29223 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |21.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29223 --- Comment #10 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29223 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Version(s)|21.11.00 |21.11.00,21.05.06 released in| | Status|Pushed to master |Pushed to stable --- Comment #11 from Fridolin Somers <fridolin.somers@biblibre.com> --- Will be in 21.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29223 --- Comment #12 from Fridolin Somers <fridolin.somers@biblibre.com> --- Depends on Bug 28581 not in 20.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29223 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #13 from David Cook <dcook@prosentient.com.au> --- This one was driving me a little crazy... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29223 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=18532 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org