Bug 17443 - Make possible to renew patron by later of expiry and current date
Summary: Make possible to renew patron by later of expiry and current date
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Josef Moravec
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-14 05:56 UTC by Josef Moravec
Modified: 2017-06-14 22:13 UTC (History)
8 users (show)

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


Attachments
Bug 17443: Make possible to renew patron by later of expiry and current date (4.52 KB, patch)
2016-10-14 06:25 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 17443: Make possible to renew patron by later of expiry and current date (4.57 KB, patch)
2016-10-14 07:55 UTC, Radek Šiman (R-Bit Technology, s.r.o.)
Details | Diff | Splinter Review
Bug 17443: Added tests (3.28 KB, patch)
2016-10-25 18:28 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 17443: Make possible to renew patron by later of expiry and current date (4.63 KB, patch)
2016-10-26 08:14 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 17443: Added tests (3.34 KB, patch)
2016-10-26 08:14 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 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.