Uploaded image for project: 'mod-patron'
  1. mod-patron
  2. MODPATRON-59

Account lookup fails if patron has fees/fines without item info

    XMLWordPrintable

    Details

    • Template:
    • Sprint:
      Prokopovych - Sprint 116, Prokopovych - Sprint 117, Prokopovych - Sprint 118
    • Story Points:
      5
    • Development Team:
      Prokopovych
    • Release:
      R1 2021 Hot Fix #3
    • Hot Fix Approved by Cap Planning?:
      Yes
    • Hot Fix Approval Comments:
      Need to create Test Rail test case to cover this.
    • Affected Institution:
      Cornell, MO State

      Description

      Update:  Approved as R1 2021 Hot Fix at Capacity Planning Team meeting on May 17, 2021.   Need to create Test Rail test case to cover this.

      Overview:

      The edge-patron /patron/account endpoint has an optional parameter, includeCharges, that is meant to retrieve an array of charges as part of the response. However, with includeCharges=true, the call to /patron/account fails if the user has one or more charges not linked to an item record.

      Steps to Reproduce:

      1. Log into folio-snapshot as diku_admin (or another user with sufficient permissions to assign fees/fines)
      2. Go to the Users app and choose any active user
      3. In the Actions menu, choose 'Create fee/fine'
      4. Enter any fee/fine owner, type, and amount. Do not enter any item information.
      5. Click Charge only to create the new fine.
      6. Using Postman, curl, or your REST client of choice, attempt to retrieve the patron record with includeCharges set – i.e., GET /patron/account/<user ID>?includeCharges=true

      Expected Results: The API returns a 200 response with the patron account object in the body, with an array including information about the fine created in step 4.

      Actual Results: The response is 404 Not Found.

      Additional Information: This can be demonstrated to relate to the lack of item information attached to the loan using two tests:

      • Remove the includeCharges parameter, and the request succeeds
      • Restore includeCharges, remove the previously created fine, and add a new fine with item record information specified. The request succeeds again.

      Interested parties: Cornell (I discovered this issue while converting our patron account display to pull data from FOLIO.)

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                felkerk Kyle Felker
                Reporter:
                mattjlc Matt Connolly
                Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases