[FOLIO-1100] Move Due Date Logic from UICHKOUT-25 and UICHKOUT-66 to the Server Created: 02/Mar/18 Updated: 12/Nov/18 Resolved: 09/Jul/18 |
|
| Status: | Closed |
| Project: | FOLIO |
| Components: | None |
| Affects versions: | None |
| Fix versions: | None |
| Type: | Task | Priority: | P2 |
| Reporter: | Cate Boerema (Inactive) | Assignee: | Marc Johnson |
| Resolution: | Done | Votes: | 0 |
| Labels: | core, sprint33, sprint34, sprint35, sprint36, sprint37, sprint38, sprint39, sprint40, sprint41, sprint42 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original estimate: | Not Specified | ||
| Issue links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| Sprint: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Tester Assignee: | Adam Shire | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
As I understand it, we have implemented the logic for calculating due date based on loan policy in the UI. We need to move that to the back end so that the logic can be used in other systems such as self check machines which will integrate with FOLIO via API. See
|
| Comments |
| Comment by Cate Boerema (Inactive) [ 02/Mar/18 ] | ||||||||||||||||||||||||||||||||||||||||
|
Jakub Skoczen, I created this based on our conversation but I didn't know which project it should go in. I think it's a pretty high priority. | ||||||||||||||||||||||||||||||||||||||||
| Comment by Michal Kuklis [ 05/Mar/18 ] | ||||||||||||||||||||||||||||||||||||||||
|
Hey everyone here are the current API calls we use in order to perform a checkout:
| ||||||||||||||||||||||||||||||||||||||||
| Comment by Marc Johnson [ 29/Mar/18 ] | ||||||||||||||||||||||||||||||||||||||||
|
I've tried to consolidate the list of validation checks that we want the backend to perform upon checkout, to try to reflect my current understanding of the scope for
The only logic that I think we are moving is the due date calculation for check-out (and renewal, in
And this is either based upon the fixed due date schedule (
Does that cover all of the existing checks that we want to consolidate, as part of
| ||||||||||||||||||||||||||||||||||||||||
| Comment by Marc Johnson [ 11/Apr/18 ] | ||||||||||||||||||||||||||||||||||||||||
|
At the moment the UI applies defaults if the loans policy cannot be fully understood (see below for the defaults). If the loan policy is not either rolling or fixed, the due date will be 14 days in the future. If there is no duration for a rolling period, the duration is set to 10 (for any interval). Michal Kuklis This is how I'm interpreting https://github.com/folio-org/ui-checkout/blob/master/loanUtil.js please let me know if this does not match your understanding. | ||||||||||||||||||||||||||||||||||||||||
| Comment by Cate Boerema (Inactive) [ 11/Apr/18 ] | ||||||||||||||||||||||||||||||||||||||||
We have decided to remove the "indefinite" loan profile for now (see
According to UIS-13 and the loan policy metadata spreadsheet, loan duration is required for rolling loans. Can someone file a bug to get that fixed? | ||||||||||||||||||||||||||||||||||||||||
| Comment by Marc Johnson [ 11/Apr/18 ] | ||||||||||||||||||||||||||||||||||||||||
|
Cate Boerema Thanks for the quick answer. Apologies, I may have caused some confusion. I wasn't suggesting there was a bug with loan policies (and I'm not aware of one, I think the code in UI Check out is just being defensive). Based upon your answers, the expected behaviour (and these scenarios should not occur, due to validation), that if a loans policy cannot be properly understood (e.g. not rolling or fixed, or a rolling period with no interval or unknown duration) then an error should be reported? Would situations like a duration of zero also cause an error? | ||||||||||||||||||||||||||||||||||||||||
| Comment by Michal Kuklis [ 11/Apr/18 ] | ||||||||||||||||||||||||||||||||||||||||
|
Marc Johnson that 14 day rule is old (before we had policies in place). Iif we can get rid of the Indefinite loan profile in https://folio-org.atlassian.net/browse/FOLIO-1178 then I think we can assume that loan profile will be always set to either Fixed or Rolling. | ||||||||||||||||||||||||||||||||||||||||
| Comment by Cate Boerema (Inactive) [ 12/Apr/18 ] | ||||||||||||||||||||||||||||||||||||||||
|
Filed a story to get rid of Indefinite:
| ||||||||||||||||||||||||||||||||||||||||
| Comment by Cate Boerema (Inactive) [ 12/Apr/18 ] | ||||||||||||||||||||||||||||||||||||||||
Not sure why users would ever want to set up a policy with a loan period of zero, so I think it's a real edge case. I seem to recall there was a technical reason why it was implemented the way it was (where there is a number populated by default instead of a blank field with required validation). Anyway, I don't think this would cause an error, necessarily... Michal Kuklis, what do you think? | ||||||||||||||||||||||||||||||||||||||||
| Comment by Marc Johnson [ 27/Jun/18 ] | ||||||||||||||||||||||||||||||||||||||||
|
Cate Boerema Jakub Skoczen Can this be closed now, as we have the check out API in place and the UI is using it? And any new policies we want to apply can be represented in separate issues? | ||||||||||||||||||||||||||||||||||||||||
| Comment by Marc Johnson [ 09/Jul/18 ] | ||||||||||||||||||||||||||||||||||||||||
|
Closing as I believe all of the work needed is complete |