Uploaded image for project: 'mod-orders-storage'
  1. mod-orders-storage
  2. MODORDSTOR-33

Create GET /orders-storage/po_number

    XMLWordPrintable

Details

    • Story
    • Status: Closed (View Workflow)
    • P3
    • Resolution: Done
    • None
    • 2.0.0
    • 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

            Activity

              People

                cmcnally Craig McNally
                cmcnally Craig McNally
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases