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

do not check no for burial responsibility and plot expense responsibi… #16341

Merged
merged 4 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -1192,6 +1192,7 @@ spec/fixtures/pdf_fill/21-674 @department-of-veterans-affairs/Benefits-Team-1 @d
spec/fixtures/pdf_fill/21-8940 @department-of-veterans-affairs/Benefits-Team-1 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/fixtures/pdf_fill/21P-527EZ @department-of-veterans-affairs/pensions @department-of-veterans-affairs/backend-review-group
spec/fixtures/pdf_fill/21P-530 @department-of-veterans-affairs/Benefits-Team-1 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/fixtures/pdf_fill/21P-530V2 @department-of-veterans-affairs/Benefits-Team-1 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/fixtures/pdf_fill/26-1880 @department-of-veterans-affairs/Benefits-Team-1 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/fixtures/pdf_fill/28-1900 @department-of-veterans-affairs/Benefits-Team-1 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/fixtures/pdf_fill/28-8832 @department-of-veterans-affairs/Benefits-Team-1 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
Expand Down
2 changes: 0 additions & 2 deletions lib/pdf_fill/forms/va21p530v2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -725,12 +725,10 @@ def merge_fields(_options = {})
# special case: these fields were built as checkboxes instead of radios, so usual radio logic can't be used.
burial_expense_responsibility = @form_data['burialExpenseResponsibility']
@form_data['hasBurialExpenseResponsibility'] = burial_expense_responsibility ? 'On' : nil
@form_data['noBurialExpenseResponsibility'] = burial_expense_responsibility ? nil : 'On'

# special case: these fields were built as checkboxes instead of radios, so usual radio logic can't be used.
plot_expense_responsibility = @form_data['plotExpenseResponsibility']
@form_data['hasPlotExpenseResponsibility'] = plot_expense_responsibility ? 'On' : nil
@form_data['noPlotExpenseResponsibility'] = plot_expense_responsibility ? nil : 'On'

# special case: these fields were built as checkboxes instead of radios, so usual radio logic can't be used.
process_option = @form_data['processOption']
Expand Down
2 changes: 0 additions & 2 deletions spec/fixtures/pdf_fill/21P-530V2/merge_fields.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@
"veteranSocialSecurityNumber3":{"first":"987", "second":"65", "third":"4322"},
"hasTransportation":"YES",
"hasBurialExpenseResponsibility":"On",
"noBurialExpenseResponsibility":null,
"hasPlotExpenseResponsibility":"On",
"noPlotExpenseResponsibility":null,
"hasProcessOption":null,
"noProcessOption":"On",
"hasConfirmation":"YES",
Expand Down
6 changes: 4 additions & 2 deletions spec/lib/pdf_fill/forms/va21p530v2_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,14 @@ def class_form_data

it 'leaves benefit selections blank on pdf if unselected', run_at: '2024-03-21 00:00:00 EDT' do
unselected_benefits_data = get_fixture('pdf_fill/21P-530V2/kitchen_sink').except(
'burialAllowance', 'plotAllowance', 'transportation'
'burialExpenseResponsibility', 'plotExpenseResponsibility', 'transportation'
)
expected_merge_data = get_fixture('pdf_fill/21P-530V2/merge_fields').except(
'burialAllowance', 'plotAllowance', 'transportation'
'burialExpenseResponsibility', 'plotExpenseResponsibility', 'transportation'
)
expected_merge_data['hasTransportation'] = nil
expected_merge_data['hasBurialExpenseResponsibility'] = nil
expected_merge_data['hasPlotExpenseResponsibility'] = nil
expect(described_class.new(unselected_benefits_data).merge_fields.to_json).to eq(
expected_merge_data.to_json
)
Expand Down
Loading