Bug 17443

Summary: Make possible to renew patron by later of expiry and current date
Product: Koha Reporter: Josef Moravec <josef.moravec>
Component: PatronsAssignee: Josef Moravec <josef.moravec>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: black23, f.demians, gmcharlt, jonathan.druart, kyle.m.hall, kyle, rbit, sally.healey
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 17443: Make possible to renew patron by later of expiry and current date
Bug 17443: Make possible to renew patron by later of expiry and current date
Bug 17443: Added tests
Bug 17443: Make possible to renew patron by later of expiry and current date
Bug 17443: Added tests

Description Josef Moravec 2016-10-14 05:56:24 UTC
In our we need to base patron's new expiry date on the later of expiry and current date. To be more clear: if patron registration expires in the past, use current date, if patron registration expires in the future, use expiry date.
Comment 1 Josef Moravec 2016-10-14 06:25:27 UTC
Created attachment 56443 [details] [review]
Bug 17443: Make possible to renew patron by later of expiry and current date

Test plan
1) Apply the patch
2) Go to system preferences and find the BorrowerRenewalPeriodBase and note there is new option "the later of current and expiry date"
3) Try all three options and confirm they work as expected
   3.1) The new options should be tested et least with two patrons - one with expiry date in past and one with expiry date in future
Comment 2 Radek Šiman (R-Bit Technology, s.r.o.) 2016-10-14 07:55:46 UTC
Created attachment 56457 [details] [review]
Bug 17443: Make possible to renew patron by later of expiry and current date

Test plan
1) Apply the patch
2) Go to system preferences and find the BorrowerRenewalPeriodBase and note there is new option "the later of current and expiry date"
3) Try all three options and confirm they work as expected
   3.1) The new options should be tested et least with two patrons - one with expiry date in past and one with expiry date in future

Signed-off-by: radiuscz <radek.siman@centrum.cz>
Comment 3 Jonathan Druart 2016-10-25 07:50:53 UTC
Please provide tests.
Comment 4 Josef Moravec 2016-10-25 18:28:47 UTC
Created attachment 56845 [details] [review]
Bug 17443: Added tests

Test plan:
prove t/db_dependent/Koha/Patrons.t
Comment 5 Jonathan Druart 2016-10-26 08:14:29 UTC
Created attachment 56849 [details] [review]
Bug 17443: Make possible to renew patron by later of expiry and current date

Test plan
1) Apply the patch
2) Go to system preferences and find the BorrowerRenewalPeriodBase and note there is new option "the later of current and expiry date"
3) Try all three options and confirm they work as expected
   3.1) The new options should be tested et least with two patrons - one with expiry date in past and one with expiry date in future

Signed-off-by: radiuscz <radek.siman@centrum.cz>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 6 Jonathan Druart 2016-10-26 08:14:36 UTC
Created attachment 56850 [details] [review]
Bug 17443: Added tests

Test plan:
prove t/db_dependent/Koha/Patrons.t

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 7 Kyle M Hall (khall) 2016-10-28 16:55:03 UTC
Pushed to master for 16.11, thanks Josef!
Comment 8 Frédéric Demians 2016-11-02 18:32:11 UTC
Pushed in 16.05. Will be in 16.05.06.