Details
-
Type:
Story
-
Status: Closed (View Workflow)
-
Priority:
P3
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 2.0.0
-
Labels:None
-
Template:customfield_11100 21911
-
Sprint:ACQ Sprint 54
-
Story Points:3
-
Epic Link:
Description
Since it is a requirement that users must be able to specify a po_number, we need a way to verify that the value they specify is both valid and unique.
A valid po_number matches the following regular expression:
^[a-zA-Z0-9]{5,16}$
Checking for uniqueness requires making a request to mod-orders-storage. This code will likely be called from elsewhere in mod-orders, so must be visible.
Acceptance Criteria:
- POST /orders/po_number/validate is defined (e.g. in RAML/ModuleDescriptor) and implemented (code and schemas)
- takes an application/json request with a single field "po_number"
- returns a 204 if valid
- returns a text/plain response indicating the reason it's not valid (e.g. malformed or not unique) with status 400.
- returns a 500 if the call to mod-orders-storage failed, along with a text/plain "internal server error" response body.
- Unit tests
- Api Tests (positive and negative test cases)
TestRail: Results
Attachments
Issue Links
- blocks
-
UIOR-71 Adjustments to po_number field on create/edit order forms
-
- Closed
-
- relates to
-
MODORDERS-130 Update the po_number schema to use camelCase instead of underscore
-
- Closed
-
-
MODORDERS-146 Return application/json (error schema) for all errors
-
- Closed
-
-
MODORDERS-87 Create GET /orders/po_number endpoint for generating a po_number
-
- Closed
-
-
MODORDERS-88 Honor po_number if passed in during order placement.
-
- Closed
-