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

Closing an order fails when all encumbrances are already released

    XMLWordPrintable

Details

    • ACQ Sprint 114
    • 1
    • Thunderjet
    • R1 2021 Hot FIx #2
    • Yes

    Description

      Overview:
      Steps to Reproduce:

      1. Create an order
      2. Add an order line, quantity=2, unit price=$37.5 (Details probably don't matter)
      3. Open the order
      4. Create an invoice
      5. Add an invoice line related to the po line
      6. Approve the invoice
      7. Pay the invoice
      8. Close the order

      Expected Results:

      The order closes.

      Actual Results:

      The order fails to close. The request to mod-orders returns a 422 error:

      {
       "errors" : [ {
       "message" : "{\"errors\":[{\"message\":\"must not be null\",\"type\":\"1\",\"code\":\"-1\",\"parameters\":[{\"key\":\"id\",\"value\":\"null\"}]}]}",
       "code" : "genericError",
       "parameters" : [ ]
       } ],
       "total_records" : 1
      }

      Additional Information:

      The issue comes from OpenToClosedEncumbranceStrategy in mod-orders. When an order is closed and the only linked encumbrance is released, getOrderEncumbrances() returns an empty list and createOrUpdateEncumbrances() fails in createOrUpdateOrderTransactionSummary() because it assumes it can get an order id from the list of encumbrances.
      The error message comes from mod-orders calling mod-finance with a null id.
      It is possible the issue was introduced by MODORDERS-482 with the implementation change in TransactionSummariesService#createOrUpdateOrderTransactionSummary.

      Interested parties:

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                dennisbridges Dennis Bridges
                damieng Damien Guillaume
                Dennis Bridges Dennis Bridges
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases