Summary: | AUTO_RENEWALS_DGST notices are not generated if patron set to receive notice via SMS and no SMS notice defined | ||
---|---|---|---|
Product: | Koha | Reporter: | Andrew Fuerste-Henry <andrew> |
Component: | Notices | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | CLOSED FIXED | QA Contact: | Joonas Kylmälä <joonas.kylmala> |
Severity: | major | ||
Priority: | P5 - low | CC: | david, joonas.kylmala, kyle, lucas, martin.renvoize, nick, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
If an SMS notice is not defined for AUTO_RENEWALS_DGST and a patron has selected to receive a digest notification by SMS when items are automatically renewed, it doesn't generate a notice (even though the item(s) is renewed). This fixes the issue so that an email message is generated.
|
Version(s) released in: |
22.05.00,21.11.06,21.05.16
|
Circulation function: | |||
Attachments: |
Bug 30354: Don't assign warn as letter
Bug 30354: Don't assign warn as letter Bug 30354: Don't assign warn as letter |
Description
Andrew Fuerste-Henry
2022-03-24 14:49:58 UTC
*** Bug 29721 has been marked as a duplicate of this bug. *** Created attachment 132180 [details] [review] Bug 30354: Don't assign warn as letter TO test: 1 - Check out an item marked for autop renewal to a patron and make it overdue 2 - Set system preference AutoRenewalNotices to follow messaging prefs 3 - set that borrower to receive both email and SMS AUTO_RENEWALS_DGST 4 - confirm your AUTO_RENEWALS_DGST does not have SMS content but does have email 5 - run the auto_renew cron 6 - item is renewed, but error from cron, and cron dies: No circulation AUTO_RENEWALS_DGST letter transported by sms at /kohadevbox/koha/C4/Letters.pm line 583. no letter of type 'AUTO_RENEWALS_DGST' found for borrowernumber 5. Please see sample_notices.sql at misc/cronjobs/automatic_renewals.pl line 305. Can't use string ("1") as a HASH ref while "strict refs" in use at /kohadevbox/koha/C4/Letters.pm line 898. 7 - Apply patch 8 - Make item eligible for auto renewal agian (or checkin/checkout) 9 - Run the cron 10 - There is still 2 warn, but cron does not die: No circulation AUTO_RENEWALS_DGST letter transported by sms at /kohadevbox/koha/C4/Letters.pm line 583. no letter of type 'AUTO_RENEWALS_DGST' found for borrowernumber 5. Please see sample_notices.sql at misc/cronjobs/ automatic_renewals.pl line 305. 11 - Patron receives email and item is renewed Created attachment 134435 [details] [review] Bug 30354: Don't assign warn as letter TO test: 1 - Check out an item marked for autop renewal to a patron and make it overdue 2 - Set system preference AutoRenewalNotices to follow messaging prefs 3 - set that borrower to receive both email and SMS AUTO_RENEWALS_DGST 4 - confirm your AUTO_RENEWALS_DGST does not have SMS content but does have email 5 - run the auto_renew cron 6 - item is renewed, but error from cron, and cron dies: No circulation AUTO_RENEWALS_DGST letter transported by sms at /kohadevbox/koha/C4/Letters.pm line 583. no letter of type 'AUTO_RENEWALS_DGST' found for borrowernumber 5. Please see sample_notices.sql at misc/cronjobs/automatic_renewals.pl line 305. Can't use string ("1") as a HASH ref while "strict refs" in use at /kohadevbox/koha/C4/Letters.pm line 898. 7 - Apply patch 8 - Make item eligible for auto renewal agian (or checkin/checkout) 9 - Run the cron 10 - There is still 2 warn, but cron does not die: No circulation AUTO_RENEWALS_DGST letter transported by sms at /kohadevbox/koha/C4/Letters.pm line 583. no letter of type 'AUTO_RENEWALS_DGST' found for borrowernumber 5. Please see sample_notices.sql at misc/cronjobs/ automatic_renewals.pl line 305. 11 - Patron receives email and item is renewed Signed-off-by: David Nind <david@davidnind.com> Testing notes (using koha-testing-docker): - To set things up: . Changed the circulation rule so that for All All, Automatic renewal is set to yes . Added an email address to the patron used to check items out to (someone@example.com) (not sure that this is required for this to work) . To get the SMS column to appear under patron messaging preferences, set the SMSSendDriver system preference to Email (otherwise the error message isn't generated when the cron script is run) - To run the cron job: cd misc/cronjobs, perl automatic_renewals.pl -c -d -v - To check whether a message is "sent" or not, check under the notices section for the patron: before the patch is applied there should be no notice listed, even though the item is renewed; after the patch is applied the item is renewed and there is a pending notice Created attachment 134616 [details] [review] Bug 30354: Don't assign warn as letter TO test: 1 - Check out an item marked for autop renewal to a patron and make it overdue 2 - Set system preference AutoRenewalNotices to follow messaging prefs 3 - set that borrower to receive both email and SMS AUTO_RENEWALS_DGST 4 - confirm your AUTO_RENEWALS_DGST does not have SMS content but does have email 5 - run the auto_renew cron 6 - item is renewed, but error from cron, and cron dies: No circulation AUTO_RENEWALS_DGST letter transported by sms at /kohadevbox/koha/C4/Letters.pm line 583. no letter of type 'AUTO_RENEWALS_DGST' found for borrowernumber 5. Please see sample_notices.sql at misc/cronjobs/automatic_renewals.pl line 305. Can't use string ("1") as a HASH ref while "strict refs" in use at /kohadevbox/koha/C4/Letters.pm line 898. 7 - Apply patch 8 - Make item eligible for auto renewal agian (or checkin/checkout) 9 - Run the cron 10 - There is still 2 warn, but cron does not die: No circulation AUTO_RENEWALS_DGST letter transported by sms at /kohadevbox/koha/C4/Letters.pm line 583. no letter of type 'AUTO_RENEWALS_DGST' found for borrowernumber 5. Please see sample_notices.sql at misc/cronjobs/ automatic_renewals.pl line 305. 11 - Patron receives email and item is renewed Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Pushed to master for 22.05, thanks to everybody involved [U+1F984] Pushed to 21.11.x for 21.11.06 Backported: Pushed to 21.05.x branch for 21.05.16 |