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

API-22858: Add supplemental claim form v3 fields and data (part 1) #11866

Merged
merged 0 commits into from
Mar 2, 2023

Conversation

caseywilliams
Copy link
Contributor

Summary

  • Adds the new v3 of the Supplemental Claim form to the repo (but not to any APIs yet)
  • There are two major differences in this new version, neither of which was deemed significant enough to warrant a new version of the APIs:
    1. The SOC/SSOC Opt-in checkbox has been removed. This is because this option is no longer a choice - all claims will go through this process.
    2. The phone number field has been updated so that instead of a single phone field, there are now fillable domestic phone fields and a free text international phone field. Because there is no fillable field for a phone extension, domestic phone numbers with extensions use the international phone field.
  • This PR includes only the configuration of the fillable form fields and text boxes, plus the data to fill those fields. The process of filling the form is shown in my old PR API-22858: Update Supplemental Claims form from v2 to v3 #11863, but I had to split it into two (this being the first part) so as not to exceed the line limit.

Related issue(s)

Testing done

  • Added test cases based on the previous version of the form
  • Added test cases for new behavior around phone numbers

What areas of the site does it impact?

None yet

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 February 22, 2023 17:34
@github-actions
Copy link

1 Warning
⚠️ This PR changes 445 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/models/appeals_api/appellant.rb (+1/-1)

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

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

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

  • modules/appeals_api/spec/services/appeals_api/pdf_construction/supplemental_claim/v3/form_fields_spec.rb (+21/-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

@@ -130,7 +130,7 @@ def claimant?
end

def domestic_phone?
phone_country_code == '1'
phone_country_code.blank? || phone_country_code == '1'
Copy link
Contributor Author

@caseywilliams caseywilliams Feb 22, 2023

Choose a reason for hiding this comment

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

I'm not sure it's correct to change this here, but I noticed that this would consider phone numbers without an explicit country code to be international.

This test case fails if this change isn't made - I could fix this in the FormData logic instead, but I thought I'd try here first. Happy to update if this change seems too risky (or if this is actually the intended behavior)

# an extension, we put it in the international field instead.
signing_appellant.domestic_phone? && signing_appellant.phone_data['phoneNumberExt'].blank?
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.

These data getters for phones and signatures return nil when they should not be used, even if data is technically available - I found that this helped avoid putting some logic in the form structure code (see my older PR linked in the description)

signing_appellant_zip_code: { at: [290.7, 393.4], width: 82, height: 14.7 },
international_phone: { at: [324, 361], width: 200, height: 14 },
signing_appellant_email: { at: [-1, 333.7], width: 524, height: 12.9 },
contestable_issues: Structure::MAX_ISSUES_ON_MAIN_FORM.times.map do |i|
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The only reason this isn't failing tests by referring to the Strucure is that I don't have tests for boxes - this value will come in my next PR - see how that will look in my original PR here, which was closed for being too long

@caseywilliams caseywilliams merged commit 61c4394 into master Mar 2, 2023
@caseywilliams caseywilliams deleted the API-22858/sc-form-v3-part-1 branch March 2, 2023 17:31
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