|
Description
Andrew Fuerste-Henry
2022-03-22 12:33:29 UTC
Created attachment 187537 [details] [review] Bug 30331: Rename RenewalPeriodBase as ManualRenewalPeriodBase and add AutomaticRenewalPeriodBase sys pref Created attachment 187543 [details] [review] Bug 30331: Implement manual and automatic renewal base period To test: 1. APPLY PATCH, updatedatabase, restart_all 2. Go to your circulation rules and do the following: -Automatic renewal: Yes -No renewal before: 5 -No automatic renewal before: 5 -Renewal period: 5 3. Set ManualRenewalPeriodBase to "the old due date of the checkout". 4. Set AutomaticRenewalPeriodBase to "current date". 5. Check out an item and set the due date to 2 days from today 6. Attempt to manually renewal the item. 7. Notice the new date is calculated based on the old checkout date. 8. Check out an item another item and set the due date to 2 days from today. 9. Run `perl /kohadevbox/koha/misc/cronjobs/automatic_renewals.pl -c -v` 10. Notice the new date is calculated based on the current date. 11. Set ManualRenewalPeriodBase to "current date". 12. Set AutomaticRenewalPeriodBase to "the old due date of the checkout". 13. Check out an item and set the due date to 2 days from today 14. Attempt to manually renewal the item. 15. Notice the new date is calculated based on the current date. 16. Check out an item another item and set the due date to 2 days from today. 17. Run `perl /kohadevbox/koha/misc/cronjobs/automatic_renewals.pl -c -v` 18. Notice the new date is calculated based on the old checkout date. Created attachment 187552 [details] [review] Bug 30331: Unit tests Created attachment 187553 [details] [review] Bug 30331: Update system preference descriptions Created attachment 187757 [details] [review] Bug 30331: Rename RenewalPeriodBase as ManualRenewalPeriodBase and add AutomaticRenewalPeriodBase sys pref Created attachment 187758 [details] [review] Bug 30331: Implement manual and automatic renewal base period To test: 1. APPLY PATCH, updatedatabase, restart_all 2. Go to your circulation rules and do the following: -Automatic renewal: Yes -No renewal before: 5 -No automatic renewal before: 5 -Renewal period: 5 3. Set ManualRenewalPeriodBase to "the old due date of the checkout". 4. Set AutomaticRenewalPeriodBase to "current date". 5. Check out an item and set the due date to 2 days from today 6. Attempt to manually renewal the item. 7. Notice the new date is calculated based on the old checkout date. 8. Check out an item another item and set the due date to 2 days from today. 9. Run `perl /kohadevbox/koha/misc/cronjobs/automatic_renewals.pl -c -v` 10. Notice the new date is calculated based on the current date. 11. Set ManualRenewalPeriodBase to "current date". 12. Set AutomaticRenewalPeriodBase to "the old due date of the checkout". 13. Check out an item and set the due date to 2 days from today 14. Attempt to manually renewal the item. 15. Notice the new date is calculated based on the current date. 16. Check out an item another item and set the due date to 2 days from today. 17. Run `perl /kohadevbox/koha/misc/cronjobs/automatic_renewals.pl -c -v` 18. Notice the new date is calculated based on the old checkout date. Created attachment 187759 [details] [review] Bug 30331: Unit tests Created attachment 187760 [details] [review] Bug 30331: Update system preference descriptions Created attachment 187761 [details] [review] Bug 30331: Rename RenewalPeriodBase as ManualRenewalPeriodBase and add AutomaticRenewalPeriodBase sys pref Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org> Created attachment 187762 [details] [review] Bug 30331: Implement manual and automatic renewal base period To test: 1. APPLY PATCH, updatedatabase, restart_all 2. Go to your circulation rules and do the following: -Automatic renewal: Yes -No renewal before: 5 -No automatic renewal before: 5 -Renewal period: 5 3. Set ManualRenewalPeriodBase to "the old due date of the checkout". 4. Set AutomaticRenewalPeriodBase to "current date". 5. Check out an item and set the due date to 2 days from today 6. Attempt to manually renewal the item. 7. Notice the new date is calculated based on the old checkout date. 8. Check out an item another item and set the due date to 2 days from today. 9. Run `perl /kohadevbox/koha/misc/cronjobs/automatic_renewals.pl -c -v` 10. Notice the new date is calculated based on the current date. 11. Set ManualRenewalPeriodBase to "current date". 12. Set AutomaticRenewalPeriodBase to "the old due date of the checkout". 13. Check out an item and set the due date to 2 days from today 14. Attempt to manually renewal the item. 15. Notice the new date is calculated based on the current date. 16. Check out an item another item and set the due date to 2 days from today. 17. Run `perl /kohadevbox/koha/misc/cronjobs/automatic_renewals.pl -c -v` 18. Notice the new date is calculated based on the old checkout date. Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org> Created attachment 187763 [details] [review] Bug 30331: Unit tests Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org> Created attachment 187764 [details] [review] Bug 30331: Update system preference descriptions Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org> Created attachment 191219 [details] [review] Bug 30331: Rename RenewalPeriodBase as ManualRenewalPeriodBase and add AutomaticRenewalPeriodBase sys pref Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> Created attachment 191220 [details] [review] Bug 30331: Implement manual and automatic renewal base period To test: 1. APPLY PATCH, updatedatabase, restart_all 2. Go to your circulation rules and do the following: -Automatic renewal: Yes -No renewal before: 5 -No automatic renewal before: 5 -Renewal period: 5 3. Set ManualRenewalPeriodBase to "the old due date of the checkout". 4. Set AutomaticRenewalPeriodBase to "current date". 5. Check out an item and set the due date to 2 days from today 6. Attempt to manually renewal the item. 7. Notice the new date is calculated based on the old checkout date. 8. Check out an item another item and set the due date to 2 days from today. 9. Run `perl /kohadevbox/koha/misc/cronjobs/automatic_renewals.pl -c -v` 10. Notice the new date is calculated based on the current date. 11. Set ManualRenewalPeriodBase to "current date". 12. Set AutomaticRenewalPeriodBase to "the old due date of the checkout". 13. Check out an item and set the due date to 2 days from today 14. Attempt to manually renewal the item. 15. Notice the new date is calculated based on the current date. 16. Check out an item another item and set the due date to 2 days from today. 17. Run `perl /kohadevbox/koha/misc/cronjobs/automatic_renewals.pl -c -v` 18. Notice the new date is calculated based on the old checkout date. Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> Created attachment 191221 [details] [review] Bug 30331: Unit tests Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> Created attachment 191222 [details] [review] Bug 30331: Update system preference descriptions Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> Created attachment 191223 [details] [review] Bug 30331: (follow-up) Fix count of tests Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> Created attachment 192195 [details] [review] Bug 30331: Rename RenewalPeriodBase as ManualRenewalPeriodBase and add AutomaticRenewalPeriodBase sys pref Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> Created attachment 192196 [details] [review] Bug 30331: Implement manual and automatic renewal base period To test: 1. APPLY PATCH, updatedatabase, restart_all 2. Go to your circulation rules and do the following: -Automatic renewal: Yes -No renewal before: 5 -No automatic renewal before: 5 -Renewal period: 5 3. Set ManualRenewalPeriodBase to "the old due date of the checkout". 4. Set AutomaticRenewalPeriodBase to "current date". 5. Check out an item and set the due date to 2 days from today 6. Attempt to manually renewal the item. 7. Notice the new date is calculated based on the old checkout date. 8. Check out an item another item and set the due date to 2 days from today. 9. Run `perl /kohadevbox/koha/misc/cronjobs/automatic_renewals.pl -c -v` 10. Notice the new date is calculated based on the current date. 11. Set ManualRenewalPeriodBase to "current date". 12. Set AutomaticRenewalPeriodBase to "the old due date of the checkout". 13. Check out an item and set the due date to 2 days from today 14. Attempt to manually renewal the item. 15. Notice the new date is calculated based on the current date. 16. Check out an item another item and set the due date to 2 days from today. 17. Run `perl /kohadevbox/koha/misc/cronjobs/automatic_renewals.pl -c -v` 18. Notice the new date is calculated based on the old checkout date. Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> Created attachment 192197 [details] [review] Bug 30331: Unit tests Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> Created attachment 192198 [details] [review] Bug 30331: Update system preference descriptions Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> Created attachment 192199 [details] [review] Bug 30331: Update tests, mock the system preference Nice work everyone! Pushed to main for 26.05 There is a diff in syspref's description for existing installs:
# Failed test 'Comparing AutomaticRenewalPeriodBase'
# at t/db_dependent/check_sysprefs.t line 135.
# Structures begin differing at:
# $got->{explanation} = 'Set whether the renewal date should be counted from the date_due or from the moment the Patron asks for renewal, for automatic renewals'
# $expected->{explanation} = 'Set whether the renewal date should be counted from the date_due or from the moment the Patron asks for renewal, for automatic renewals '
# Failed test 'Comparing ManualRenewalPeriodBase'
# at t/db_dependent/check_sysprefs.t line 135.
# Structures begin differing at:
# $got->{explanation} = 'Set whether the renewal date should be counted from the date_due or from the moment the Patron asks for renewal '
# $expected->{explanation} = 'Set whether the renewal date should be counted from the date_due or from the moment the Patron asks for renewal, for manual renewals '
# Looks like you failed 2 tests of 1753.
(In reply to Jonathan Druart from comment #24) > There is a diff in syspref's description for existing installs: > > # Failed test 'Comparing AutomaticRenewalPeriodBase' > # at t/db_dependent/check_sysprefs.t line 135. > > # Structures begin differing at: > > # $got->{explanation} = 'Set whether the renewal date should be > counted from the date_due or from the moment the Patron asks for renewal, > for automatic renewals' > # $expected->{explanation} = 'Set whether the renewal date should be > counted from the date_due or from the moment the Patron asks for renewal, > for automatic renewals ' > > > # Failed test 'Comparing ManualRenewalPeriodBase' > # at t/db_dependent/check_sysprefs.t line 135. > > # Structures begin differing at: > > # $got->{explanation} = 'Set whether the renewal date should be > counted from the date_due or from the moment the Patron asks for renewal ' > # $expected->{explanation} = 'Set whether the renewal date should be > counted from the date_due or from the moment the Patron asks for renewal, > for manual renewals ' > # Looks like you failed 2 tests of 1753. Instead of fixing here I am filing as a new bug: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41771 |