Summary: | Wrong test in api/v1/checkouts.t | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Test Suite | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | 1joynelson, joonas.kylmala, lucas, martin.renvoize |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
20.05.00, 19.11.03, 19.05.08
|
|
Circulation function: | |||
Bug Depends on: | 13895 | ||
Bug Blocks: | |||
Attachments: |
Bug 24543: Fix wrong test in api/v1/checkouts.t
Bug 24543: Fix wrong test in api/v1/checkouts.t Bug 24543: Fix wrong test in api/v1/checkouts.t Bug 24543: Fix wrong test in api/v1/checkouts.t |
Description
Jonathan Druart
2020-01-30 10:50:53 UTC
Created attachment 98155 [details] [review] Bug 24543: Fix wrong test in api/v1/checkouts.t In t/db_dependent/api/v1/checkouts.t we define a circulation rule with renewalperiod=7. But then the expected due date is today+14 days. However, at the beginning of the script, the due_date of the issue is today+14 days. That highlight that the renewal period is not taken into account. The circulation rule is created with renewalperiod and renewalsallowed, however GetLoanLength check the existence of issuelength to return the rule. GetLoanLength finally return the default rule, with renewalperiod=0 Note that this has been found working on bug 18936, code will be cleaned on that patchset. Test plan: % prove t/db_dependent/api/v1/checkouts.t must return green before and after this patch Created attachment 98158 [details] [review] Bug 24543: Fix wrong test in api/v1/checkouts.t In t/db_dependent/api/v1/checkouts.t we define a circulation rule with renewalperiod=7. But then the expected due date is today+14 days. However, at the beginning of the script, the due_date of the issue is today+14 days. That highlight that the renewal period is not taken into account. The circulation rule is created with renewalperiod and renewalsallowed, however GetLoanLength check the existence of issuelength to return the rule. GetLoanLength finally return the default rule, with renewalperiod=0 Note that this has been found working on bug 18936, code will be cleaned on that patchset. Test plan: % prove t/db_dependent/api/v1/checkouts.t must return green before and after this patch Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Created attachment 98159 [details] [review] Bug 24543: Fix wrong test in api/v1/checkouts.t In t/db_dependent/api/v1/checkouts.t we define a circulation rule with renewalperiod=7. But then the expected due date is today+14 days. However, at the beginning of the script, the due_date of the issue is today+14 days. That highlight that the renewal period is not taken into account. The circulation rule is created with renewalperiod and renewalsallowed, however GetLoanLength check the existence of issuelength to return the rule. GetLoanLength finally return the default rule, with renewalperiod=0 Note that this has been found working on bug 18936, code will be cleaned on that patchset. Test plan: % prove t/db_dependent/api/v1/checkouts.t must return green before and after this patch Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Created attachment 98163 [details] [review] Bug 24543: Fix wrong test in api/v1/checkouts.t In t/db_dependent/api/v1/checkouts.t we define a circulation rule with renewalperiod=7. But then the expected due date is today+14 days. However, at the beginning of the script, the due_date of the issue is today+14 days. That highlight that the renewal period is not taken into account. The circulation rule is created with renewalperiod and renewalsallowed, however GetLoanLength check the existence of issuelength to return the rule. GetLoanLength finally return the default rule, with renewalperiod=0 Note that this has been found working on bug 18936, code will be cleaned on that patchset. Test plan: % prove t/db_dependent/api/v1/checkouts.t must return green before and after this patch Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Good catch, passing QA Nice work everyone! Pushed to master for 20.05 Pushed to 19.11.x branch for 19.11.03 backported to 19.05.x for 19.05.08 |