Versions Compared

Key

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


AuthorAndrei Makaranka
JIRA task

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

Business Requirements
Architects Review

Raman Auramau

Status
colourYellow
titleIn Progress

PO review

Dennis Bridges

Status
colourYellow
titleIn Progress

...

  • 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.

...

Code Block
languagegroovy
themeMidnight
titleledger_fiscal_year_rollover_budget_collection
collapsetrue
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Contains a list of budgets generated during the rollover. Also budgets include all calculated mounts",
  "type": "object",
  "properties": {
    "budgets": {
      "description": "The list of fiscal year rollover errors",
      "type": "array",
      "items": {
        "$ref": "ledger_fiscal_year_rollover_budget.json"
      }
    },
    "totalRecords": {
      "description": "The number of records contained in this collection",
      "type": "integer",
      "minimum": 0
    }
  },
  "additionalProperties": false,
  "required": [
    "budgets",
    "totalRecords"
  ]
}

Create new DB Table "ledger_fiscal_year_rollover_

...

budget" → schema.json

In the database will be stored records with type of "ledger_fiscal_year_rollover_budget"

Create ledger fiscal year rollover Logs schemas 

...


Code Block
themeMidnight
titleledger_fiscal_year_rollover_budget
collapsetrue
    {
      "tableName": "ledger_fiscal_year_rollover_

...

ledgerRolloverId

UUID

...

Y

...

Schema name : ledger_fiscal_year_rollover_log_collection

Code Block
languagegroovy
themeMidnight
titleledger_fiscal_year_rollover_budget_collection
collapsetrue
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Contains a list of rollover runs",
  "type": "object",
  "properties": {
    "logs": {
      "description": "The list of  rollover runs",budget",
      "fromModuleVersion": "mod-finance-storage-8.1.7",
      "withMetadata": true,
      "index": [
        {
          "fieldName": "ledgerRolloverId",
          "tOps": "ADD",
          "caseSensitive": false,
          "removeAccents": true
        },
        {
          "fieldName": "fundId",
          "tOps": "ADD",
          "caseSensitive": false,
          "removeAccents": true
        },
        {
          "fieldName": "fiscalYearId"
        }
      ],
      "foreignKeys": [
        {
          "typefieldName": "arrayledgerRolloverId",
        "items": {
        "$reftargetTable": "ledger_fiscal_year_rollover_log.json",
      }     }"tableAlias": "ledgerFYROBudget",
    "totalRecords": {
      "descriptiontargetTableAlias": "The number of records contained in this collection",
ledgerFYRO",
          "typetOps": "integerADD",
        "minimum":}
0     } ]
 },   "additionalProperties": false,
  "required": [
    "budgets",
    "totalRecords"
  ]
}

APIs

Ledger Rollover generated Budgets Business API

...

Method

...

Path

...

Request

...

Response

...

Description

...

Interface

...

Notes

...

ledger_fiscal_year_rollover_budget

...

}

Create ledger fiscal year rollover Logs schemas 

Schema name : ledger_fiscal_year_rollover_log

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". 
statusramls/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


Schema name : ledger_fiscal_year_rollover_log_collection

Code Block
languagegroovy
themeMidnight
titleledger_fiscal_year_rollover_budget_collection
collapsetrue
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Contains a list of rollover runs",
  "type": "object",
  "properties": {
    "logs": {
      "description": "The list of  rollover runs",
      "type": "array",
      "items": {
        "$ref": "ledger_fiscal_year_rollover_log.json"
      }
    },
    "totalRecords": {
      "description": "The number of records contained in this collection",
      "type": "integer",
      "minimum": 0
    }
  },
  "additionalProperties": false,
  "required": [
    "budgets",
    "totalRecords"
  ]
}

APIs

Ledger Rollover generated Budgets Business API

Method

Path

Request

Response

Description

Interface

Notes

GET/finance/ledger-rollovers-budgets/{id}NA

ledger_fiscal_year_rollover_budget

GET budgets of the ledger fiscal year rollover by idfinance.ledger-rollovers-budgets.item.getStatus : 200
GET/finance/ledger-rollovers-budgetsNAledger_fiscal_year_rollover_budget_collectionGET budgets of the ledger fiscal year rolloversfinance.ledger-rollovers-budgets.collection.getStatus : 200

Ledger Rollover

...

generated Budgets Storage API

Method

Path

Request

Response

Description

Interface

Notes

GET/finance/ledger-rollovers-
logs
budgets/{id}NA

ledger_fiscal_year_rollover_

log

budget

GET
logs
budgets of the ledger fiscal year rollover by idfinance.ledger-rollovers-
logs
budgets.item.getStatus : 200
GET/finance/ledger-rollovers-
logs
budgetsNAledger_fiscal_year_rollover_
log
budget_collectionGET
logs
budgets of the ledger fiscal year rolloversfinance.ledger-rollovers-
logs
budgets.collection.getStatus : 200

...

Ledger Rollover

...

Logs Business API

Method

Path

Request

Response

Description

Interface

Notes

GET/finance-storage/ledger-rollovers-logs/{id}NA

ledger_fiscal_year_rollover_log

GET logs of the ledger fiscal year rollover by idfinance-storage.ledger-rollovers-logs.item.getStatus : 200
GET/finance-storage/ledger-rollovers-logsNA

ledger_fiscal_year_rollover_log_collection

GET logs of the ledger fiscal year rolloversfinance-storage.ledger-rollovers-logs.collection.getStatus : 200

...


WorkCommentsStory~ Estimate
1
  1. Update schema "ledger_fiscal_year_rollover" with new "action" fieldCreate duplicate of the Budget schema where all amounts are "persistent""action" field
  2. Define schema and table for preview rollover results → Define schema and table for preview rollover resultsnew 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 Jira
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyMODFISTO-319

1
2
  1. Define Storage API : Preview Ledger Rollover → Storage API : Preview Ledger Rollover Budgets and Logs
  2. Implement API → Should be without any logic.
  3. Update delete rollover logic : org.folio.service.rollover.LedgerRolloverService#deleteRollover
  4. Business logic for POST will be implemented in scope of MODFISTO-318
 mod-finance-storage

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

1
3
  1. Define API : Preview Ledger Rollover → Business API : Preview Ledger Rollover Budgets and Logs
  2. Implement API → Should be Proxy to storage layer without any logic
  3. Sending email will be added in scope of MODFIN-257
mod-finance

Jira Legacy
serverSystem Jira
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 Jira
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 Jira
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 "preview_ledger_fiscal_year_rollover", 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 → preview_ledger_fiscal_year_rollover

mod-finance-storage

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


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

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


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

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


...