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

Nj 125 income editing #5288

Draft
wants to merge 43 commits into
base: main
Choose a base branch
from
Draft

Nj 125 income editing #5288

wants to merge 43 commits into from

Conversation

mluedke2
Copy link
Contributor

@mluedke2 mluedke2 commented Dec 24, 2024

Link to pivotal/JIRA issue

https://github.com/newjersey/affordability-pm/issues/125

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?

  • Adapted to the new XML schema for UI/WF/SWF to UIWFSWF and UIHCWD
  • I decided to reuse the existing and put in if NJ checks... if we should break into our component I could do that instead but I felt this was simpler.
  • There weren't E2E tests yet specifically for just income review so I added NJ-specific tests there for this ticket's AC and removed NJ from running related shared tests

How to test?

  • Use Zeus Box 14 to see W2 editing, and Streep for seeing messaging for other income forms.

Screenshots (for visual changes)

Zeus Box 14

image

image

Streep

image

Copy link

Heroku app: https://gyr-review-app-5288-23108a88e363.herokuapp.com/
View logs: heroku logs --app gyr-review-app-5288 (optionally add --tail)

@mluedke2 mluedke2 marked this pull request as ready for review December 24, 2024 16:21
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.

Some questions/suggestions

@@ -202,7 +202,7 @@ def state_intake_class_names
vita_link_es: "",
voucher_form_name: "NJ Voucher Form",
voucher_path: "",
w2_supported_box14_codes: ["UI_WF_SWF", "UI_HC_WD", "FLI"],
w2_supported_box14_codes: ["UI_WF_SWF", "FLI"],
Copy link
Contributor

Choose a reason for hiding this comment

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

why isn't this one changing to "UIWFSWF"? Is it possible to change and then we won't need to remove the _ in return_w2.rb submission builder?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh good catch, will do

t(".nj_not_taxed")
else
t(".no_info_needed")
end %>
Copy link
Contributor

@arinchoi03 arinchoi03 Dec 24, 2024

Choose a reason for hiding this comment

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

[dust] I think we generally have been trying to steer away from checking current_state_code to enter in state-specific content. Ways we've been trying to avoid it:

  1. adding descriptive flags on the StateFileBaseIntake and StateFile[state]Intake
  2. creating partials
  3. creating state-specific translations

For this above scenario, is it possible to do something like below? (from app/views/state_file/questions/return_status/_accepted.html.erb:

      <% # i18n-tasks-use t("state_file.questions.return_status.accepted.check_payable_html") # hint for the i18n linter that, yes, we are using this key (sometimes) %>
      <%= t(".#{current_state_code}.check_payable_html", default: :'.check_payable_html', payable_to: @department_of_taxation, filing_year: current_tax_year, form_number: @tax_form_number) %>

we have a default (.no_info_needed) here and state-specific copy (.nj_not_taxed -> .nj.no_info_needed)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks -- that is a great tip about the linter hint; i definitely wrestled a bit with that on this. i'll update to use your suggestion to not check state code there...

@@ -46,13 +49,17 @@
<% end %>
</div>

<% if t(".box14_explanation.#{@state_code}_html", default: nil) %>
<% explanation_key = ".box14_explanation_#{@state_code}_html" %>
<% button_text = @state_code == "nj" ? t(".what_is_box14_nj") : t(".what_is_box14") %>
Copy link
Contributor

Choose a reason for hiding this comment

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

only two states support box 14, is there a way to make this dynamic?
<% button_text = t(".what_is_box14_#{state_code}") %>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sounds good, will do!

Copy link
Contributor

@jachan jachan left a comment

Choose a reason for hiding this comment

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

Great work! Had some small questions/comments!

it "sets box14_ui_wf_swf to box14_ui_hc_wd" do
get :edit, params: { id: state_file_w2.id }
expect(assigns(:w2).box14_ui_wf_swf).to eq 340
Copy link
Contributor

Choose a reason for hiding this comment

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

[Pebble?] Do we need to add asserts on what UI/HC/WD should be? Is this information part of the return, or is it overwritten by UI/WF/SWF? Either way, it might be helpful to assert expected behavior for both fields when both fields are defined.

expect(assigns(:w2).box14_ui_hc_wd).to eq 340

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good point-- box14_ui_hc_wd doesn't matter from here on out so I didn't bother adding an expectation for it. I will be making an update to the w2 model that will help make it clear that we aren't using that value...

expect(page).to have_field('state_file_w2_employer_state_id_num', with: '12345')
expect(page).to have_field('state_file_w2_state_wages_amount', with: '12345.0')
expect(page).to have_field('state_file_w2_state_income_tax_amount', with: '500.0')
expect(page).to have_button("What should I put in Box 14?")
Copy link
Contributor

Choose a reason for hiding this comment

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

[PEBBLE] Original tests in review_page_spec test that clicking continue takes you back to the review screen. Since we're removing NJ from those tests, mind putting that check here as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

true - will make sure that everything that was tested before is still covered...

@@ -27,7 +27,11 @@
<% if current_intake.direct_file_data.fed_unemployment > 0 %>
<div class="white-group unemployment" id="form1099gs">
<p class="text--bold spacing-below-0"><%= t(".unemployment_title") %></p>
<% if current_intake.state_file1099_gs.count > 0 %>
<% if current_state_code == "nj" %>
Copy link
Contributor

Choose a reason for hiding this comment

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

[dust] This is another place where you might refactor to remove the state code check

@@ -9,6 +9,9 @@
<p class="spacing-below-25"><%= @w2.employer_name %></p>

<% if @box14_codes.present? %>
<% if @state_code == "nj" %>
Copy link
Contributor

Choose a reason for hiding this comment

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

[dust] State code check

box14_explanation:
md_html: For tax year %{year}, we will only process the <strong>STPICKUP</strong> code, which represents any contributions you made to the state retirement system.
box14_explanation_md_html: For tax year %{year}, we will only process the <strong>STPICKUP</strong> code, which represents any contributions you made to the state retirement system.
box14_explanation_nj_html: 'For this year, we will only need the amounts for <strong>UI/WF/SWF</strong> (may also appear as <strong>"UI/HC/WD"</strong> on your W2) and FLI.<br/><br/><strong>If you do not see these, please leave these fields blank.</strong><br/><br/><strong>Definitions:</strong><br/><br/><strong>UI/WF/SWF</strong> (may also appear as <strong>"UI/HC/WD"</strong> on your W2) represents:<ul><li><strong>UI</strong> refers to unemployment insurance contributions</li><li><strong>WF</strong> and <strong>WD</strong> refer to workforce development partnership fund contributions</li><li><strong>SWF</strong> refers to supplemental workforce fund contributions</li><li><strong>HC</strong> refers to healthcare contributions</li><li><strong>WD</strong> refers to workforce development contributions</li></ul><strong>FLI</strong>: Represents contributions withheld for Family Leave Insurance. Family Leave Insurance (FLI) provides paid leave benefits to bond with a new child, care for a loved one, or cope with domestic/sexual violence. If you have a number for this on your paycheck, it means you have paid into this program and may be eligible to receive cash benefits.<br/><br/>We use the amounts to determine if you might be eligible for a credit.<br/><br/>There may be other information in box 14 - those don''t need to be reported with this tool.'
Copy link
Contributor

Choose a reason for hiding this comment

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

[dust] Will taxpayers see UI/WF/SWF on their returns or UIWFSWF? Might want to update copy to reflect the most likely case

@mluedke2
Copy link
Contributor Author

Thanks all for the comments (and the discussion at our check-in). I'll be adding a couple error messages and making a change to the w2 model to make sure Line 59 doesn't get broken (I suspect it is actually broken right now and just wasn't caught by tests).

Since that will likely be a pretty big set of changes I'll re-tag people when ready for review again. But for now will go back to Draft while I'm working...

@mluedke2 mluedke2 marked this pull request as draft December 26, 2024 17:53
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.

4 participants