Details
-
Story
-
Status: Closed (View Workflow)
-
P3
-
Resolution: Won't Do
-
None
-
None
-
-
Thunderjet
Description
Overview
In order to reduce the amount of work the UI needs to do, we're moving some of the logic for associating funds and groups into the business logic layer. Specifically, determining the appropriate fiscal year to use when persisting the groupFundFY record.
MODFISTO-44 makes the groupFundFy.fiscalYearId field optional, allowing the UI to only specify a fundId and groupId. Using this, we need to gather additional information from the ledger that the fund is associated with, then query the fiscal year API.
Approach
1. given provided fund, get the associated ledger using fund.ledgerId
2. guery fiscal years:
- series = ledger.fiscalYearOne.series
- currentDate >= startPeriod
- currentDate < endPeriod
3. if no fiscal year is returned for this period, look for next period
query fiscal years:
- series = ledger.fiscalYearOne.series
- currentDate + 1 year >= startPeriod
- currentDate + 1 year < endPeriod
4. if still nothing, return an error
5. Now that we have a fiscal year, fund and group, we can call storage to persist the relationship via the groupFundFY API.
Acceptance Criteria
- the group-fund-fiscal-years API implementation is updated as described above
- unit tests are updated
- API tests are updated
TestRail: Results
Attachments
Issue Links
- blocks
-
UIF-98 Ability to assign Group(s) to Fund records
-
- Closed
-
-
UIF-107 Add funds to a Group and calculate the summaries
-
- Closed
-
- is blocked by
-
MODFISTO-44 Make GroupFundFy.fiscalYearId not required in schema.
-
- Closed
-
- relates to
-
UXPROD-1851 Addition of Group records to finance app
-
- Closed
-