Details
-
Story
-
Status: Closed (View Workflow)
-
P3
-
Resolution: Done
-
None
-
None
-
-
ACQ Sprint 62
-
3
-
Thunderjet
Description
Overview:
In order to support search and filtering across the various orders tables, we'll need to create a view. The GET /orders API is for querying that view. See https://drive.google.com/open?id=1a1QO6coKWFFy6DhsOBXffa8DPBa9MSeJ for high level details of the approach.
id | j sonb | metadata |
---|---|---|
purchaseOrder.id | purchaseOrder.jsonb | purchaseOrder.jsonb + poLine.jsonb |
For now the metadata column will be a complete merging of json blobs from purchaseOrder and poLine. Later, we might transition this to a smaller subset of fields from those three tables.
Queries will match against the metadata column, but will return the jsonb column containing the purchaseOrder record. The DISTINCT ON functionality added to Raml Module Builder in RMB-305 is required in order to avoid duplicates rows in the results.
- Create view when enabled for a tenant (See the attached SQL)
- implement logic to perform lookup (See the attached POC)
Acceptance Criteria:
- The view is automatically created when the module is enabled for a tenant
- Unit tests exists and cover positive and negative scenarios, including ordering, paging, resultCounts, etc.
TestRail: Results
Attachments
Issue Links
- blocks
-
UIOR-27 Reorganize the search and filter pane on the Orders landing page
-
- Closed
-
-
UIOR-206 Search and filter by Date Ordered and Receipt Status
-
- Closed
-
- has to be done after
-
MODORDSTOR-58 Refactor POLine model - Storage Layer
-
- Closed
-
- has to be done before
-
MODORDERS-219 Update API Tests to cover order search and filtering
-
- Closed
-
-
MODORDERS-227 Search & Filter: Call GET /orders-storage/orders
-
- Closed
-
- is blocked by
-
MODORDERS-97 Formalize the RMB work on DISTINCT (ON) and get it merged w/ Master
-
- Closed
-
-
MODORDERS-158 Refactor POLine model - Schemas
-
- Closed
-
-
RMB-305 Add support for DISTINCT ON
-
- Closed
-
- is cloned by
-
MODORDSTOR-73 Implement GET /order-lines w/ search and filtering
-
- Closed
-
- relates to
-
MODORDSTOR-26 Implement basic GET /orders
-
- Closed
-
-
MODORDSTOR-86 Orders without PO Lines are not returned by /orders-storage/orders
-
- Closed
-
-
UXPROD-1606 Ordering quality assurance enhancements - Round 1
-
- Closed
-