Bug 29537

Summary: Simplify auto-renewal code in CanBookBeRenewed
Product: Koha Reporter: Joonas Kylmälä <joonas.kylmala>
Component: CirculationAssignee: Nick Clemens <nick>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: normal    
Priority: P5 - low CC: dcook, fridolin.somers, gmcharlt, jonathan.druart, kyle.m.hall, kyle, m.de.rooy, martin.renvoize, victor
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Martin Renvoize Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00,21.11.06
Bug Depends on: 29474, 29476    
Bug Blocks: 29623    
Attachments: Bug 29537: Remove unnecessary if-else checks for soonest renew date
Bug 29537: Remove unnecessary if-else checks for soonest renew date
Bug 29537: Remove unnecessary if-else checks for soonest renew date
Bug 29537: Remove unnecessary if-else checks for soonest renew date
Bug 29537: Remove unnecessary if-else checks for soonest renew date
Bug 29537: Remove unnecessary if-else checks for soonest renew date

Description Joonas Kylmälä 2021-11-20 11:52:41 UTC

    
Comment 1 Joonas Kylmälä 2021-11-20 11:56:01 UTC Comment hidden (obsolete)
Comment 2 Joonas Kylmälä 2021-11-20 11:59:28 UTC
Created attachment 127902 [details] [review]
Bug 29537: Remove unnecessary if-else checks for soonest renew date

GetSoonestRenewDate() calculates the renewal due date now also
correctly for auto-renewals after the fixes from bug 29476 so we don't
have to add any if-else checks because of it being buggy anymore.

To test:
 1) prove t/db_dependent/Circulation.t
Comment 3 David Nind 2021-11-29 21:38:11 UTC
Created attachment 128095 [details] [review]
Bug 29537: Remove unnecessary if-else checks for soonest renew date

GetSoonestRenewDate() calculates the renewal due date now also
correctly for auto-renewals after the fixes from bug 29476 so we don't
have to add any if-else checks because of it being buggy anymore.

To test:
 1) prove t/db_dependent/Circulation.t

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 Jonathan Druart 2021-12-15 10:38:36 UTC
No longer apply correctly.
Comment 5 Nick Clemens 2022-03-24 11:46:49 UTC
Created attachment 132129 [details] [review]
Bug 29537: Remove unnecessary if-else checks for soonest renew date

GetSoonestRenewDate() calculates the renewal due date now also
correctly for auto-renewals after the fixes from bug 29476 so we don't
have to add any if-else checks because of it being buggy anymore.

To test:
 1) prove t/db_dependent/Circulation.t
Comment 6 David Nind 2022-04-20 22:15:01 UTC
Created attachment 133505 [details] [review]
Bug 29537: Remove unnecessary if-else checks for soonest renew date

GetSoonestRenewDate() calculates the renewal due date now also
correctly for auto-renewals after the fixes from bug 29476 so we don't
have to add any if-else checks because of it being buggy anymore.

To test:
 1) prove t/db_dependent/Circulation.t

Signed-off-by: David Nind <david@davidnind.com>
Comment 7 Marcel de Rooy 2022-04-29 07:45:11 UTC
QAing
Comment 8 Marcel de Rooy 2022-04-29 08:32:41 UTC
Created attachment 134348 [details] [review]
Bug 29537: Remove unnecessary if-else checks for soonest renew date

GetSoonestRenewDate() calculates the renewal due date now also
correctly for auto-renewals after the fixes from bug 29476 so we don't
have to add any if-else checks because of it being buggy anymore.

To test:
 1) prove t/db_dependent/Circulation.t

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 9 Marcel de Rooy 2022-04-29 08:33:49 UTC
Subtest: GetSoonestRenewDate tests passes, altough currently the whole Circulation.t fails (also without this patch)
Comment 10 Fridolin Somers 2022-05-03 20:50:00 UTC
Circulation.t is OK for me with and without this patch
Comment 11 Fridolin Somers 2022-05-03 21:27:35 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 12 Kyle M Hall 2022-05-13 16:07:42 UTC
Pushed to 21.11.x for 21.11.06
Comment 13 Victor Grousset/tuxayo 2022-06-23 01:58:21 UTC
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.
Comment 14 Martin Renvoize 2022-06-23 13:38:52 UTC
Architectural change, no workflow differences. No documentation changes required.