Skip to content

#5588 - Student current year income appeal#5874

Merged
CarlyCotton merged 8 commits intomainfrom
feature/#5588-student-current-year-income-appeal
Mar 12, 2026
Merged

#5588 - Student current year income appeal#5874
CarlyCotton merged 8 commits intomainfrom
feature/#5588-student-current-year-income-appeal

Conversation

@CarlyCotton
Copy link
Collaborator

@CarlyCotton CarlyCotton commented Mar 10, 2026

Migrations

  • Added dynamic form configurations for studentcurrentyearincomeappeal, partnercurrentyearincomeappeal, exceptionalexpenseappeal
    • Because applications have the isEligible... in the assessment, selecting appeals for an application were erroring without the configuration records.
image image

Consolidated Data

  • Updated the consolidated data for Student Current Year Income to not bring in the other variables submitted in the form. Only keeping currentYearIncome.

Student Current Year Income Form

image

Select:
image

Submission:
image

@CarlyCotton CarlyCotton self-assigned this Mar 11, 2026
@CarlyCotton CarlyCotton added DB DB migration involved Camunda Worflow Involves camunda workflow changes Form.io Form IO definitions changed. labels Mar 11, 2026
@CarlyCotton CarlyCotton marked this pull request as ready for review March 11, 2026 01:31
@tiago-graf tiago-graf requested a review from Copilot March 11, 2026 03:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for the “Student Current Year Income” appeal by introducing a new Form.io definition, wiring consolidated assessment data to only carry currentYearIncome, and seeding dynamic form configuration records needed for eligible-appeal selection/conversion flows.

Changes:

  • Added studentcurrentyearincomeappeal form definition JSON.
  • Updated assessment consolidated-data workflow mapping to only include currentYearIncome for the student current-year-income appeal.
  • Added DB migration + SQL scripts to insert/rollback dynamic form configuration records for several appeal form types.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
sources/packages/forms/src/form-definitions/studentcurrentyearincomeappeal.json New Form.io definition for the student current-year-income appeal submission.
sources/packages/backend/workflow/src/workflow-definitions/load-assessment-consolidated-data.bpmn Narrows consolidated appeal data mapping to only currentYearIncome.
sources/packages/backend/apps/db-migrations/src/sql/DynamicFormConfigurations/Insert-appeal-conversion-records.sql Seeds dynamic form configuration records for appeal form types used during eligibility/selection.
sources/packages/backend/apps/db-migrations/src/sql/DynamicFormConfigurations/Rollback-Insert-appeal-conversion-records.sql Rollback script to remove the inserted dynamic form configuration records.
sources/packages/backend/apps/db-migrations/src/migrations/1772752698502-AddAppealConversionRecords.ts TypeORM migration to apply/rollback the new SQL scripts.

'Partner current year income',
'partnercurrentyearincomeappeal',
'Student appeal',
'Submit this appeal to provide your spouse/common-law partner\'' s current year income information IF they have experienced a significant CHANGE IN their financial circumstances since you submitted your Student Financial Aid Application.',
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The partner appeal description contains an escaped apostrophe sequence partner\'' s which will persist a literal backslash and an extra space in the description (rendering like partner\' s). In SQL for Postgres, apostrophes should be escaped as '' with no backslash, and the space before s should be removed so the text reads partner's.

Suggested change
'Submit this appeal to provide your spouse/common-law partner\'' s current year income information IF they have experienced a significant CHANGE IN their financial circumstances since you submitted your Student Financial Aid Application.',
'Submit this appeal to provide your spouse/common-law partner''s current year income information IF they have experienced a significant CHANGE IN their financial circumstances since you submitted your Student Financial Aid Application.',

Copilot uses AI. Check for mistakes.
Comment on lines +32 to +33
'If you have had exceptional expenses that created financial hardship that affected your ability TO START
OR continue your studies these expenses may be considered AS part of your assessment.',
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The exceptional expense form_description includes an embedded newline and inconsistent casing (e.g., TO START, OR, AS) which will likely show up verbatim in the UI. Consider rewriting this as a single, properly cased sentence (or explicit intended formatting) so the description is user-friendly and consistent with other form descriptions.

Suggested change
'If you have had exceptional expenses that created financial hardship that affected your ability TO START
OR continue your studies these expenses may be considered AS part of your assessment.',
'If you have had exceptional expenses that created financial hardship that affected your ability to start or continue your studies, these expenses may be considered as part of your assessment.',

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +9
-- Remove configurations for the student current year income appeal form from the dynamic_form_configurations table.
DELETE FROM
sims.dynamic_form_configurations
WHERE
form_type IN (
'Student current year income',
'Partner current year income',
'Exceptional expense'
); No newline at end of file
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file comment says it removes configurations for only the student current year income appeal, but the DELETE covers three form_type values (Student/Partner current year income and Exceptional expense). Update the comment to match the actual rollback behavior to avoid confusion during future maintenance.

Copilot uses AI. Check for mistakes.
"label": "Current Tax Year",
"persistent": false,
"type": "hidden",
"calculateValue": "// From the program year, get the calendar start year of the the program year.\r\n// e.g. program year = 2022-2023, calendar start year is 2022. And Current tax year should be 2022.\r\nconst [startYear] = data.programYear ? data.programYear.split(\"-\"):[];\r\nvalue = startYear;",
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The calculateValue inline comment has a duplicated word: get the calendar start year of the the program year. Fixing this improves readability and keeps form logic comments consistent across definitions.

Suggested change
"calculateValue": "// From the program year, get the calendar start year of the the program year.\r\n// e.g. program year = 2022-2023, calendar start year is 2022. And Current tax year should be 2022.\r\nconst [startYear] = data.programYear ? data.programYear.split(\"-\"):[];\r\nvalue = startYear;",
"calculateValue": "// From the program year, get the calendar start year of the program year.\r\n// e.g. program year = 2022-2023, calendar start year is 2022. And Current tax year should be 2022.\r\nconst [startYear] = data.programYear ? data.programYear.split(\"-\"):[];\r\nvalue = startYear;",

Copilot uses AI. Check for mistakes.
Comment on lines +199 to +205
{
"label": "Please explain your situation:",
"placeholder": "Type of expense, when expenses occurred and amount",
"autoExpand": false,
"tableView": true,
"validate": {
"required": true
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The placeholder text for the "Other" reason (Type of expense, when expenses occurred and amount) appears to be copied from an expenses flow and does not match a current-year income decrease appeal. Update the placeholder (and, if needed, the panel title) to prompt for income-related details (e.g., reason for income decrease, dates, and estimated amounts) to avoid confusing applicants.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,36 @@
-- Insert configurations for the student current year income appeal form into the dynamic_form_configurations table.
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The header comment mentions only the student current year income appeal, but this script inserts three configurations (student current year income, partner current year income, and exceptional expense). Update the comment so it accurately describes what the script is doing.

Suggested change
-- Insert configurations for the student current year income appeal form into the dynamic_form_configurations table.
-- Insert configurations for the student current year income, partner current year income, and exceptional expense appeal forms into the dynamic_form_configurations table.

Copilot uses AI. Check for mistakes.
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
getSQLFileData(
"Rollback-Insert-appeal-conversion-records.sql",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor, the "I" would be lower case as in "Rollback-insert-appeal-conversion-records.sql".

@@ -0,0 +1,9 @@
-- Remove configurations for the student current year income appeal form from the dynamic_form_configurations table.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<zeebe:header key="appealsRoomAndBoardCostsAppealData" value="appeals.roomandboardcostsappeal.submittedData" />
<zeebe:header key="studentDataPartnerIsAbleToReport" value="data.partnerIsAbleToReport" />
<zeebe:header key="appealsStudentCurrentYearIncomeAppealData" value="appeals.studentcurrentyearincomeappeal.submittedData" />
<zeebe:header key="appealsStudentCurrentYearIncomeAppealData" value="appeals.studentcurrentyearincomeappeal.submittedData.{&#34;currentYearIncome&#34;: currentYearIncome}" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea of mapping the submittedData instead of individual values for appeals was due to the fact that they could be extended and receive more properties, which, in the current way, would not require any change in the load consolidated data.
I would recommend keeping the existing pattern of assigning the submittedData and creating the variable inside the program year calculation.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind, this is the approach to be followed.

Copy link
Collaborator

@andrewsignori-aot andrewsignori-aot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, please take a look at the comments.

@tiago-graf tiago-graf self-requested a review March 11, 2026 19:46
Copy link
Collaborator

@andrewsignori-aot andrewsignori-aot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, looks good 👍

@sonarqubecloud
Copy link

@github-actions
Copy link

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 20.26% ( 4565 / 22529 )
Methods: 9.56% ( 262 / 2741 )
Lines: 24.58% ( 3917 / 15933 )
Branches: 10.01% ( 386 / 3855 )

@github-actions
Copy link

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 48.61% ( 2712 / 5579 )
Methods: 38.57% ( 285 / 739 )
Lines: 55.39% ( 2049 / 3699 )
Branches: 33.13% ( 378 / 1141 )

@github-actions
Copy link

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 79.6% ( 9155 / 11501 )
Methods: 78.79% ( 1181 / 1499 )
Lines: 82.83% ( 6881 / 8307 )
Branches: 64.48% ( 1093 / 1695 )

@github-actions
Copy link

E2E SIMS API Coverage Report

Totals Coverage
Statements: 64.42% ( 12611 / 19575 )
Methods: 60.52% ( 1464 / 2419 )
Lines: 68.18% ( 9208 / 13505 )
Branches: 53.11% ( 1939 / 3651 )

@CarlyCotton CarlyCotton added this pull request to the merge queue Mar 12, 2026
Merged via the queue into main with commit 6a0fced Mar 12, 2026
22 checks passed
@CarlyCotton CarlyCotton deleted the feature/#5588-student-current-year-income-appeal branch March 12, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Camunda Worflow Involves camunda workflow changes DB DB migration involved Form.io Form IO definitions changed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants