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

Create export_history table, schema, API

    XMLWordPrintable

Details

    • Story
    • Status: Closed (View Workflow)
    • P2
    • Resolution: Done
    • None
    • 13.2.0
    • None

    Description

      Purpose/Overview:
      User should be able to see in which EDI export concrete order was included

      Requirements/Scope:

      1. Table "export_history" created
      2. Add schema "export_history"
      3. Only GET API should be supported

      Approach:
      1. Add schema export_history.json to acq-models model
      2. Add table "export_history"

      Schema of the export_history:

      {
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "Export orders or order lines history",
        "type": "object",
        "properties": {
          "id": {
            "description": "UUID of this history record",
            "$ref": "../../common/schemas/uuid.json"
          },
          "exportType": {
            "description": "UUID of the export Job",
            "$ref": "../../common/schemas/uuid.json"
          },
          "exportJobId": {
            "description": "Free form commentary",
            "type": "string"
          },
         "exportDate": {
            "description": "Export date",
            "type": "string",
            "format": "date-time"
          },
          "exportedPoLineIds": {
            "description": "References the purchase order lines associated to the export",
            "id": "exportedPoLineIds",
            "type": "array",
            "items": {
              "description": "UUID of the purchase order line",
              "type": "string"
            }
          }
        },
        "additionalProperties": false,
        "required": [
          "exportType",
          "exportJobId",
          "exportDate"
        ]
      }
      
      

      Sample:

      {
        "id": "99fb699a-cdf1-11e9-a9d9-f2801f1b9aa1",
        "exportType": "EDIFACT_ORDERS_EXPORT",
        "exportJobId": "22fb627a-cdf1-11e8-a8d5-f2801f1b9aa1",
        "exportDate": "2020-12-25",
        "exportedPoLineIds": [
          "11fb627a-cdf1-11e8-a8d5-f2801f1b9fd1",
          "11fb627a-cdf1-11e8-a8d5-f2801f1b9fd2",
          "11fb627a-cdf1-11e8-a8d5-f2801f1b9fd3",
          "11fb627a-cdf1-11e8-a8d5-f2801f1b9fd4"
        ]
      }
      
      

       

      3. Add simple API only with GET methods

      Acceptance criteria:

      • History schema created
      • Table added
      • API created
      • Unit tests

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                Andrei_Makaranka Andrei Makaranka
                siarhei_hrabko Siarhei Hrabko
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases