Bug 29557 - Auto renew notices should handle failed renewal due to patron expiration
Summary: Auto renew notices should handle failed renewal due to patron expiration
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 19444
Blocks:
  Show dependency treegraph
 
Reported: 2021-11-22 16:07 UTC by Andrew Fuerste-Henry
Modified: 2022-12-12 21:23 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement updates the default auto-renewal notices to tell patrons that their renewals have failed because their account has expired.
Version(s) released in:
22.05.00,21.11.02,21.05.09
Circulation function:


Attachments
Bug 29557: Add auto_account_expired to AUTO_RENEWALS (2.64 KB, patch)
2021-11-23 13:53 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 29557: Add auto_account_expired to AUTO_RENEWALS (2.68 KB, patch)
2021-11-30 02:51 UTC, David Nind
Details | Diff | Splinter Review
Bug 29557: Add auto_account_expired to AUTO_RENEWALS (2.74 KB, patch)
2021-12-19 11:06 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 29557: (QA follow-up) Add note for translated notices to update statement (1.04 KB, patch)
2021-12-19 11:06 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2021-11-22 16:07:02 UTC
The default auto-renew and auto-renew-digest notices should include logic to tell patrons when their renewals have failed due to upcoming patron expiration.
Comment 1 Jonathan Druart 2021-11-23 13:53:08 UTC
Created attachment 127956 [details] [review]
Bug 29557: Add auto_account_expired to AUTO_RENEWALS

It was missing and the notice sent was not providing the reason of the
failure.

Test plan:
Check an item out with a date in the past, mark it as auto renew
Modify the expired date of the patron and set it in the past
Run the automatic_renewals.pl cronjob script, confirm that the notice
now contains the reason of the failure.

QA note: The template will be updated only for English installations.
Should we add an alert for others?
Comment 2 David Nind 2021-11-30 02:51:20 UTC
Created attachment 128099 [details] [review]
Bug 29557: Add auto_account_expired to AUTO_RENEWALS

It was missing and the notice sent was not providing the reason of the
failure.

Test plan:
Check an item out with a date in the past, mark it as auto renew
Modify the expired date of the patron and set it in the past
Run the automatic_renewals.pl cronjob script, confirm that the notice
now contains the reason of the failure.

QA note: The template will be updated only for English installations.
Should we add an alert for others?

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2021-11-30 02:52:33 UTC
Testing notes:

- Ran auto renewal cron job as follows: 
  perl misc/cronjobs/automatic_renewals.pl --send-notices --confirm
Comment 4 Katrin Fischer 2021-12-19 11:02:46 UTC
I am in doubt about the database update as this will only work for notices that haven't been changed - including untranslated. But it doesn't hurt to update unchanged notices, so we can keep it. 

But maybe we could add a note to the update statement about updating your notice if you have changed them?

Attaching a patch to do this.
Comment 5 Katrin Fischer 2021-12-19 11:06:45 UTC
Created attachment 128707 [details] [review]
Bug 29557: Add auto_account_expired to AUTO_RENEWALS

It was missing and the notice sent was not providing the reason of the
failure.

Test plan:
Check an item out with a date in the past, mark it as auto renew
Modify the expired date of the patron and set it in the past
Run the automatic_renewals.pl cronjob script, confirm that the notice
now contains the reason of the failure.

QA note: The template will be updated only for English installations.
Should we add an alert for others?

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2021-12-19 11:06:49 UTC
Created attachment 128708 [details] [review]
Bug 29557: (QA follow-up) Add note for translated notices to update statement

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Fridolin Somers 2022-01-11 21:52:46 UTC
While pushing master, I've moved note in dbrev into a "say $out".

Renders better :

kohadev-koha@kohadevbox:/kohadevbox/koha$ ./installer/data/mysql/updatedatabase.pl 
Upgrade to 21.12.00.006  [21:50:56]: Bug 29557 - Add auto_account_expired to AUTO_RENEWALS notice
	Please update your AUTO_RENEWALS notice manually if you have changed or translated it
Comment 8 Fridolin Somers 2022-01-11 22:51:39 UTC
Pushed to master for 22.05, thanks to everybody involved ﷐[U+1F984]﷑
Comment 9 Kyle M Hall (khall) 2022-01-14 14:13:45 UTC
Pushed to 21.11.x for 21.11.02
Comment 10 Andrew Fuerste-Henry 2022-01-25 17:08:53 UTC
Pushed to 21.05.x for 21.05.09
Comment 11 Victor Grousset/tuxayo 2022-02-07 18:55:55 UTC
Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed.