department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
281 stars 198 forks source link

[FSR] BE support for housing expenses update #91473

Closed Dr-Pongo closed 1 week ago

Dr-Pongo commented 3 weeks ago

Issue Description

Just wanted to confirm the BE can support enabling the housing expense feature flag changes before we work on a release plan. Most of the calculation logic is set up on the FE, but wanted to confirm the BE full transforms supports the new data structure.

Feature flag: financial_status_report_expenses_update FE structure changes: Before: data.expenses.expenseRecords (array) After: data.expenses.monthlyHousingExpenses (string)

Note from Derek: We may need backwards compatability in the data we are storing for in progress/submitted forms.\

Look into calculate expenses endpoint

Tasks

Design and Front End sync on implementation of design

Acceptance Criteria

Testing

Test procedures:
If additional testing steps or credentials to perform testing are needed list them here

Ticket Creation - Definition of Ready

digitaldrk commented 2 weeks ago

Search for expenseRecords in vets-api

maxx1128 commented 1 week ago

I checked the codebase and can confirm that monthlyHousingExpenses is part of the new expense calculator. It's specifically at modules/debts_api/lib/debts_api/v0/fsr_form_transform/enhanced_expense_calculator.rb:23. It is saved under the rentOrMortgage key in the form's expenses property.

So if you go to the FinancialStatusReportsCalculations controller and hit the all_expenses endpoint, then the monthlyHousingExpenses value will be under the rentOrMortgage property.

cc: @Dr-Pongo @digitaldrk

maxx1128 commented 1 week ago

@Dr-Pongo and @digitaldrk confirmed this as well, so this ticket is good to close 👍