Bug 29555 - Auto-renewals digest reports on 'auto_too_soon'
Summary: Auto-renewals digest reports on 'auto_too_soon'
Status: RESOLVED DUPLICATE of bug 29381
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-22 13:26 UTC by Nick Clemens
Modified: 2021-11-22 22:16 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 29555: Don't push auto_too_soon issues into report (3.01 KB, patch)
2021-11-22 13:33 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 29555: Don't push auto_too_soon issues into report (3.08 KB, patch)
2021-11-22 15:14 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2021-11-22 13:26:02 UTC
When a patron has requested auto-renewal digests the cron sends emails when all items are  'auto_too_soon'
Comment 1 Nick Clemens 2021-11-22 13:33:25 UTC
Created attachment 127929 [details] [review]
Bug 29555: Don't push auto_too_soon issues into report

This patch adds a conditional to avoid reporting on issues that are too
soon to be renewed

To test:
 1 - Set  AutoRenewalNotices preference to 'according to patron messaging preferences'
 2 - Set a patront o request auto renewal emails digested
 3 - Checkout an item to the patron, back dated to be opverdue, and marked for auto renewal
 4 - Add an email to the patron for testing
 5 - perl misc/cronjobs/automatic_renewals.pl -v -c
 6 - See the issue is renewed (ensure it is now not overdue)
 7 - Confirm the patron was sent a digest with the renewal (on patron 'Notices' tab)
 8 - perl misc/cronjobs/automatic_renewals.pl -v -c
 9 - See the issue was not renewed
10 - See a notice was sent, with no indication of what happened to the issue
11 - Apply patch
12 - perl misc/cronjobs/automatic_renewals.pl -v -c
13 - Confrim no renewal or notice
14 - Checkout a second item to patron, backdated and set for auto renewal
15 - perl misc/cronjobs/automatic_renewals.pl -v -c
16 - Confirm the correct item is renewed and notice sent
17 - Confirm notice does not include the too soon issue
18 - Checkout a third item
19 - perl misc/cronjobs/automatic_renewals.pl -v -c -b
20 - Confirm correct item is renewed and notice sent, nbot including other two
21 - perl misc/cronjobs/automatic_renewals.pl -v -c -b
22 - Confirm no notice sent
Comment 2 Andrew Fuerste-Henry 2021-11-22 15:14:12 UTC
Created attachment 127934 [details] [review]
Bug 29555: Don't push auto_too_soon issues into report

This patch adds a conditional to avoid reporting on issues that are too
soon to be renewed

To test:
 1 - Set  AutoRenewalNotices preference to 'according to patron messaging preferences'
 2 - Set a patront o request auto renewal emails digested
 3 - Checkout an item to the patron, back dated to be opverdue, and marked for auto renewal
 4 - Add an email to the patron for testing
 5 - perl misc/cronjobs/automatic_renewals.pl -v -c
 6 - See the issue is renewed (ensure it is now not overdue)
 7 - Confirm the patron was sent a digest with the renewal (on patron 'Notices' tab)
 8 - perl misc/cronjobs/automatic_renewals.pl -v -c
 9 - See the issue was not renewed
10 - See a notice was sent, with no indication of what happened to the issue
11 - Apply patch
12 - perl misc/cronjobs/automatic_renewals.pl -v -c
13 - Confrim no renewal or notice
14 - Checkout a second item to patron, backdated and set for auto renewal
15 - perl misc/cronjobs/automatic_renewals.pl -v -c
16 - Confirm the correct item is renewed and notice sent
17 - Confirm notice does not include the too soon issue
18 - Checkout a third item
19 - perl misc/cronjobs/automatic_renewals.pl -v -c -b
20 - Confirm correct item is renewed and notice sent, nbot including other two
21 - perl misc/cronjobs/automatic_renewals.pl -v -c -b
22 - Confirm no notice sent

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 3 David Cook 2021-11-22 22:16:03 UTC
Marking this as a duplicate of bug 29381 since it's older and signed off (also Andrew can't sign off Nick's patches). 

Although after comparing the patches on both issues... I'm not sure that either is 100% correct...

*** This bug has been marked as a duplicate of bug 29381 ***