Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#3827 - Student: Sole custody dependant question change #4091

Merged
merged 4 commits into from
Dec 16, 2024

Conversation

lewischen-aot
Copy link
Collaborator

@lewischen-aot lewischen-aot commented Dec 13, 2024

  • Made these changes for the 25-26 program year application form
  • Moved "Are any of the dependants listed above supported by you financially but not under your sole custody?" question to the "Add Dependants" box.
  • Revised the question to: "Is the dependant listed above supported by you financially but not under your sole custody?"
  • Removed the key "Clean value when hidden" ("clearOnHide": false) for file components pdDependentUpload and dependantCustodyFileUpload to retain file data in the data column in each application record.
  • Hooked the file component pdDependentUpload to declaredOnTaxes condition.
  • This question is included for each individual dependant added.
  • Made sure that each individual dependant that has this exception selected has their own exception line on the ministry UI.
  • Applied changes to FT/PT

Note

Please note that the key supportnocustodyDependants is being used in Data Inventory Report SQL script. The current approach moves the key supportnocustodyDependants from applications.data to applications.dependants for applications 2025-2026 only, so the Data Inventory Report CSV file will lose the data for column "Has dependants without sole custody flag" (supportnocustodyDependants) for applications 2025-2026. To retain this data, a simple workaround solution is available in the workaround commit, where the key supportnocustodyDependants is still accessible in applications.data and its value is calculated based on whether any dependant is without sole custody or not inside the dependants array. As discussed in the standup, the workaround is not recommended, so it mentioned here to as a reference to keep developers updated.

Screenshot on the student portal
image

Screenshot on the ministry portal
image

Screenshot of the exception trigger when files are required
image

@lewischen-aot lewischen-aot added User Story Student Student Features Form.io Form IO definitions changed. labels Dec 13, 2024
@lewischen-aot lewischen-aot self-assigned this Dec 13, 2024
@lewischen-aot lewischen-aot marked this pull request as ready for review December 13, 2024 18:47
@andrepestana-aot andrepestana-aot self-requested a review December 13, 2024 20:34
Copy link
Collaborator

@andrepestana-aot andrepestana-aot left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks for the explanation.

Copy link
Collaborator

Choose a reason for hiding this comment

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

There is a weird form.io behavior that apparently is not saving the file properly in the below scenario. It seems to be an unexpected behavior that was not anticipated during the ticket estimation.

Please validate if the below scenario is reproducible.

Steps to reproduce

  • Create a part-time application with 2 dependents.
  • The first dependent should have the questions answered as below.
    • "Declared on taxes due to a disability": yes, attach a file.
    • "Is the dependant listed above supported by you...": yes, yes, attach a file.
  • The second dependent should have the questions answered as below.
    • "Declared on taxes due to a disability": no.
    • "Is the dependant listed above supported by you...": yes, yes, attach a file.

The expected submitted data can be checked before the dryRun execution. Please note all the files are present.

"dependants": [
{
  "fullName": "Son 1",
  "dateOfBirth": "2024-12-01",
  "attendingPostSecondarySchool": "no",
  "declaredOnTaxes": "yes",
  "supportnocustodyDependants": "yes",
  "pdDependentUpload": [
    {
      "storage": "url",
      "originalName": "UploadFile15Kb.txt",
      "name": "UploadFile15Kb-79586b3d-74a4-400b-9a26-31aba6bfb58a.txt",
      "url": "student/files/UploadFile15Kb-79586b3d-74a4-400b-9a26-31aba6bfb58a.txt",
      "size": 15154,
      "type": "text/plain",
      "hash": ""
    }
  ],
  "dependantsIncomeTaxApplicationException": "studentApplicationException",
  "dependantCustodyFileUpload": [
    {
      "storage": "url",
      "originalName": "UploadFile17Kb.txt",
      "name": "UploadFile17Kb-a78e347a-610d-40e2-9caf-40d3f7423a13.txt",
      "url": "student/files/UploadFile17Kb-a78e347a-610d-40e2-9caf-40d3f7423a13.txt",
      "size": 16876,
      "type": "text/plain",
      "hash": ""
    }
  ],
  "dependantsSharedCustodyApplicationException": "studentApplicationException"
},
{
  "fullName": "Son 2",
  "dateOfBirth": "2024-12-01",
  "attendingPostSecondarySchool": "no",
  "declaredOnTaxes": "no",
  "supportnocustodyDependants": "yes",
  "dependantCustodyFileUpload": [
    {
      "storage": "url",
      "originalName": "UploadFile64Kb.txt",
      "name": "UploadFile64Kb-5aaab94a-ee1b-4c6d-bada-a2e1df8fb727.txt",
      "url": "student/files/UploadFile64Kb-5aaab94a-ee1b-4c6d-bada-a2e1df8fb727.txt",
      "size": 65290,
      "type": "text/plain",
      "hash": ""
    }
  ],    

The expected submitted data is not persisted on DB with all data and the application "View/Edit" will be loaded with the file missing. Please note that NOT all the files are present.

[
    {
      "fullName": "Son 1",
      "dateOfBirth": "2024-12-01",
      "declaredOnTaxes": "yes",
      "dependantCustodyFileUpload": [
        {
          "url": "student/files/UploadFile17Kb-a78e347a-610d-40e2-9caf-40d3f7423a13.txt",
          "hash": "",
          "name": "UploadFile17Kb-a78e347a-610d-40e2-9caf-40d3f7423a13.txt",
          "size": 16876,
          "type": "text/plain",
          "storage": "url",
          "originalName": "UploadFile17Kb.txt"
        }
      ],
      "supportnocustodyDependants": "yes",
      "attendingPostSecondarySchool": "no",
      "dependantsSharedCustodyApplicationException": "studentApplicationException"
    },
    {
      "fullName": "Son 2",
      "dateOfBirth": "2024-12-01",
      "declaredOnTaxes": "no",
      "dependantCustodyFileUpload": [
        {
          "url": "student/files/UploadFile64Kb-5aaab94a-ee1b-4c6d-bada-a2e1df8fb727.txt",
          "hash": "",
          "name": "UploadFile64Kb-5aaab94a-ee1b-4c6d-bada-a2e1df8fb727.txt",
          "size": 65290,
          "type": "text/plain",
          "storage": "url",
          "originalName": "UploadFile64Kb.txt"
        }
      ],
      "supportnocustodyDependants": "yes",
      "attendingPostSecondarySchool": "no",
      "dependantsSharedCustodyApplicationException": "studentApplicationException"
    }
  ],

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for putting the extra effort with the investigation.
As we talked, let's consider the "clearOnHide": false as a workaround, lest ask biz to create a ticket to have it fixed and/or have form.io upgraded to the latest version that has a ton of fixes.

Besides that, please check with biz if we should make a similar workaround for the other program years since it is affecting PROD.

Copy link

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 21.94% ( 3786 / 17255 )
Methods: 9.99% ( 219 / 2192 )
Lines: 25.29% ( 3281 / 12971 )
Branches: 13.67% ( 286 / 2092 )

Copy link

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 65.43% ( 583 / 891 )
Methods: 59.26% ( 64 / 108 )
Lines: 68.54% ( 464 / 677 )
Branches: 51.89% ( 55 / 106 )

Copy link

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 80% ( 1336 / 1670 )
Methods: 63.55% ( 136 / 214 )
Lines: 83.49% ( 1123 / 1345 )
Branches: 69.37% ( 77 / 111 )

Copy link

E2E SIMS API Coverage Report

Totals Coverage
Statements: 67.4% ( 5922 / 8787 )
Methods: 65.09% ( 729 / 1120 )
Lines: 71.33% ( 4647 / 6515 )
Branches: 47.4% ( 546 / 1152 )

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.

Thanks again for the investigation, looks good 👍
Please check with biz if we should make a similar workaround for the other program years since it is affecting PROD.

@lewischen-aot lewischen-aot added this pull request to the merge queue Dec 16, 2024
Merged via the queue into main with commit af0d8ff Dec 16, 2024
21 checks passed
@lewischen-aot lewischen-aot deleted the feature/#3827-student-custody-dependent-question branch December 17, 2024 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Form.io Form IO definitions changed. Student Student Features User Story
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants