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-1122 Part 2: Update statefile tax year to 2024 #4994

Open
wants to merge 9 commits into
base: FYST-1122-update-az-schema-to-ty-24
Choose a base branch
from
10 changes: 5 additions & 5 deletions app/controllers/state_file/questions/df_return_sample.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Return xmlns="http://www.irs.gov/efile" xmlns:efile="http://www.irs.gov/efile" returnVersion="2023v5.0">
<Return xmlns="http://www.irs.gov/efile" xmlns:efile="http://www.irs.gov/efile" returnVersion="2023v2.0">
<ReturnHeader binaryAttachmentCnt="0">
<ReturnTs>2023-09-12T16:47:43-04:00</ReturnTs>
<TaxYr>2023</TaxYr>
<TaxPeriodBeginDt>2023-01-01</TaxPeriodBeginDt>
<TaxPeriodEndDt>2023-12-31</TaxPeriodEndDt>
<ReturnTs>2024-09-12T16:47:43-04:00</ReturnTs>
<TaxYr>2024</TaxYr>
<TaxPeriodBeginDt>2024-01-01</TaxPeriodBeginDt>
<TaxPeriodEndDt>2024-12-31</TaxPeriodEndDt>
<SoftwareId>11111111</SoftwareId>
<SoftwareVersionNum>2022.2.100</SoftwareVersionNum>
<OriginatorGrp>
Expand Down
2 changes: 2 additions & 0 deletions app/lib/submission_builder/document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ def document

def determine_default_schema_version_by_tax_year
case @submission.tax_return&.year || @submission.data_source&.tax_return_year
when 2024 # TODO: update with 2024 schema when available
"2023v5.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure where we can get this

when 2023
"2023v5.0"
when 2022
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ def az_xml_sample(filing_status)

private

TAX_YEAR = Rails.configuration.statefile_current_tax_year.to_s.freeze
def base_path(file_type)
"spec/fixtures/state_file/fed_return_#{file_type}s/".freeze
end
Expand All @@ -88,7 +87,7 @@ def load_samples
samples = file_type == 'json' ? @json_samples : @xml_samples
StateFile::StateInformationService.active_state_codes.each do |us_state|
samples[us_state] = []
file_path_glob = File.join(base_path(file_type), TAX_YEAR, us_state, "*.#{file_type}")
file_path_glob = File.join(base_path(file_type), us_state, "*.#{file_type}")
Dir.glob(file_path_glob).each do |file_path|
samples[us_state].push(File.basename(file_path, ".#{file_type}"))
end
Expand All @@ -106,7 +105,7 @@ def path(key, file_type)

us_state, sample_name = key.split("_", 2)
if samples.include?(us_state) && samples[us_state].include?(sample_name)
File.join(base_path(file_type), TAX_YEAR, us_state, "#{sample_name}.#{file_type}")
File.join(base_path(file_type), us_state, "#{sample_name}.#{file_type}")
end
end
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div style="width: 450px; margin: 50px;">
<h1>Your 2023 federal tax return is ready to transfer to your state tax return.</h1>
<h1>Your 2024 federal tax return is ready to transfer to your state tax return.</h1>

<style>
.transfer-button {
Expand Down Expand Up @@ -27,7 +27,7 @@
</style>
<%=
link_to(
"Transfer my 2023 federal tax return to FileYourStateTaxes",
"Transfer my 2024 federal tax return to FileYourStateTaxes",
@main_transfer_url,
class: 'transfer-button'
)
Expand Down
2 changes: 1 addition & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class Application < Rails::Application
config.middleware.use Middleware::RejectBadlyEncodedHeaders
config.gyr_current_tax_year = 2023
config.ctc_current_tax_year = 2021
config.statefile_current_tax_year = 2023
config.statefile_current_tax_year = 2024
config.product_year = 2024

pt = Time.find_zone('America/Los_Angeles')
Expand Down
4 changes: 2 additions & 2 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2927,7 +2927,7 @@ en:
reveal_info_html: "<p>Qualifying expenses include tuition and fees, books, equipment (including computers and other tech), room and board, apprenticeship programs, and K-12 tuition up to $10,000.</p> \n\n<p>Most other uses of funds are non-qualifying expenses, including college application and testing fees, transportation costs, health insurance, and extracurricular costs.</p>\n\n<p><strong>Select 'no' if:</strong></p>\n<ul>\n <li>You withdrew money from a 529 account and used it for qualifying expenses, or</li>\n <li>You didn't withdraw money from a 529 account at all.</li>\n</ul>\n"
title: What are qualifying and non-qualifying expenses?
title: First, let's see if you can use this tool to file your taxes
withdraw_529: In 2023, did you contribute to a <u>529 college savings account</u>, or did you withdraw funds from a 529 account and use them for non-qualified expenses?
withdraw_529: In 2024, did you contribute to a <u>529 college savings account</u>, or did you withdraw funds from a 529 account and use them for non-qualified expenses?
ny_eligibility_out_of_state_income:
edit:
out_of_state_income_html: Did you (or your spouse, if you’re filing together) earn any income in another state in 2023? (This includes unemployment income <strong>received</strong> from another state.)
Expand Down Expand Up @@ -3094,7 +3094,7 @@ en:
title: What can I do next?
reject_code: 'Reject Code:'
reject_desc: 'Reject Description:'
title: Unfortunately, your 2023 %{state_name} state tax return was rejected
title: Unfortunately, your 2024 %{state_name} state tax return was rejected
thank_you_html: Thank you for filing your return with <strong>FileYourStateTaxes</strong>, built in partnership with the state of %{state_name} to integrate with the IRS Direct File tool.
review:
county: County
Expand Down
2 changes: 1 addition & 1 deletion config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2909,7 +2909,7 @@ es:
</ul>
title: "¿Cuáles son los gastos que califican y los que no califican?"
title: Primero veamos si puedes usar esta herramienta para presentar tus impuestos
withdraw_529: En el 2023, ¿contribuiste a una <u>cuenta de ahorros universitarios 529</u>, o retiraste dinero de una cuenta 529 y los usaste para gastos no calificados?
withdraw_529: En el 2024, ¿contribuiste a una <u>cuenta de ahorros universitarios 529</u>, o retiraste dinero de una cuenta 529 y los usaste para gastos no calificados?
ny_eligibility_out_of_state_income:
edit:
out_of_state_income_html: "¿Recibiste (o tu cónyuge, si presentan la declaración juntos) algún ingreso en otro estado en el 2023? (Esto incluye ingresos por desempleo <strong>recibidos</strong> de otro estado.)"
Expand Down
4 changes: 2 additions & 2 deletions lib/tasks/update_persona_outputs.rake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace :update_persona_outputs do
intake = FactoryBot.create(persona_name, federal_submission_id: "1016422024018atw000x")
efile_submission = FactoryBot.create(:efile_submission, :accepted, :for_state, data_source: intake)
generated_pdf = efile_submission.generate_filing_pdf
path = "spec/fixtures/state_file/persona_approved_outputs/2023/#{us_state}/#{persona_name}_return.pdf"
path = "spec/fixtures/state_file/persona_approved_outputs/#{us_state}/#{persona_name}_return.pdf"
File.write(path, generated_pdf.read)
end
end
Expand All @@ -45,7 +45,7 @@ namespace :update_persona_outputs do
zip_path = ActiveStorage::Blob.service.path_for(efile_submission.submission_bundle.key)
Zip::File.open(zip_path) do |zf|
zf.each do |file|
file_path = "spec/fixtures/state_file/persona_approved_outputs/2023/#{us_state}/#{persona_name}_return_xmls/#{file.name}"
file_path = "spec/fixtures/state_file/persona_approved_outputs/#{us_state}/#{persona_name}_return_xmls/#{file.name}"
FileUtils.mkdir_p(File.join(*Pathname(file_path).each_filename.to_a[..-2]))
File.write(
file_path,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
amount: 100,
date_of_contribution_month: '8',
date_of_contribution_day: "12",
date_of_contribution_year: "2023"
date_of_contribution_year: "2024"
}
}
end
Expand Down
2 changes: 1 addition & 1 deletion spec/factories/az321_contributions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#
FactoryBot.define do
factory :az321_contribution do
date_of_contribution { Date.new(2023, 6, 4) }
date_of_contribution { Date.new(Rails.configuration.statefile_current_tax_year, 6, 4) }
charity_code { 22541 }
charity_name { "Center for Ants" }
amount { 532.57 }
Expand Down
2 changes: 1 addition & 1 deletion spec/factories/az322_contributions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#
FactoryBot.define do
factory :az322_contribution do
date_of_contribution_year { "2023" }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

update year dynamically using the rails config here

date_of_contribution_year { "2024" }
date_of_contribution_month { "3" }
date_of_contribution_day { "4" }
made_contribution { "yes" }
Expand Down
18 changes: 9 additions & 9 deletions spec/factories/state_file_az_intakes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,60 +147,60 @@
state_file_az_intake: intake,
charity_code: "22345",
charity_name: "Heartland",
date_of_contribution: Date.parse("August 22 2023")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

dynamically set the year

date_of_contribution: Date.parse("August 22 2024")
create :az321_contribution,
amount: 234.89,
state_file_az_intake: intake,
charity_code: "25544",
charity_name: "Crumbs and Whiskers",
date_of_contribution: Date.parse("July 31 2023")
date_of_contribution: Date.parse("July 31 2024")
create :az321_contribution,
amount: 234.89,
state_file_az_intake: intake,
charity_code: "25999",
charity_name: "The Flying Seagull Project",
date_of_contribution: Date.parse("June 1 2023")
date_of_contribution: Date.parse("June 1 2024")
create :az321_contribution,
amount: 234.89,
state_file_az_intake: intake,
charity_code: "27661",
charity_name: "Frogs Are Green",
date_of_contribution: Date.parse("January 15 2023")
date_of_contribution: Date.parse("January 15 2024")
end
end

trait :with_az322_contributions do
after(:build) do |intake|
create(:az322_contribution,
date_of_contribution: '2023-03-04',
date_of_contribution: '2024-03-04',
ctds_code: '123456789',
school_name: 'School A',
district_name: 'District A',
amount: 100,
state_file_az_intake: intake)
create(:az322_contribution,
date_of_contribution: '2023-02-01',
date_of_contribution: '2024-02-01',
ctds_code: '123456789',
school_name: 'School B',
district_name: 'District B',
amount: 200,
state_file_az_intake: intake)
create(:az322_contribution,
date_of_contribution: '2023-03-01',
date_of_contribution: '2024-03-01',
ctds_code: '123456789',
school_name: 'School C',
district_name: 'District C',
amount: 300,
state_file_az_intake: intake)
create(:az322_contribution,
date_of_contribution: '2023-04-01',
date_of_contribution: '2024-04-01',
ctds_code: '123456789',
school_name: 'School D',
district_name: 'District D',
amount: 400,
state_file_az_intake: intake)
create(:az322_contribution,
date_of_contribution: '2023-05-01',
date_of_contribution: '2024-05-01',
ctds_code: '123456789',
school_name: 'School E',
district_name: 'District E',
Expand Down
2 changes: 1 addition & 1 deletion spec/factories/state_file_nc_intakes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
filing_status { 'married_filing_jointly' }
end

raw_direct_file_data { File.read(Rails.root.join('spec', 'fixtures', 'state_file', 'fed_return_xmls', '2023', 'nc', 'nick.xml')) }
raw_direct_file_data { StateFile::DirectFileApiResponseSampleService.new.read_xml('nc_nick') }
primary_first_name { "North" }
primary_middle_initial { "A" }
primary_last_name { "Carolinian" }
Expand Down
14 changes: 4 additions & 10 deletions spec/features/state_file/complete_intake_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@
end
click_on I18n.t("general.continue")

expect(page).to have_text I18n.t("state_file.questions.nyc_residency.edit.title", year: 2023)
choose "I did not live in New York City at all in 2023"
expect(page).to have_text I18n.t("state_file.questions.nyc_residency.edit.title", year: 2024)
choose "I did not live in New York City at all in 2024"
choose I18n.t("general.affirmative")
click_on I18n.t("general.continue")

expect(page).to have_text I18n.t("state_file.questions.eligibility_offboarding.edit.ineligible_reason.nyc_maintained_home")
click_on "Go back"
expect(page).to have_text I18n.t("state_file.questions.nyc_residency.edit.title", year: 2023)
choose "I lived in New York City all year in 2023"
expect(page).to have_text I18n.t("state_file.questions.nyc_residency.edit.title", year: 2024)
choose "I lived in New York City all year in 2024"
click_on I18n.t("general.continue")

expect(page).to have_text I18n.t("state_file.questions.ny_county.edit.title", filing_year: MultiTenantService.statefile.current_tax_year)
Expand Down Expand Up @@ -153,12 +153,6 @@
end

context "AZ", :flow_explorer_screenshot, js: true do
before do
# TODO: remove this stub when we update Rails.configuration.statefile_current_tax_year to 2024
allow(Rails.configuration).to receive(:statefile_current_tax_year).and_return 2024
stub_const('DateAccessible::TAX_YEAR', Date.new(2024))
end

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was the "fix" i was implementing to get the az feature specs to pass, which didn't work, so taking it out in this PR

it "has content", required_schema: "az" do
visit "/"
click_on "Start Test AZ"
Expand Down
4 changes: 2 additions & 2 deletions spec/features/state_file/edit_return_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"<Acknowledgement>\n
<SubmissionId>12345678901234567890</SubmissionId>\n
<EFIN>441466</EFIN>\n
<TaxYr>2023</TaxYr>\n
<TaxYr>2024</TaxYr>\n
<ExtndGovernmentCd>AZST</ExtndGovernmentCd>\n
<SubmissionTyp>Form140</SubmissionTyp>\n
<ExtndSubmissionCategoryCd>IND</ExtndSubmissionCategoryCd>\n
Expand Down Expand Up @@ -84,7 +84,7 @@
fill_in "Enter your Social Security number or ITIN. For example, 123-45-6789.", with: ssn
click_on "Continue"

expect(page).to have_text "Unfortunately, your 2023 New York state tax return was rejected"
expect(page).to have_text "Unfortunately, your 2024 New York state tax return was rejected"
click_on "Edit your state return"

# goes back to the name-dob page
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"middleInitial": "T",
"lastName": "Baggins",
"dateOfBirth": "2021-01-01",
"relationship": "daughter",
"relationship": "biologicalChild",
"eligibleDependent": true,
"isClaimedDependent": true,
"tin": "222-00-1111"
Expand All @@ -15,7 +15,7 @@
"middleInitial": "T",
"lastName": "Baggins",
"dateOfBirth": "2019-01-01",
"relationship": "daughter",
"relationship": "biologicalChild",
"eligibleDependent": true,
"isClaimedDependent": true,
"tin": "123-00-1234"
Expand Down
13 changes: 13 additions & 0 deletions spec/fixtures/state_file/fed_return_jsons/md/miranda_1099r.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"familyAndHousehold": [],
"filers": [
{
"firstName": "Susan",
"middleInitial": "",
"lastName": "Miranda",
"dateOfBirth": "1980-01-01",
"isPrimaryFiler": true,
"tin": "400-00-1032"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"middleInitial": "",
"lastName": "Thunder",
"dateOfBirth": "2022-02-14",
"relationship": "daughter",
"relationship": "biologicalChild",
"eligibleDependent": true,
"isClaimedDependent": true,
"tin": "300-00-0026"
Expand All @@ -55,7 +55,7 @@
"middleInitial": "",
"lastName": "Thunder",
"dateOfBirth": "2022-02-14",
"relationship": "daughter",
"relationship": "biologicalChild",
"eligibleDependent": true,
"isClaimedDependent": true,
"tin": "300-00-0022"
Expand Down Expand Up @@ -85,7 +85,7 @@
"middleInitial": "",
"lastName": "Thunder",
"dateOfBirth": "2022-02-14",
"relationship": "daughter",
"relationship": "biologicalChild",
"eligibleDependent": true,
"isClaimedDependent": true,
"tin": "300-00-0023"
Expand Down
Loading
Loading