[CIRC-2029] When retrieving a patron's loans, the response must include an actual title when the item is a DCB virtual item Created: 05/Feb/24  Updated: 08/Feb/24

Status: Prep Deployment
Project: mod-circulation
Components: None
Affects versions: None
Fix versions: None

Type: Story Priority: P1
Reporter: Steve Ellis Assignee: Vignesh Kalyanasundaram
Resolution: Unresolved Votes: 0
Labels: backend
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Defines
is defined by UXPROD-4325 DCB FOLIO circulation In Review
Sprint: Volaris Sprint 184
Story Points: 2
Development Team: Volaris
RCA Group: TBD

 Description   

When a patrons loans are returned, the title of the loaned item helps distinguish the item from other items. In the context of DCB, in the borrowing role, the loaned item may belong to another agency. The only record of the title resides in mod-dcb rather than inventory. When the item is a DCB virtual item, mod-patron must retrieve the title of the item from mod-dcb rather than from the inventory’s umbrella instance.

Additional tickets may need to be created in mod-dcb and edge-patron.

Interested parties Radhakrishnan Gopalakrishnan Vignesh Kalyanasundaram Gurleen Kaur1 Irina Pokhylets

See here for the endpoint: https://github.com/folio-org/mod-patron/blob/4b061c10b33cc13a13c4bfbec5c53f41849f450d/ramls/patron.raml#L32. Currently when the item is DCB the following is returned. The example includes 2 DCB items. The title must not be DCB_INSTANCE (from the umbrella instance) but rather the actual title of the item as received via the DCB transaction from the DCB service.

{
    "totalCharges": {
        "amount": 0.0,
        "isoCurrencyCode": "USD"
    },
    "totalChargesCount": 0,
    "totalLoans": 3,
    "totalHolds": 0,
    "charges": [],
    "holds": [],
    "loans": [
        {
            "id": "3dfc8c2d-01ad-49ba-97ca-1fb297754fe7",
            "item": {
                "instanceId": "9d1b77e4-f02e-4b7f-b296-3f2042ddac54",
                "itemId": "9eccc852-0363-4462-b556-a62d63b858bf",
                "title": "DCB_INSTANCE"
            },
            "loanDate": "2024-02-02T15:58:00.198+00:00",
            "dueDate": "2024-03-04T04:59:59.000+00:00",
            "overdue": false
        },
        {
            "id": "a495a983-3b01-4326-bcaf-d3b2d29bd190",
            "item": {
                "instanceId": "9d1b77e4-f02e-4b7f-b296-3f2042ddac54",
                "itemId": "9eccc852-0363-4462-b556-a62d63b859bf",
                "title": "DCB_INSTANCE"
            },
            "loanDate": "2024-02-05T12:56:27.240+00:00",
            "dueDate": "2024-03-07T04:59:59.000+00:00",
            "overdue": false
        },
        {
            "id": "5fc6bc12-eb5b-4c8b-aca9-5b75413ba615",
            "item": {
                "instanceId": "28d36163-0425-4452-b1f8-1dc4467c52b1",
                "itemId": "917e044f-173c-4445-8293-45a78ef49ace",
                "title": "Magazine - Q1"
            },
            "loanDate": "2024-02-05T13:00:17.767+00:00",
            "dueDate": "2024-04-06T03:59:59.000+00:00",
            "overdue": false
        }
    ]
}


 Comments   
Comment by Steve Ellis [ 06/Feb/24 ]

This change should ultimately bubble up to /patron/account and two querystring params includeLoans and includeHolds without changes to mod-patron.

In order to distinguish between dcb and non-dcb, currently the only identifier we have is the UUID of the umbrella instance. While this is not ideal, it will work. Otherwise more modules will need to be changed (mod-patron, edge patron). Other changes may be required in mod-circ as well if we change the schema.

We are exploring different ways to make this change, both should have a low effort. The first is to provide branching logic in the two places in mod-circ where the title is in scope, and the second is to make a change to the getTitle method. The second method is a simpler change but may have side effects. We’re going to try the simpler getTitle change first and get feedback from Vega.

Generated at Thu Feb 08 22:24:15 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.