Uploaded image for project: 'mod-orders'
  1. mod-orders
  2. MODORDERS-176

Failure in inventory interaction, fails the order

    XMLWordPrintable

    Details

    • Template:
    • Sprint:
      ACQ Sprint 85
    • Story Points:
      2
    • Development Team:
      Thunderjet

      Description

      Overview

      An empty material types in order fails order creation even though it's not needed until the order is being opened. This mainly has implications for orders created via mod-gobi/edge-orders. In these cases, it's preferable to have the order creation succeed and the order opening fail; leaving the order in PENDING state. This should be enough to satisfy the external system placing the order.

      To summarize:

      • materialType should NOT be required if the order is PENDING.
      • materialType should be required when opening an order.

      Example:

      $ curl $OKAPI/orders/composite-orders -H "X-Okapi-Token: $TOKEN" -w'\n' -H "Content-type: application/json" -XPOST -d '
      {
        "vendor": "09c6ed1b-3984-4d9a-8f9b-e1200b68b61c",
        "orderType": "One-Time",
        "compositePoLines": [
        {
          "titleOrPackage": "",
          "orderFormat": "Physical Resource",
          "cost": {
            "currency": "USD",
            "listUnitPrice": 10.0,
            "quantityPhysical": 2,
            "poLineEstimatedPrice": 20.0
          },
          "source": "User",
          "acquisitionMethod": "Purchase",
          "locations": [
          {
            "locationId": "758258bc-ecc1-41b8-abca-f7b610822ffd",
            "quantity": 2,
            "quantityPhysical": 2
          }]
        }]
      }'
      {
        "errors" : [ {
          "message" : "The Material Type is required but not available in PO line",
          "code" : "materialTypeRequired",
          "parameters" : [ ]
        } ],
        "total_records" : 1
      }
      

      Acceptance Criteria

      • materialType should NOT be required if the order is PENDING.
      • materialType should be required when opening an order.
      • unit tests are updated
      • api tests are updated

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                aliaksandr_pautau Aliaksandr Pautau
                Reporter:
                KVupp Kruthi Vuppala
                Tester Assignee:
                Aliaksandr Pautau Aliaksandr Pautau
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases