Details
-
Story
-
Status: Closed (View Workflow)
-
P3
-
Resolution: Done
-
None
-
None
-
-
ACQ Sprint 54
-
3
Description
An agreement has been reached on the algorithm used when generating po_numbers. The new algorithm is based off a sequential counter ranging from 5-16 digits.
In order to avoid race conditions and duplicate generated values, we need to define a sequence in the database and an API for obtaining the next value in the sequence.
in POST /_/tenant:
CREATE SEQUENCE IF NOT EXISTS po_number START WITH 10000 MAXVALUE 9999999999999999 CACHE 1 NO CYCLE;
new endpoint: GET /orders-storage/po_number
SELECT nextval('po_number');
Acceptance Criteria:
- GET /orders-storage/po_number is defined (e.g. in RAML/ModuleDescriptor) and implemented (code and schema)
- returns an appliacation/json response with a single field "po_number" (status 200)
- tenant scripts (create the sequence if it doesn't exist)
- Implementation
- Unit tests
TestRail: Results
Attachments
Issue Links
- blocks
-
MODORDERS-87 Create GET /orders/po_number endpoint for generating a po_number
-
- Closed
-
-
MODORDERS-107 API Tests for GET /po_number
-
- Closed
-