Uploaded image for project: 'mod-circulation'
  1. mod-circulation
  2. CIRC-74

Create a loan using item and patron barcodes

    XMLWordPrintable

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

            Activity

              People

                marcjohnson Marc Johnson
                marcjohnson Marc Johnson
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases