Aggregate metadata for ui-requests
Description
Environment
Potential Workaround
is blocked by
relates to
Checklist
hideTestRail: Results
Activity
Marc Johnson January 27, 2020 at 12:23 PM
Closing as the necessary (and some of the out of scope) properties in this issue are already provided by the requests endpoints.
Cate Boerema May 17, 2018 at 11:24 AM
Per discussion with Jakub and to get this out of lists, marking this unassigned
Jakub Skoczen September 25, 2017 at 1:35 PM
Deferred for now since we are aggregating in the UI
Marc Johnson September 7, 2017 at 1:20 PM
@shale99
The interface will likely use the includes trait. As mod-circulation is not yet a RAML-module-builder based module, I don't believe it can use the aggregation tooling provided, so this implementation will likely be slightly different. When mod-circulation moves to the RAML-module-builder (which is planned) I imagine it will move over to use that tooling.
shale99 September 7, 2017 at 1:14 PMEdited
we have an implementation of something similar to this in mod-users-bl via rmb where we hit a specific endpoint and use the includes trait to indicate which parts to aggregate to the original json
meaning , the schema is a ref to multiple schemas with the includes indicating which refs to populate, this may be a superset of the needed fields
In order to simplify the presentation of a request together with the referenced item, requestor (patron/user) and loan (via the item) provide the facility to include these records in a single request.
API Design
Introduce a new endpoint to provide optional inclusion (thoughts welcome on what this should be named):
GET /circulation/requests/{id}/combined
UI Context
The current requirements for UIREQ issues call for the following fields (some of these properties do not exist yet):
From the item (identified by itemId):
barcode *
title *
author (out of scope)
call number (out of scope)
volume (out of scope)
copy (out of scope)
enumeration (out of scope)
shelving location (out of scope)
From the user (identified by requesterId):
name *
barcode *
patron group
The Requests front-end module (ui-requests), in addition to using its own /requests endpoint from mod-circ-storage, also needs access to related metadata from Users and Items. It would be more efficient to aggregate this data in a back-end business logic module than to try to combine it all in ui-requests.