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

Configure fields and data for HLR form v3 #11960

Merged
merged 0 commits into from
Mar 6, 2023

Conversation

caseywilliams
Copy link
Contributor

Summary

Adds blank form, fields, and data for the new version 3 of the Higher-Level Review form. This is part 1 of 2 - it does not change any API behavior yet.

Version 3 of this form is mostly the same as version 2 except for a few aspects, none of which were deemed imporatant enough to warrant a new version of the HLR API itself:

  1. Removal of the SOC/SSOC review checkbox - soon, it will no longer be possible to opt out of this process, so the option will be considered true by default
  2. A few minor spacing changes

Related issue(s)

Testing done

  • Added test cases based on previous version of the form + new ones to further validate phone number handling

What areas of the site does it impact?

None yet - these changes will be used in my next PR.

Acceptance criteria

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No error nor warning in the console.
  • Events are being sent to the appropriate logging solution
  • Documentation has been updated (link to documentation)
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Feature/bug has a monitor built into Datadog or Grafana (if applicable)
  • If app impacted requires authentication, did you login to a local build and verify all authenticated routes work as expected
  • I added a screenshot of the developed feature

@caseywilliams caseywilliams requested review from a team as code owners March 2, 2023 21:25
@caseywilliams caseywilliams added Lighthouse lighthouse appeals Lighthouse API appeals banana-peels Lighthouse Banana Peels Team labels Mar 2, 2023
@github-actions
Copy link

github-actions bot commented Mar 2, 2023

1 Warning
⚠️ This PR changes 494 LoC (not counting whitespace/newlines).

In order to ensure each PR receives the proper attention it deserves, we recommend not exceeding
200. Expect some delays getting reviews.

File Summary

Files

  • modules/appeals_api/app/services/appeals_api/pdf_construction/higher_level_review/v3/form_data.rb (+247/-0)

  • modules/appeals_api/app/services/appeals_api/pdf_construction/higher_level_review/v3/form_fields.rb (+77/-0)

  • modules/appeals_api/spec/services/appeals_api/pdf_construction/higher_level_review/v3/form_data_spec.rb (+170/-0)

    Note: We exclude files matching the following when considering PR size:

    *.csv, *.json, *.tsv, *.txt, Gemfile.lock, app/swagger, modules/mobile/docs, spec/fixtures/, spec/support/vcr_cassettes/, modules/mobile/spec/support/vcr_cassettes/, db/seeds, modules/vaos/app/docs, modules/meb_api/app/docs, modules/appeals_api/app/swagger/
    

Big PRs are difficult to review, often become stale, and cause delays.

Generated by 🚫 Danger

@va-vfs-bot va-vfs-bot temporarily deployed to API-22858/hlr-form-v3-part-1/main/main March 2, 2023 21:26 Inactive
@caseywilliams
Copy link
Contributor Author

Oof, looks like I exceeded the line limit even though I broke this out into two PRs... I'll remove some content

@caseywilliams caseywilliams force-pushed the API-22858/hlr-form-v3-part-1 branch from c3d7819 to 3a7b470 Compare March 2, 2023 21:47
@va-vfs-bot va-vfs-bot temporarily deployed to API-22858/hlr-form-v3-part-1/main/main March 2, 2023 21:48 Inactive
@caseywilliams caseywilliams force-pushed the API-22858/hlr-form-v3-part-1 branch from 3a7b470 to e107466 Compare March 2, 2023 21:55
appellant_local_time.strftime '%Y'
end

# NOTE: Rep signature is not yet supported - only veteran/claimant
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I omitted the rep signature fields because of this comment on v2 of the HLR form


def veteran_domestic_phone?
# A domestic phone number will be filled in the international field if it has an extension,
# because there is not enough space to fit an extension after the domestic fields.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't see any handling for veteran or claimant phone extensions in v2 of this form, so I handled them the same way as in the Supplemental Claim form v3 I was just working on (#11866) - the international field will be used for a domestic number if there's an extension

FIELD_NAMES.each { |field, name| define_singleton_method(field) { name } }
end

def benefit_type_field(benefit_type)
Copy link
Contributor Author

@caseywilliams caseywilliams Mar 2, 2023

Choose a reason for hiding this comment

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

The benefit type field for this form is weird - nothing has changed since v2 of the form, but as a reminder: each radio button in this conceptual "field" actually has its own unique field name, and the valid value for these fields varies. Unlike other unique radio buttons in our forms where 1 consistently means 'yes' and Off means 'no', the benefit type fields here require different numbers to indicate 'yes', although all use Off for 'no'.

Copy link
Contributor

@kristen-brown kristen-brown left a comment

Choose a reason for hiding this comment

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

This looks good to me! With that said, I'm not very familiar with the PDF construction code yet, so @cilestin or @michelpmcdonald would probably be more thorough reviewers on this one. I'll comment rather than explicitly approve so that they can chime in.

@caseywilliams caseywilliams merged commit 0f86aaa into master Mar 6, 2023
@caseywilliams caseywilliams deleted the API-22858/hlr-form-v3-part-1 branch March 6, 2023 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
appeals Lighthouse API appeals banana-peels Lighthouse Banana Peels Team Lighthouse lighthouse
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants