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

[FYST-1788] Guard against nil values when summing up w2, 1099R state income tax / withheld amounts #5635

Conversation

arinchoi03
Copy link
Contributor

@arinchoi03 arinchoi03 commented Feb 24, 2025

Link to pivotal/JIRA issue

Is PM acceptance required? (delete one)

  • Yes - don't merge until JIRA issue is accepted!

Reminder: merge main into this branch and get green tests before merging to main

What was done?

  • We scoped the guards to the two calculators we saw the errors in and also in the method. We did not implement a guard for 1099G because it is impossible to actually set the value to nil due to the validation for state_income_tax_withheld_amount (numericality)

How to test?

  • Describe the testing approach taken to verify the changes, including:

    • Unit/integration/manual tests
    • Test data used: any ID/AZ fixture with W2, edit using w2 edit page state_income_tax_amount by leaving a field blank, you should see an error now instead of being able to proceed (which is what happens in demo)
  • Specify any relevant testing environments used: Use heroku

  • Risk Assessment

    • no risk

Screenshots (for visual changes)

  • Before
  • After

Copy link

Heroku app: https://gyr-review-app-5635-667d73290da4.herokuapp.com/
View logs: heroku logs --app gyr-review-app-5635 (optionally add --tail)

@arinchoi03 arinchoi03 changed the title [FYST-1788] no method error undefined method round for nil nil class no method error [FYST-1788] Guard against nil values when summing up w2, 1099R state income tax / withheld amounts Feb 24, 2025
@arinchoi03 arinchoi03 marked this pull request as ready for review February 24, 2025 23:53
arinchoi03 and others added 2 commits February 24, 2025 21:00
…undefined-method-round-for-nil-nil-class-no-method-error

Co-authored-by: Martha Pidcock <[email protected]>
…undefined-method-round-for-nil-nil-class-no-method-error
@arinchoi03 arinchoi03 merged commit 6d8f801 into main Feb 25, 2025
7 checks passed
@arinchoi03 arinchoi03 deleted the FYST-1788-no-method-error-undefined-method-round-for-nil-nil-class-no-method-error branch February 25, 2025 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants