Done
Details
Assignee
Antony HruschevAntony HruschevReporter
Gurleen Kaur1Gurleen Kaur1Labels
Priority
P2Story Points
1Sprint
NoneDevelopment Team
VolarisRelease
Ramsons (R2 2024) Bug FixTestRail: Cases
Open TestRail: CasesTestRail: Runs
Open TestRail: Runs
Details
Details
Assignee
Antony Hruschev
Antony HruschevReporter
Gurleen Kaur1
Gurleen Kaur1Labels
Priority
Story Points
1
Sprint
None
Development Team
Volaris
Release
Ramsons (R2 2024) Bug Fix
TestRail: Cases
Open TestRail: Cases
TestRail: Runs
Open TestRail: Runs
Created December 9, 2024 at 7:05 AM
Updated March 14, 2025 at 8:41 AM
Resolved January 10, 2025 at 6:08 AM
UXPROD-5054 - Support DCB Requests on Unavailable Items
Current Behavior:
Currently, a Page request is always created in the LENDER role, assuming the item's status is always available. mod-circ will throw error if the item status is not available
Expected Behavior:
Before creating a request in the LENDER role, the item's status must be checked:
If the item status is Available, create a Page request.
If the item status is Checked out, Paged, In transit, Awaiting pickup, or Awaiting delivery, create a Hold request.
For all other statuses, throw an exception.
Implementation Progress:
The above changes have been implemented, but the flow has not been fully tested. Multiple test cases are required for the same role:
Flow 1: Create a transaction when the item status is Available and complete the status transition as per the state transition diagram.
Flow 2: Create a transaction when the item already has one or more requests (resulting in a Hold request) and complete the status transition as per the state transition diagram.
Anticipated Issue:
Consider a scenario where an item is checked out already(Item status will be Checked out in this case) and a transaction is created. The transaction status will be set to Created. If the patron later returns the item, the existing loan will close, triggering an event (as the system listens for loan events in the LENDER role). There is a possibility that the code could update the transaction status from Created to Closed, which is not the expected behavior.
Proposed Solution:
Currently, when a loan event is received, the transaction is fetched based on
itemId
and atransactionStatus
that is not Closed. For the LENDER role, an additional check needs to be added before updating the transaction status. Specifically, ensure that the transaction status is not Created before making the status change.This solution needs thorough testing to ensure that it does not introduce other issues or unexpected behavior.
You can find the draft code change below, this doesnt have the fix of the above mentioned issue