Uploaded image for project: 'mod-finance-storage'
  1. mod-finance-storage
  2. MODFISTO-91

Budgets aren't updated correctly upon updating/releasing encumbrance

    XMLWordPrintable

    Details

    • Template:
    • Sprint:
      ACQ Sprint 83, ACQ Sprint 84
    • Story Points:
      1
    • Development Team:
      Thunderjet

      Description

      Overview

      This follows MODFISTO-86 and concerns one particular case.

      Updating an encumbrance w/ awaitingPayment which also has status Released.

      The wiki was probably a little unclear about this logic. It has been updated. Specifically:

      ALWAYS DO THIS PART:

      • Update Budget identified by the transaction fiscal year (fiscalYearId) and the source fund (fromFundId)
        • encumbered decreases by the difference between provided and previous transaction.encumbrance.amountAwaitingPayment values
        • awaitingPayment increases by the same amount
        • encumbrance transaction.amount is updated to (initial encumbrance - awaiting payment - expended)

      IN ADDITION TO ABOVE, DO THIS PART IF ENCUMBRANCE IS RELEASED:

      • If encumbrance.status = Released
        • Update the encumbrance
          • transaction.amount becomes 0 (save the original value for updating the budget)
        • Update the budget identified by the transaction fiscal year (fiscalYearId) and the source fund (fromFundId)
          • encumbered decreases by the amount being released
          • available increases by the amount being released
          • unavailable decreases by the amount being released (min 0)

      Actual

      It looks like we're only only performing the second part if status = Released. See the comments in MODINVOICE-113 for an example

      Expected

      See Above... in short:

      • budget.encumbered decreases
      • budget.awaitingPayment increases
      • encumbrance.amount decreases

      Acceptance Criteria

      • logic if updated
      • unit tests are updated

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                cmcnally Craig McNally
                Reporter:
                cmcnally Craig McNally
                Tester Assignee:
                Craig McNally Craig McNally
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases