Repro steps in snapshot:
Steps to repro:
- Log into snapshot as diku_admin
- Go to inventory and copy the barcode for any available item
- Check it out to any active user
- Now go to the user's record
- Then go to their Loans page
- Then click the loan record to drill down to loan details
Expected: Should display without error
Actual: Displays two different errors two times each. Once you have clicked the errors away, the page displays fine and the errors never reappear (even after clearing cache)
Shows up in Chalmers dry run Fameflower environment, but also in Edelweiss.
Very often when you go to a user and try to access that users's loan detail record you will get 4 error messages before you can access the record in the loan detail ui. But it is only the first time you try to access a loan detail record from this person (in a time frame that I have not been able to figure out) the error shows. If you try to recreate the error you must choose a new user and new loans.
Screen recording where you can see what is happening: https://chalmersuniversity.box.com/s/oth5f352j5t4ukeyt6zzwlelxvoam1vw
- Find a user that you have not looked at for a period, and that has loan
- Click on the user's Open loans
- Click on one of the existing loans
The Loan action history page is opened, and populated with relevant loan data
The error described above is produced, with multiple error messages appearing on the screen (see attached).
After the operator clicks Ok on all the error modals, the Loan action history page appears. It is populated with some but not all of the relevant loan data.
The Loan policy field is empty (signaled with a dash, "-"). Looking at dev tools, you can see that requests to loan-policies and requests APIs failed, presumably because both queries contain an empty id parameter.
However, if you hover over the dash representing the missing loan policy, you can see that this actually links to the correct loan policy. There is clearly some kind of disconnect/lag here, as the UI displays the Loan policy field as empty despite being aware of the correct loan policy id.
Now, reload the page. The Loan action history page is opened, and is now populated with all the relevant loan data - including the Loan policy. Whatever disconnect/lag previously existed appears to have been resolved.