Summary: | Auto-renewal digest messages are sent on every cron run | ||
---|---|---|---|
Product: | Koha | Reporter: | Joonas Kylmälä <joonas.kylmala> |
Component: | Notices | Assignee: | Joonas Kylmälä <joonas.kylmala> |
Status: | CLOSED FIXED | QA Contact: | Nick Clemens (kidclamp) <nick> |
Severity: | major | ||
Priority: | P5 - low | CC: | andrew, barbara.johnson, david, dcook, jonathan.druart, nick, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30278 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30755 |
||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This fixes an issue with automatic renewal digest messages - these were being sent on every cron run, even if there was nothing to renew or no renewal errors.
(This error was caused by a regression in 21.05 from Bug 18532: Add individual issues to digest notice and hide auto_renewals messaging preference when not needed.)
|
Version(s) released in: |
21.11.00,21.05.09
|
Circulation function: | |||
Bug Depends on: | 18532 | ||
Bug Blocks: | 30222 | ||
Attachments: |
Bug 29381: Prevent sending of automatic renewal messages on every cron run
Bug 29381: Prevent sending of automatic renewal messages on every cron run Bug 29381: Prevent sending of automatic renewal messages on every cron run |
Description
Joonas Kylmälä
2021-10-31 13:59:53 UTC
Created attachment 127141 [details] [review] Bug 29381: Prevent sending of automatic renewal messages on every cron run Currently the auto-renewal digest messages are sent on every cron run even if there was nothing to renew or no renewal errors. This regression was introduced in the commit "Bug 18532: Add individual issues to digest notice and hide auto_renewals messaging preference when not needed". To test: 1) set syspref AutoRenewalNotices to be according to patron preferences 2) Enable renewal digest messages on a patron's messaging preferences 3) Checkout a book for patron, during the checkout use the Checkout settings menu to check the box "Automatic renewal" 4) Run $ perl misc/cronjobs/automatic_renewals.pl --send-notices --confirm --digest-per-branch $ perl misc/cronjobs/automatic_renewals.pl --send-notices --confirm --digest-per-branch 5) Notice you have now two renewal messages for the patron 6) Apply patch 7) repeat step 4) and notice you don't get anymore these unnecessary renewal messages To complete the test plan you need to apply also fix from bug 29380, though it is unrelated to this bug. I can't even get auto-renewal digest messages to send... Isn't "--send-notices" a deprecated option? (In reply to David Cook from comment #3) > I can't even get auto-renewal digest messages to send... Not sure where you got stuck. To test you can check the Notices tab of the patron via staff interface as well, no need to have have a working email setup. (In reply to Joonas Kylmälä from comment #4) > (In reply to David Cook from comment #3) > > I can't even get auto-renewal digest messages to send... > > Not sure where you got stuck. To test you can check the Notices tab of the > patron via staff interface as well, no need to have have a working email > setup. Ah sorry. I wasn't referring to your patches. I meant that I can't get auto-renewal digest messages to send in production in Koha haha. I can't tell if Koha is broken or if I'm doing something wrong, but it sounds like you're able to send auto-renewal digest messages... Created attachment 127416 [details] [review] Bug 29381: Prevent sending of automatic renewal messages on every cron run Currently the auto-renewal digest messages are sent on every cron run even if there was nothing to renew or no renewal errors. This regression was introduced in the commit "Bug 18532: Add individual issues to digest notice and hide auto_renewals messaging preference when not needed". To test: 1) set syspref AutoRenewalNotices to be according to patron preferences 2) Enable renewal digest messages on a patron's messaging preferences 3) Checkout a book for patron, during the checkout use the Checkout settings menu to check the box "Automatic renewal" 4) Run $ perl misc/cronjobs/automatic_renewals.pl --send-notices --confirm --digest-per-branch $ perl misc/cronjobs/automatic_renewals.pl --send-notices --confirm --digest-per-branch 5) Notice you have now two renewal messages for the patron 6) Apply patch 7) repeat step 4) and notice you don't get anymore these unnecessary renewal messages Signed-off-by: David Nind <david@davidnind.com> I don't think that I have any QA powers any more but this sounds very important. (Bug 29223 was the issue I was having with automatic renewal digests.) *** Bug 29555 has been marked as a duplicate of this bug. *** (In reply to David Cook from comment #8) > *** Bug 29555 has been marked as a duplicate of this bug. *** Nick made different changes on bug 29555 and after comparing both patches I'm thinking that maybe Nick and Joonas should talk and combine the patches? Created attachment 127947 [details] [review] Bug 29381: Prevent sending of automatic renewal messages on every cron run Currently the auto-renewal digest messages are sent on every cron run even if there was nothing to renew or no renewal errors. This regression was introduced in the commit "Bug 18532: Add individual issues to digest notice and hide auto_renewals messaging preference when not needed". To test: 1) set syspref AutoRenewalNotices to be according to patron preferences 2) Enable renewal digest messages on a patron's messaging preferences 3) Checkout a book for patron, during the checkout use the Checkout settings menu to check the box "Automatic renewal" 4) Run $ perl misc/cronjobs/automatic_renewals.pl --send-notices --confirm --digest-per-branch $ perl misc/cronjobs/automatic_renewals.pl --send-notices --confirm --digest-per-branch 5) Notice you have now two renewal messages for the patron 6) Apply patch 7) repeat step 4) and notice you don't get anymore these unnecessary renewal messages Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> There is a terrible lack of these in this area :-/ There is a terrible lack of tests in this area :-/ Pushed to master for 21.11, thanks to everybody involved! Pushed to 21.05.x for 21.05.09 Missing dependencies for 20.11.x, it shouldn't be affected, no backport. |