Skip to content

Commit

Permalink
#2857 - Remove formio long variables (#3613)
Browse files Browse the repository at this point in the history
# RENAME OR REMOVE FORM IO LONG AND OBSOLETE VARIABLES

- [x] Removed/updated the long variable names and obsolete variables in
student application forms (`SFAA*`) and supporting users
forms(`supportingusersparent*` and `supportinguserspartner*`)
- [x] Created a spreadsheet which contains all the removed/updated
variables and their impact on workflow and data inventory reports.
Attached here.


![image](https://github.com/user-attachments/assets/3c0020d0-96d4-4877-9bec-39fd1894afb4)


[Long_Variable_names.xlsx](https://github.com/user-attachments/files/16531153/Long_Variable_names.xlsx)
- [x] Adjusted the workflow variables which were affected by the
changes.
- [x] Renamed variable `federalAwardBCAGAmount` to
`provincialAwardBCAGAmount` in all `parttime-assessment-*.bpmn`.
- [x] Adjusted workflow E2E tests on variables which affected workflow.
- [x] Smoke tested with FT and PT application submissions and also
validated long variables.
  • Loading branch information
dheepak-aot authored Aug 7, 2024
1 parent 52fb88c commit dc25cab
Show file tree
Hide file tree
Showing 20 changed files with 946 additions and 1,263 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ or (calculatedDataPartnerFedralProvincialPDReceiptCost &gt; 0)</bpmn:conditionEx
<bpmn:intermediateThrowEvent id="Event_0jry7fc" name="calculatedDataTotalParentNetIncome">
<bpmn:extensionElements>
<zeebe:ioMapping>
<zeebe:output source="=studentDataPleaseProvideAnEstimationOfYourParentsIncome" target="calculatedDataTotalParentNetIncome" />
<zeebe:output source="=studentDataStudentParentsTotalIncome" target="calculatedDataTotalParentNetIncome" />
</zeebe:ioMapping>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0g6wvij</bpmn:incoming>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ or (calculatedDataPartnerFedralProvincialPDReceiptCost &gt; 0)</bpmn:conditionEx
<bpmn:intermediateThrowEvent id="Event_0jry7fc" name="calculatedDataTotalParentNetIncome">
<bpmn:extensionElements>
<zeebe:ioMapping>
<zeebe:output source="=studentDataPleaseProvideAnEstimationOfYourParentsIncome" target="calculatedDataTotalParentNetIncome" />
<zeebe:output source="=studentDataStudentParentsTotalIncome" target="calculatedDataTotalParentNetIncome" />
</zeebe:ioMapping>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0g6wvij</bpmn:incoming>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,7 @@ or (calculatedDataPartnerFedralProvincialPDReceiptCost &gt; 0)</bpmn:conditionEx
<bpmn:intermediateThrowEvent id="Event_0jry7fc" name="calculatedDataTotalParentNetIncome">
<bpmn:extensionElements>
<zeebe:ioMapping>
<zeebe:output source="=studentDataPleaseProvideAnEstimationOfYourParentsIncome" target="calculatedDataTotalParentNetIncome" />
<zeebe:output source="=studentDataStudentParentsTotalIncome" target="calculatedDataTotalParentNetIncome" />
</zeebe:ioMapping>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0g6wvij</bpmn:incoming>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<zeebe:header key="partner1TotalIncome" value="$.supportingUsers.Partner1.supportingData.totalIncome" />
<zeebe:header key="applicationId" value="$.applicationId" />
<zeebe:header key="studentDataEstimatedSpouseIncome" value="$.data.estimatedSpouseIncome" />
<zeebe:header key="studentDataPleaseProvideAnEstimationOfYourParentsIncome" value="$.data.pleaseProvideAnEstimationOfYourParentsIncome" />
<zeebe:header key="studentDataStudentParentsTotalIncome" value="$.data.studentParentsTotalIncome" />
<zeebe:header key="studentDataWhenDidYouGraduateOrLeaveHighSchool" value="$.data.whenDidYouGraduateOrLeaveHighSchool" />
<zeebe:header key="studentDataLivingathomeRent" value="$.data.livingathomeRent" />
<zeebe:header key="studentDataTransportationCost" value="$.data.transportationCost" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -768,9 +768,9 @@ dmnX (comes from dmn)</bpmn:text>
<bpmn:intermediateThrowEvent id="Event_13hierd" name="calculate BCAG">
<bpmn:extensionElements>
<zeebe:ioMapping>
<zeebe:output source="= if (calculatedDataTotalFamilyIncome &#60;= dmnPartTimeAwardFamilySizeVariables.limitAwardBCAGIncomeCap)&#10;then dmnPartTimeAwardAllowableLimits.limitAwardBCAGAmount&#10;else&#10; max(dmnPartTimeAwardAllowableLimits.limitAwardBCAGAmount - ((calculatedDataTotalFamilyIncome - dmnPartTimeAwardFamilySizeVariables.limitAwardBCAGIncomeCap) * dmnPartTimeAwardFamilySizeVariables.limitAwardBCAGSlope),&#10; 100&#10; )" target="federalAwardBCAGAmount" />
<zeebe:output source="= if (calculatedDataTotalFamilyIncome &#60;= dmnPartTimeAwardFamilySizeVariables.limitAwardBCAGIncomeCap)&#10;then dmnPartTimeAwardAllowableLimits.limitAwardBCAGAmount&#10;else&#10; max(dmnPartTimeAwardAllowableLimits.limitAwardBCAGAmount - ((calculatedDataTotalFamilyIncome - dmnPartTimeAwardFamilySizeVariables.limitAwardBCAGIncomeCap) * dmnPartTimeAwardFamilySizeVariables.limitAwardBCAGSlope),&#10; 100&#10; )" target="provincialAwardBCAGAmount" />
<zeebe:output source="=dmnPartTimeAwardAllowableLimits.limitAwardBCAGAmount - programYearTotalPartTimeBCAG" target="limitAwardBCAGRemaining" />
<zeebe:output source="=if (awardEligibilityBCAG = true and federalAwardBCAGAmount &#62;= 100 and limitAwardBCAGRemaining &#62;= 100)&#10;then&#10; min(calculatedDataTotalRemainingNeed3, limitAwardBCAGRemaining, federalAwardBCAGAmount)&#10;else&#10;0" target="provincialAwardNetBCAGAmount" />
<zeebe:output source="=if (awardEligibilityBCAG = true and provincialAwardBCAGAmount &#62;= 100 and limitAwardBCAGRemaining &#62;= 100)&#10;then&#10; min(calculatedDataTotalRemainingNeed3, limitAwardBCAGRemaining, provincialAwardBCAGAmount)&#10;else&#10;0" target="provincialAwardNetBCAGAmount" />
<zeebe:output source="=calculatedDataTotalRemainingNeed3 - provincialAwardNetBCAGAmount" target="calculatedDataTotalRemainingNeed4" />
</zeebe:ioMapping>
</bpmn:extensionElements>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -768,9 +768,9 @@ dmnX (comes from dmn)</bpmn:text>
<bpmn:intermediateThrowEvent id="Event_13hierd" name="calculate BCAG">
<bpmn:extensionElements>
<zeebe:ioMapping>
<zeebe:output source="= if (calculatedDataTotalFamilyIncome &#60;= dmnPartTimeAwardFamilySizeVariables.limitAwardBCAGIncomeCap)&#10;then dmnPartTimeAwardAllowableLimits.limitAwardBCAGAmount&#10;else&#10; max(dmnPartTimeAwardAllowableLimits.limitAwardBCAGAmount - ((calculatedDataTotalFamilyIncome - dmnPartTimeAwardFamilySizeVariables.limitAwardBCAGIncomeCap) * dmnPartTimeAwardFamilySizeVariables.limitAwardBCAGSlope),&#10; 100&#10; )" target="federalAwardBCAGAmount" />
<zeebe:output source="= if (calculatedDataTotalFamilyIncome &#60;= dmnPartTimeAwardFamilySizeVariables.limitAwardBCAGIncomeCap)&#10;then dmnPartTimeAwardAllowableLimits.limitAwardBCAGAmount&#10;else&#10; max(dmnPartTimeAwardAllowableLimits.limitAwardBCAGAmount - ((calculatedDataTotalFamilyIncome - dmnPartTimeAwardFamilySizeVariables.limitAwardBCAGIncomeCap) * dmnPartTimeAwardFamilySizeVariables.limitAwardBCAGSlope),&#10; 100&#10; )" target="provincialAwardBCAGAmount" />
<zeebe:output source="=dmnPartTimeAwardAllowableLimits.limitAwardBCAGAmount - programYearTotalPartTimeBCAG" target="limitAwardBCAGRemaining" />
<zeebe:output source="=if (awardEligibilityBCAG = true and federalAwardBCAGAmount &#62;= 100 and limitAwardBCAGRemaining &#62;= 100)&#10;then&#10; min(calculatedDataTotalRemainingNeed3, limitAwardBCAGRemaining, federalAwardBCAGAmount)&#10;else&#10;0" target="provincialAwardNetBCAGAmount" />
<zeebe:output source="=if (awardEligibilityBCAG = true and provincialAwardBCAGAmount &#62;= 100 and limitAwardBCAGRemaining &#62;= 100)&#10;then&#10; min(calculatedDataTotalRemainingNeed3, limitAwardBCAGRemaining, provincialAwardBCAGAmount)&#10;else&#10;0" target="provincialAwardNetBCAGAmount" />
<zeebe:output source="=calculatedDataTotalRemainingNeed3 - provincialAwardNetBCAGAmount" target="calculatedDataTotalRemainingNeed4" />
</zeebe:ioMapping>
</bpmn:extensionElements>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -768,9 +768,9 @@ dmnX (comes from dmn)</bpmn:text>
<bpmn:intermediateThrowEvent id="Event_13hierd" name="calculate BCAG">
<bpmn:extensionElements>
<zeebe:ioMapping>
<zeebe:output source="= if (calculatedDataTotalFamilyIncome &#60;= dmnPartTimeAwardFamilySizeVariables.limitAwardBCAGIncomeCap)&#10;then dmnPartTimeAwardAllowableLimits.limitAwardBCAGAmount&#10;else&#10; max(dmnPartTimeAwardAllowableLimits.limitAwardBCAGAmount - ((calculatedDataTotalFamilyIncome - dmnPartTimeAwardFamilySizeVariables.limitAwardBCAGIncomeCap) * dmnPartTimeAwardFamilySizeVariables.limitAwardBCAGSlope),&#10; 100&#10; )" target="federalAwardBCAGAmount" />
<zeebe:output source="= if (calculatedDataTotalFamilyIncome &#60;= dmnPartTimeAwardFamilySizeVariables.limitAwardBCAGIncomeCap)&#10;then dmnPartTimeAwardAllowableLimits.limitAwardBCAGAmount&#10;else&#10; max(dmnPartTimeAwardAllowableLimits.limitAwardBCAGAmount - ((calculatedDataTotalFamilyIncome - dmnPartTimeAwardFamilySizeVariables.limitAwardBCAGIncomeCap) * dmnPartTimeAwardFamilySizeVariables.limitAwardBCAGSlope),&#10; 100&#10; )" target="provincialAwardBCAGAmount" />
<zeebe:output source="=dmnPartTimeAwardAllowableLimits.limitAwardBCAGAmount - programYearTotalPartTimeBCAG" target="limitAwardBCAGRemaining" />
<zeebe:output source="=if (awardEligibilityBCAG = true and federalAwardBCAGAmount &#62;= 100 and limitAwardBCAGRemaining &#62;= 100)&#10;then&#10; min(calculatedDataTotalRemainingNeed3, limitAwardBCAGRemaining, federalAwardBCAGAmount)&#10;else&#10;0" target="provincialAwardNetBCAGAmount" />
<zeebe:output source="=if (awardEligibilityBCAG = true and provincialAwardBCAGAmount &#62;= 100 and limitAwardBCAGRemaining &#62;= 100)&#10;then&#10; min(calculatedDataTotalRemainingNeed3, limitAwardBCAGRemaining, provincialAwardBCAGAmount)&#10;else&#10;0" target="provincialAwardNetBCAGAmount" />
<zeebe:output source="=calculatedDataTotalRemainingNeed3 - provincialAwardNetBCAGAmount" target="calculatedDataTotalRemainingNeed4" />
</zeebe:ioMapping>
</bpmn:extensionElements>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { InstitutionTypes } from "../../../models";
import { YesNoOptions } from "@sims/test-utils";

describe(`E2E Test Workflow parttime-assessment-${PROGRAM_YEAR}-awards-amount-BCAG.`, () => {
it("Should determine federalAwardBCAGAmount, provincialAwardNetBCAGAmount when calculatedDataTotalFamilyIncome <= limitAwardBCAGIncomeCap", async () => {
it("Should determine provincialAwardBCAGAmount, provincialAwardNetBCAGAmount when calculatedDataTotalFamilyIncome <= limitAwardBCAGIncomeCap", async () => {
// Arrange
const assessmentConsolidatedData =
createFakeConsolidatedPartTimeData(PROGRAM_YEAR);
Expand All @@ -23,7 +23,7 @@ describe(`E2E Test Workflow parttime-assessment-${PROGRAM_YEAR}-awards-amount-BC
assessmentConsolidatedData,
);
// Assert
// federalAwardBCAGAmount is 1000 (limitAwardBCAGAmount)
// provincialAwardBCAGAmount is 1000 (limitAwardBCAGAmount)
expect(
calculatedAssessment.variables.calculatedDataTotalFamilyIncome,
).toBeLessThan(
Expand All @@ -33,17 +33,17 @@ describe(`E2E Test Workflow parttime-assessment-${PROGRAM_YEAR}-awards-amount-BC
expect(calculatedAssessment.variables.calculatedDataTotalFamilyIncome).toBe(
43000,
);
expect(calculatedAssessment.variables.federalAwardBCAGAmount).toBe(
expect(calculatedAssessment.variables.provincialAwardBCAGAmount).toBe(
calculatedAssessment.variables.dmnPartTimeAwardAllowableLimits
.limitAwardBCAGAmount,
);
expect(calculatedAssessment.variables.federalAwardBCAGAmount).toBe(1000);
expect(calculatedAssessment.variables.provincialAwardBCAGAmount).toBe(1000);
expect(calculatedAssessment.variables.provincialAwardNetBCAGAmount).toBe(
700,
);
});

it("Should determine federalAwardBCAGAmount when calculatedDataTotalFamilyIncome > limitAwardBCAGIncomeCap", async () => {
it("Should determine provincialAwardBCAGAmount when calculatedDataTotalFamilyIncome > limitAwardBCAGIncomeCap", async () => {
// Arrange
const assessmentConsolidatedData =
createFakeConsolidatedPartTimeData(PROGRAM_YEAR);
Expand All @@ -58,7 +58,7 @@ describe(`E2E Test Workflow parttime-assessment-${PROGRAM_YEAR}-awards-amount-BC
assessmentConsolidatedData,
);
// Assert
// federalAwardBCAGAmount is less than 1000
// provincialAwardBCAGAmount is less than 1000
expect(
calculatedAssessment.variables.calculatedDataTotalFamilyIncome,
).toBeGreaterThan(
Expand All @@ -68,7 +68,7 @@ describe(`E2E Test Workflow parttime-assessment-${PROGRAM_YEAR}-awards-amount-BC
expect(calculatedAssessment.variables.calculatedDataTotalFamilyIncome).toBe(
53000,
);
expect(calculatedAssessment.variables.federalAwardBCAGAmount).toBe(
expect(calculatedAssessment.variables.provincialAwardBCAGAmount).toBe(
Math.max(
calculatedAssessment.variables.dmnPartTimeAwardAllowableLimits
.limitAwardBCAGAmount -
Expand All @@ -80,9 +80,9 @@ describe(`E2E Test Workflow parttime-assessment-${PROGRAM_YEAR}-awards-amount-BC
100,
),
);
expect(calculatedAssessment.variables.federalAwardBCAGAmount).toBeLessThan(
1000,
);
expect(
calculatedAssessment.variables.provincialAwardBCAGAmount,
).toBeLessThan(1000);
});

it("Should determine provincialAwardNetBCAGAmount when awardEligibilityBCAG is true", async () => {
Expand All @@ -106,7 +106,7 @@ describe(`E2E Test Workflow parttime-assessment-${PROGRAM_YEAR}-awards-amount-BC
// provincialAwardNetBCAGAmount is 700.
expect(calculatedAssessment.variables.awardEligibilityBCAG).toBe(true);
expect(
calculatedAssessment.variables.federalAwardBCAGAmount,
calculatedAssessment.variables.provincialAwardBCAGAmount,
).toBeGreaterThan(100);
expect(calculatedAssessment.variables.provincialAwardNetBCAGAmount).toBe(
700,
Expand Down Expand Up @@ -186,7 +186,7 @@ describe(`E2E Test Workflow parttime-assessment-${PROGRAM_YEAR}-awards-amount-BC
});

it(
"Should determine federalAwardBCAGAmount to be 1000, provincialAwardNetBCAGAmount to be 700 when " +
"Should determine provincialAwardBCAGAmount to be 1000, provincialAwardNetBCAGAmount to be 700 when " +
"student's current year income is 20001 and their relationship status is single.",
async () => {
// Arrange
Expand All @@ -211,11 +211,13 @@ describe(`E2E Test Workflow parttime-assessment-${PROGRAM_YEAR}-awards-amount-BC
expect(
calculatedAssessment.variables.calculatedDataTotalFamilyIncome,
).toBe(20001);
expect(calculatedAssessment.variables.federalAwardBCAGAmount).toBe(
expect(calculatedAssessment.variables.provincialAwardBCAGAmount).toBe(
calculatedAssessment.variables.dmnPartTimeAwardAllowableLimits
.limitAwardBCAGAmount,
);
expect(calculatedAssessment.variables.federalAwardBCAGAmount).toBe(1000);
expect(calculatedAssessment.variables.provincialAwardBCAGAmount).toBe(
1000,
);
expect(calculatedAssessment.variables.provincialAwardNetBCAGAmount).toBe(
700,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { InstitutionTypes } from "../../../models";
import { YesNoOptions } from "@sims/test-utils";

describe(`E2E Test Workflow parttime-assessment-${PROGRAM_YEAR}-awards-amount-BCAG.`, () => {
it("Should determine federalAwardBCAGAmount when calculatedDataTotalFamilyIncome <= limitAwardBCAGIncomeCap", async () => {
it("Should determine provincialAwardBCAGAmount when calculatedDataTotalFamilyIncome <= limitAwardBCAGIncomeCap", async () => {
// Arrange
const assessmentConsolidatedData =
createFakeConsolidatedPartTimeData(PROGRAM_YEAR);
Expand All @@ -23,7 +23,7 @@ describe(`E2E Test Workflow parttime-assessment-${PROGRAM_YEAR}-awards-amount-BC
assessmentConsolidatedData,
);
// Assert
// federalAwardBCAGAmount is 1000 (limitAwardBCAGAmount)
// provincialAwardBCAGAmount is 1000 (limitAwardBCAGAmount)
expect(
calculatedAssessment.variables.calculatedDataTotalFamilyIncome,
).toBeLessThan(
Expand All @@ -33,17 +33,17 @@ describe(`E2E Test Workflow parttime-assessment-${PROGRAM_YEAR}-awards-amount-BC
expect(calculatedAssessment.variables.calculatedDataTotalFamilyIncome).toBe(
43000,
);
expect(calculatedAssessment.variables.federalAwardBCAGAmount).toBe(
expect(calculatedAssessment.variables.provincialAwardBCAGAmount).toBe(
calculatedAssessment.variables.dmnPartTimeAwardAllowableLimits
.limitAwardBCAGAmount,
);
expect(calculatedAssessment.variables.federalAwardBCAGAmount).toBe(1000);
expect(calculatedAssessment.variables.provincialAwardBCAGAmount).toBe(1000);
expect(calculatedAssessment.variables.provincialAwardNetBCAGAmount).toBe(
700,
);
});

it("Should determine federalAwardBCAGAmount, provincialAwardNetBCAGAmount when calculatedDataTotalFamilyIncome > limitAwardBCAGIncomeCap", async () => {
it("Should determine provincialAwardBCAGAmount, provincialAwardNetBCAGAmount when calculatedDataTotalFamilyIncome > limitAwardBCAGIncomeCap", async () => {
// Arrange
const assessmentConsolidatedData =
createFakeConsolidatedPartTimeData(PROGRAM_YEAR);
Expand All @@ -58,7 +58,7 @@ describe(`E2E Test Workflow parttime-assessment-${PROGRAM_YEAR}-awards-amount-BC
assessmentConsolidatedData,
);
// Assert
// federalAwardBCAGAmount is less than 1000
// provincialAwardBCAGAmount is less than 1000
expect(
calculatedAssessment.variables.calculatedDataTotalFamilyIncome,
).toBeGreaterThan(
Expand All @@ -68,7 +68,7 @@ describe(`E2E Test Workflow parttime-assessment-${PROGRAM_YEAR}-awards-amount-BC
expect(calculatedAssessment.variables.calculatedDataTotalFamilyIncome).toBe(
53000,
);
expect(calculatedAssessment.variables.federalAwardBCAGAmount).toBe(
expect(calculatedAssessment.variables.provincialAwardBCAGAmount).toBe(
Math.max(
calculatedAssessment.variables.dmnPartTimeAwardAllowableLimits
.limitAwardBCAGAmount -
Expand All @@ -80,9 +80,9 @@ describe(`E2E Test Workflow parttime-assessment-${PROGRAM_YEAR}-awards-amount-BC
100,
),
);
expect(calculatedAssessment.variables.federalAwardBCAGAmount).toBeLessThan(
1000,
);
expect(
calculatedAssessment.variables.provincialAwardBCAGAmount,
).toBeLessThan(1000);
});

it("Should determine provincialAwardNetBCAGAmount when awardEligibilityBCAG is true", async () => {
Expand All @@ -106,7 +106,7 @@ describe(`E2E Test Workflow parttime-assessment-${PROGRAM_YEAR}-awards-amount-BC
// provincialAwardNetBCAGAmount is 700.
expect(calculatedAssessment.variables.awardEligibilityBCAG).toBe(true);
expect(
calculatedAssessment.variables.federalAwardBCAGAmount,
calculatedAssessment.variables.provincialAwardBCAGAmount,
).toBeGreaterThan(100);
expect(calculatedAssessment.variables.provincialAwardNetBCAGAmount).toBe(
700,
Expand Down Expand Up @@ -186,7 +186,7 @@ describe(`E2E Test Workflow parttime-assessment-${PROGRAM_YEAR}-awards-amount-BC
});

it(
"Should determine federalAwardBCAGAmount to be 1000, provincialAwardNetBCAGAmount to be 700 when " +
"Should determine provincialAwardBCAGAmount to be 1000, provincialAwardNetBCAGAmount to be 700 when " +
"student's current year income is 20001 and their relationship status is single.",
async () => {
// Arrange
Expand All @@ -211,11 +211,13 @@ describe(`E2E Test Workflow parttime-assessment-${PROGRAM_YEAR}-awards-amount-BC
expect(
calculatedAssessment.variables.calculatedDataTotalFamilyIncome,
).toBe(20001);
expect(calculatedAssessment.variables.federalAwardBCAGAmount).toBe(
expect(calculatedAssessment.variables.provincialAwardBCAGAmount).toBe(
calculatedAssessment.variables.dmnPartTimeAwardAllowableLimits
.limitAwardBCAGAmount,
);
expect(calculatedAssessment.variables.federalAwardBCAGAmount).toBe(1000);
expect(calculatedAssessment.variables.provincialAwardBCAGAmount).toBe(
1000,
);
expect(calculatedAssessment.variables.provincialAwardNetBCAGAmount).toBe(
700,
);
Expand Down
Loading

0 comments on commit dc25cab

Please sign in to comment.