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 1798 use df json data for mfj ssa income #5636

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mrotondo
Copy link
Contributor

@mrotondo mrotondo commented Feb 25, 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?

  • Removes the page (implemented in Fyst 1636 social security benefits data model and UI #5402) that asks MD filers for the primary & spouse filers' SSB amounts
  • Removes the corresponding columns on state_file_md_intakes
  • Adds a DF JSON parser for the new socialSecurityReports items, and uses values from those items in the calculator in place of the now-removed columns
    • We make no assumptions about how many items there will be, but just assign them to the primary or spouse filer according to their TIN

How to test?

  • Go through the flow for a persona (Tiger 55 should work, now that i re-imported them from DF) who has socialSecurityReports in their DF JSON. Verify that the output XML & PDF have the correct social security benefit amounts for the primary and spouse filers.

Copy link

Heroku app: https://gyr-review-app-5636-aa6902403ed4.herokuapp.com/
View logs: heroku logs --app gyr-review-app-5636 (optionally add --tail)

@@ -112,6 +110,9 @@
#
class StateFileMdIntake < StateFileBaseIntake
include MdResidenceCountyConcern

self.ignored_columns += %w[primary_ssb_amount spouse_ssb_amount]
Copy link
Contributor

@arinchoi03 arinchoi03 Feb 25, 2025

Choose a reason for hiding this comment

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

[q] this is data that clients self-reported. we can't really "backfill" this data back into the json files, so do we just keep it forever indefinitely? Or is it really fine to drop these columns?

private

def social_security_benefit_amount_for(filer)
social_security_reports.filter { |social_security_report| social_security_report.recipient_tin == filer.tin }.sum(&:net_benefits)
Copy link
Contributor

Choose a reason for hiding this comment

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

sorry this is on my mind, but is there any likelihood at all we could get a null for the net_benefits amount?

if @intake.filing_status_mfj? && @intake.direct_file_data.fed_ssb.positive? && @intake.spouse_ssb_amount.present?
@intake.spouse_ssb_amount.round
if @intake.filing_status_mfj? && @intake.direct_file_data.fed_ssb.positive?
@intake.direct_file_json_data.spouse_filer_social_security_benefit_amount&.round
Copy link
Contributor

@arinchoi03 arinchoi03 Feb 25, 2025

Choose a reason for hiding this comment

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

[dust] just noticing that calculate_line_9a returns 0 if the amount is nilbutcalculate_line_9breturnsnilif it's nil, probably should choose one or the other, although it'll end up in the same place since this ultimately usesadd_element_if_present`

Copy link
Contributor

@arinchoi03 arinchoi03 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 but just one q about keeping the self-reported data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants