Details
Description
As per the conversation on Slack it would be desirable if it were possible to loan an item to a patron using the item's barcode and the patron's barcode rather than UUIDs. It would be even more desirable to model this is a single operation (enpoint) and avoid the following steps the UI has to perform now:
No. | Name | API endpoint | Description |
---|---|---|---|
1. | fetchItemByBarcode | GET inventory/items?query=(barcode==BARCODE) | fetch item by barcode |
2. | checkForLoan | GET circulation/loans?query=(itemId==ITEM_ID and status.name<>"Closed") | check if loan already exists for the given item id |
3. | fetchLoanPolicyId | GET circulation/loan-rules/apply | fetch loan policy id by: shelving_location_id, item_type_id, loan_type_id, patron_type_id |
4. | fetchLoanPolicy | GET loan-policy-storage/loan-policies?query=(id==LOAN_POLICY_ID) | fetch loan policy by loan policy id |
5. | fetchFixedDueDateSchedules | GET fixed-due-date-schedule-storage/fixed-due-date-schedules?query=(id==FIXED_DUE_DATE_SCHEDULE_ID) | fetch fixed due date schedule for given schedule id |
6. | validateFixedDueSchedule | No call | Validate fixedDueDateSchedule on the client |
7. | postLoan | POST circulation/loans | creates new loan |
On top of what happens right now, the new endpoint should validate the input:
- user is active and not expired
- if checking out as proxy, the proxy relationship is valid and not expire
- the item is loanable (skipped for now)
TestRail: Results
Attachments
Issue Links
- blocks
-
FOLIO-1100 Move Due Date Logic from UICHKOUT-25 and UICHKOUT-66 to the Server
-
- Closed
-
-
FOLIO-1101 Move Renewal Due Date Logic to the Server
-
- Closed
-
-
UICHKOUT-419 Wire up new checkout API
-
- Closed
-
-
UIU-216 Loans: Renewal Count Slow to Update
-
- Closed
-
- is duplicated by
-
CIRC-82 Gather loan business logic behind a loan API
-
- Closed
-
- relates to
-
CIRC-100 Endpoint to renew a loan by barcode
-
- Closed
-
-
FOLIO-1216 Checkout takes about 10 seconds for ~2.5 million records
-
- Closed
-
-
UICHKOUT-69 Check-out takes more than 2 seconds per item
-
- Closed
-