Details
-
Bug
-
Status: Closed (View Workflow)
-
P2
-
Resolution: Done
-
None
-
-
EPAM-Veg Sprint 134, EPAM-Veg Sprint 135, EPAM-Veg Sprint 136
-
3
-
Vega
-
Lotus (R1 2022) Bug Fix
-
Incomplete/missing requirements
Description
Overview:
When attempting to create a request via edge/mod-patron using the /patron/account/<patronId>/instance/<instanceId>/hold endpoint with TLR enabled, a true title-level request should be created (requestLevel="Title"). Instead, every request made via this endpoint results in an item-level request (TLR-lite).
Steps to Reproduce:
- Log into folio-snapshot
- Enable TLR
- Attempt to place a request via the edge/mod-patron endpoint:
curl --location --request POST 'https://folio-snapshot.dev.folio.org:8000/patron/account/24601/instance/30fcc8e7-a019-43f4-b642-2edc389f4501/hold?apikey=<edge-api-key>' \ --header 'Content-Type: application/json' \ --data-raw '{ "requestDate": "2022-02-08T22:16:06.686Z", "pickupLocationId": "3a40852d-49fd-4df2-a1f9-6e2641a6e91f" }'
Expected Results:
Title level request created successfully in FOLIO.
Actual Results:
Item level request created in FOLIO.
Additional Information:
I did some additional digging into the APIs, and I think the root cause of this issue is that while the mod-circulation endpoint used by mod-patron (/circulation/requests/instances) requires an "instanceLevel" attribute in its JSON payload, it doesn't appear that it actually works if you specify "Title" as the level. You receive the following error:
Failed to place a request for the instance. Reasons: validation failure: reason: "Attempt to create TLR request linked to an item", parameters: key: itemId, value: 1714f71f-b845-444b-a79e-a577487a6f7d%nkey: holdingsRecordId, value: 133a7916-f05e-4df4-8f7f-09eb2a7076d1%nvalidation failure: reason: "Attempt to create TLR request linked to an item", parameters: key: itemId, value: 1714f71f-b845-444b-a79e-a577487a6f7d%nkey: holdingsRecordId, value: 133a7916-f05e-4df4-8f7f-09eb2a7076d1%nvalidation failure: reason: "Attempt to create TLR request linked to an item", parameters: key: itemId, value: 1714f71f-b845-444b-a79e-a577487a6f7d%nkey: holdingsRecordId, value: 133a7916-f05e-4df4-8f7f-09eb2a7076d1%nvalidation failure: reason: "Attempt to create TLR request linked to an item", parameters: key: itemId, value: 1714f71f-b845-444b-a79e-a577487a6f7d%nkey: holdingsRecordId, value: 133a7916-f05e-4df4-8f7f-09eb2a7076d1%nvalidation failure: reason: "Attempt to create TLR request linked to an item", parameters: key: itemId, value: 1714f71f-b845-444b-a79e-a577487a6f7d%nkey: holdingsRecordId, value: 133a7916-f05e-4df4-8f7f-09eb2a7076d1%nvalidation failure: reason: "Attempt to create TLR request linked to an item", parameters: key: itemId, value: 1714f71f-b845-444b-a79e-a577487a6f7d%nkey: holdingsRecordId, value: 133a7916-f05e-4df4-8f7f-09eb2a7076d1
My guess is that mod-patron is always passing "Item" as the "requestLevel" and we haven't run into this bug yet because of it.
URL:
Interested parties:
TestRail: Results
Attachments
Issue Links
- is blocked by
-
CIRC-1442 Choose request level and request type when creating a request
-
- Closed
-
- is defined by
-
CIRC-1442 Choose request level and request type when creating a request
-
- Closed
-
-
MODPATRON-107 SPIKE Investigate how to handle TLR with mod-patron
-
- Closed
-
-
MODPATRON-108 Change mod-patron response in case of creating instance requests
-
- Closed
-
- relates to
-
CIRC-1507 When TLR feature is disabled, assign ILR during instance level requests creation
-
- Closed
-
-
FAT-1614 Edge patron test fails due to missing request level
-
- Closed
-
-
UXPROD-1796 Title Level Requests Complete (part 1)
-
- Closed
-