Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


AuthorAndrei Makaranka
JIRA task

Jira Legacy
serverSystem JiraJIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyUXPROD-2899

Business Requirements
Architects Review

Raman Auramau

Status
colourYellowGreen
titleIn ProgressDONE

PO review

Dennis Bridges

Status
colourYellowGreen
titleIn ProgressDONE

Table of Contents
maxLevel5

...

VersionDateOwnerDescriptionReason
v1.006.14.2022Andrei Makaranka Initial version
v2.006.22.2022Schema changed and WBS added
v2.106.30.2022Status for preview added
v3.007.07.20202022Andrei Makaranka Redesign and rollover logs functionality added Requirements changed

Overview

...

v4.008.03.2022Andrei Makaranka Rename "action" field tp "rolloverType"

Overview

Allow user to generate a rollover report that will tell the user what errors may occur if rolling over with current data.

...

  • Ledger Fiscal Year Rollover already implemented.
  • It is likely that we will be creating upwards of 75000 - 100000 encumbrances during this process. (statistics from Library). 
  • Prepare report with Unpaid invoices is UI responsibility.

...

PropertyTypeRead OnlyDefaultRequiredNotes

actionrolloverType

enum ["Preview", "Commit", "Rollback"]


truefalseCommit

Y

  • Current scheme for rollover records - add a column/flag to mark every rollover if it is a real or a preview one - this will also keep the history of completed previews

...

PropertyTypeRead OnlyDefaultRequiredNotes

ledgerRolloverId

UUID


trueNA

Y


startDatedate-timetrueNAYThis is "creratedDate" from rollover metadata. 
endDatedate-timetrueNA
This is "updatedDate" from rollover metadata. Should be provided only when "status" is "Success" or "Error". status
rolloverStatusramls/acq-models/mod-finance/schemas/rollover_status.jsontrueNAY
errorsLinkString or patterntrueNANIf possible Link should included environment URL : https://okapi-bugfest-lotus.int.aws.folio.org/finance/ledger-rollovers-errors?query=ledgerRolloverId=={id}fff-e-errors 
budgetsLinkString or patterntrueNANIf possible Link should included environment URL : https://okapi-bugfest-lotus.int.aws.folio.org/finance/ledger-rollovers-budgets?query=ledgerRolloverId=={id}fff-
ledgerRolloverTypeenum ["Preview", "Commit", "Rollback"]trueNAY

...

System Jira
  1. Remove index "ledgerId_fromFiscalYearId" from table "ledger_fiscal_year_rollover"
  2. Implement validation logic in the separate validation service:

2.1 If incoming rollover is real with action "Commit", then rollover record should be unique for pair "ledgerId, fromFiscalYearId" (the same as in the index)

2.2 If incoming rollover is real with action "Preview", then rollover record should not be unique for pair "ledgerId, fromFiscalYearId"  and it possible to have many previews for one ledger and same fiscal year.


WorkCommentsStory~ Estimate
1
  1. Update schema "ledger_fiscal_year_rollover" with new "action" field
  2. Define schema and table for preview rollover results → Define new schemas and table

 2.1. Create ledger fiscal year rollover Budget schemas
 2.2. Create ledger fiscal year rollover Log schemas
 2.3. Define new table for storing generated budgets in scope of Rollover

acq-models, mod-finance-storage, mod-finance

Jira Legacy
serverSystem JiraJIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyMODFISTO-319

1
2
  1. Define Storage API : Preview Ledger Rollover → Storage API : Ledger Rollover Budgets
  2. Implement API → Should be without any logic.
 mod-finance-storage

Jira Legacy
serverSystem JiraJIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyMODFISTO-320

1
3
  1. Define and Implement Budgets API → Budgets Ledger Rollover Business API
  2. Define and Implement Logs API → Logs view should be built accordingly with ledger_fiscal_year_rollover_log Ledger Rollover Logs Business API
mod-finance

Jira Legacy
serverSystem JiraJIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyMODFIN-256

1
4
  1. Spike : Implement POC with storing preview result in the temporary tables and after that upload results in the preview rollover table

mod-finance-storage

All all open technical questions should be resolved

Jira Legacy
serverSystem JiraJIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyMODFISTO-322

5
5
  1. Update ledger rollover SQL script with preview rollover logic and store results in the preview rollover table
mod-finance-storage

Jira Legacy
serverSystem JiraJIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyMODFISTO-323


6

Implement Preview rollover flow and update budgets with all calculated amounts

  1. Steps should be run in scope of one DB transaction :

1.1 Rollover script run (field LedgerFiscalYearRollover."action" = "Preview")
1.2 Retrieve result of preview from table "ledger_fiscal_year_rollover_budget", where budgets amounts will be partially filled (MODFISTO-323)
1.3. Go through all budgets and calculate remaining amounts → org.folio.utils.CalculationUtils#calculateBudgetSummaryFields
1.4. Storing updated budgets in the rollover preview table → ledger_fiscal_year_rollover_budget

  2. Update delete rollover logic : org.folio.service.rollover.LedgerRolloverService#deleteRollover. Rollover record  deletion should happened together with rollover budgets in scope of one DB transaction

mod-finance-storage

Jira Legacy
serverSystem JiraJIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyMODFISTO-318


7

Replace unique index in the table "ledger_fiscal_year_rollover" with uniqueness logic in the code

mod-finance-storage
Jira Legacy
servermod-finance-storage

Jira Legacy
serverSystem JIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyMODFISTO-327


8
  1. Spike : To gain knowledge about mod-email and implement example with usage email sending
mod-finance

Jira Legacy
serverSystem JiraJIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyMODFIN-258


9
  1. Implement sending email and include it in the preview ledger rollover flow
mod-finance

Jira Legacy
serverSystem JiraJIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyMODFIN-257


...