Uploaded image for project: 'mod-finance'
  1. mod-finance
  2. MODFIN-110

Enforce allocatedFromIds and allocatedToIds

    XMLWordPrintable

Details

    • Firebird Sprint 88
    • 3
    • Thunderjet

    Description

      Overview

      Allocations and transfers to/from budgets from another budget should be restricted by the fund.allocatedToIds and fund.allocatedFromIds fields in the funds associated with the budgets involved.

      Example

      Given the following funds:

      • HIST allocatedTo: [CANHIST, LATHIST], allocatedFrom: []
      • CANHIST allocatedFrom: [HIST], allocatedTo: []
      • LATHIST allocatedFrom: [], allocatedTo: []

      Transfers/Allocations to/from budgets associated with these funds should be restricted as follows:

      • HIST -> CANHIST should be allowed
      • HIST -> LATHIST should not be allowed since LATHIST doesn't have HIST in allocatedFrom.
      • CANHIST -> (any budgets) should not be allowed
      • LATHIST <-> (any budgets) should not be allowed
      • LATHIST <- (no fromFundId specified) should be allowed - allocation only.

      If an allocation or transfer is disallowed, an appropriate error response should be returned.

      It's possible to allocated to or from a budget from "nowhere" so to speak... i.e. not to/from another budget but from outside the system. Transfers are always between budgets so this statement doesn't apply to transfers.

      Acceptance Criteria

      • Transfers/allocations between budgets should be restricted as described above
      • unit tests are updated
      • api tests are updated

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                Andrei_Makaranka Andrei Makaranka
                cmcnally Craig McNally
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases