Details
-
Story
-
Status: Closed (View Workflow)
-
P3
-
Resolution: Done
-
None
-
None
-
-
ACQ Sprint 53, ACQ Sprint 54
-
5
Description
An API is required for querying receiving history. This is a read-only API that only supports GET by CQL query. The API queries a view that combines piece and parts of the po_line tables.
Schema Fields:
(string) id – UUID of this piece
(string) caption – Volume/enumeration information
(string) comment – Free form commentary
(string) item_id – UUID of the item record; Used to obtain barcode, and locationId (via holdingId)
(string) po_line_id – UUID of po_line
(string) po_line_number – Human readable identifier for this po_line
(date-time) received_date – Date received
(string) receiving_note – A note at the po_line level pertaining to receiving/check-in
(string) status – [Received | Expected]
(boolean) supplement – Whether or not this is supplementary material
(string) title – Title of the instance this po_line is associated with
View creation (via script to be executed as part of _/tenant endpoint (e.g. similar to the scripts used to insert reference data, etc.
SELECT pieces.id as id, pieces.jsonb || json_build_object( 'id', pieces.jsonb->>'id', 'po_line_number', po_line->>'po_line_number', 'title', po_line.jsonb->>'title', 'receiving_note', po_line.jsonb->>'receiving_note' ) AS jsonb FROM diku_mod_orders_storage.pieces LEFT OUTER JOIN diku_mod_orders_storage.po_line ON (pieces.jsonb -> 'po_line_id') = (po_line.jsonb -> 'id')
Gives: | id (piece) | jsonb | where jsonb looks like the schema defined above.
Acceptance Criteria:
- The schema, view and API exist as described above.
- 80% unit test coverage - may need to call pieces/po_line apis as part of test setup
TestRail: Results
Attachments
Issue Links
- blocks
-
MODORDERS-72 Define receiving endpoints in RAML
-
- Closed
-
-
MODORDERS-73 Update Module/Deployment Descriptors to include receiving endpoints
-
- Closed
-
- has to be done before
-
MODORDERS-100 Create Piece Records in Orders Storage for items quantity ordered on Order Placement
-
- Closed
-
-
MODORDERS-105 Implement Receiving History flow
-
- Closed
-
- is blocked by
-
MODORDSTOR-30 Create piece schema and API
-
- Closed
-
- relates to
-
MODORDERS-134 Not consistently adding po_line_id fields to po-line sub-objects
-
- Closed
-
-
UXPROD-186 Checkin Item(s) and update details regarding availability
-
- Closed
-
-
UXPROD-187 Receive Item and update details regarding availability
-
- Closed
-