#5588 - Student current year income appeal#5874
Conversation
There was a problem hiding this comment.
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
studentcurrentyearincomeappealform definition JSON. - Updated assessment consolidated-data workflow mapping to only include
currentYearIncomefor 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.', |
There was a problem hiding this comment.
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.
| '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.', |
| '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.', |
There was a problem hiding this comment.
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.
| '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.', |
| -- 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 |
There was a problem hiding this comment.
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.
| "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;", |
There was a problem hiding this comment.
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.
| "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;", |
| { | ||
| "label": "Please explain your situation:", | ||
| "placeholder": "Type of expense, when expenses occurred and amount", | ||
| "autoExpand": false, | ||
| "tableView": true, | ||
| "validate": { | ||
| "required": true |
There was a problem hiding this comment.
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.
| @@ -0,0 +1,36 @@ | |||
| -- Insert configurations for the student current year income appeal form into the dynamic_form_configurations table. | |||
There was a problem hiding this comment.
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.
| -- 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. |
...nd/apps/db-migrations/src/sql/DynamicFormConfigurations/Insert-appeal-conversion-records.sql
Show resolved
Hide resolved
...nd/apps/db-migrations/src/sql/DynamicFormConfigurations/Insert-appeal-conversion-records.sql
Show resolved
Hide resolved
| public async down(queryRunner: QueryRunner): Promise<void> { | ||
| await queryRunner.query( | ||
| getSQLFileData( | ||
| "Rollback-Insert-appeal-conversion-records.sql", |
There was a problem hiding this comment.
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. | |||
There was a problem hiding this comment.
...es/packages/backend/workflow/src/workflow-definitions/load-assessment-consolidated-data.bpmn
Show resolved
Hide resolved
| <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.{"currentYearIncome": currentYearIncome}" /> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Never mind, this is the approach to be followed.
andrewsignori-aot
left a comment
There was a problem hiding this comment.
Nice work, please take a look at the comments.
andrewsignori-aot
left a comment
There was a problem hiding this comment.
Great work, looks good 👍
|



Migrations
studentcurrentyearincomeappeal,partnercurrentyearincomeappeal,exceptionalexpenseappealisEligible...in the assessment, selecting appeals for an application were erroring without the configuration records.Consolidated Data
currentYearIncome.Student Current Year Income Form
Select:

Submission:
