Uploaded image for project: 'ui-users'
  1. ui-users
  2. UIU-2071

Absence of loanId attribute on account leads to odd Loan Details behavior

    XMLWordPrintable

Details

    • EPAM-Veg Sprint 111, EPAM-Veg Sprint 112
    • 1
    • Vega
    • R1 2021 Bug Fix

    Description

      Overview:

      This is reproduced on Honeysuckle.

      When you create a manual fee/fine through the Users app that is not tied to an item, the loan fee/fine details page behaves as expected. No item information appears, and no loan information appears.

      Sometimes, when you create a fee/fine using the API (like if you are doing migrations and doing POST /accounts), you get a weird phantom link that appears under Loan Details. You click "view", and then you get the open/closed loans page, but no loans.

      After some investigation, it appears that the phantom scenario happens if you make an API call to POST /accounts to create a manual fee/fine but you DO NOT specify a loanId.

      The process through the UI makes things work by setting loanId to "0" since no loan history is present.

      loanId is not required on accountdata.json, so either it needs to be listed as required, or the view fine link needs to recognize a scenario when the loanId is not provided and behave accordingly.

      Sample JSON that can create the buggy behavior (just provide the UUIDs accordingly)

      POST / accounts:

      {
      	"amount": 125.00,
      	"remaining": 0.00,
      	"dateCreated": "2019-09-16T18:40:32.712+00:00",
      	"status": {
      		"name": "Open"
      		},
      	"paymentStatus": {
      		"name": "Outstanding"
      	},
      	"userId": "[INSERT YOUR FOLIO USER UUID]",
          "itemId": "0",
          "materialTypeId": "0",
      	"feeFineType": "[INSERT feeFineType]",
      	"feeFineId": "[INSERT feeFineType Id]",
      	"ownerId": "[INSERT ownerId]",
      	"id": "fc639958-1864-4422-8b9b-18251df3ec34"
      }
      

      POST /feefineactions

      {
          "dateAction": "2020-09-17T18:40:42.712+00:00",
          "typeAction": "Outstanding",
          "comments": "Migrated from Aleph barcode D05268039X",
          "notify": false,
          "amountAction": 125.0,
          "balance": 125.0,
          "accountId": "fc639958-1864-4422-8b9b-18251df3ec34",
          "userId": "[INSERT YOUR FOLIO USER UUID]",
          "id": "e463a955-9751-484a-9642-e0a0b3aee1d4"
      }
      

      TestRail: Results

        Attachments

          Activity

            People

              annamelnyk Anna Melnyk
              enettifee Erin Nettifee
              Erin Nettifee Erin Nettifee
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                TestRail: Runs

                  TestRail: Cases