Skip to content

Commit

Permalink
do not check no for burial responsibility and plot expense responsibi… (
Browse files Browse the repository at this point in the history
#16341)

* do not check no for burial responsibility and plot expense responsibility

* update code owners
  • Loading branch information
evansmith authored Apr 15, 2024
1 parent 6f268f6 commit 29173f7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
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

0 comments on commit 29173f7

Please sign in to comment.