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-26710-pdf-mapping-country-code #12801

Merged
merged 0 commits into from
May 31, 2023
Merged

Conversation

stiehlrod
Copy link
Contributor

Summary

Discovery: BRD returns "USA" in the countries list for the US. With that being said, the gem lists it as "United States of America" so it would never locate the United States and be able to provide an alpha2 value. We also see 36 of the 213 retrieved countries fail during lookup using the gem, so it seems that trying to utilize the gem for this scenario is unfortunately not an effective approach.
"Solution": Hardcode the translation for US to be from "USA" to "US" and provide that. If not, send the entire string provided in the request (as long as it aligns with a valid country from BRD).
Reasoning: If the PDF service detects a 2 char code, it will apply it to the Country Code, if it senses anything more, it will apply the entirety of the name to the overflow page.

Related issue(s)

Testing done

  • rspec
  • Postman

What areas of the site does it impact?

modified:   modules/claims_api/lib/claims_api/v2/disability_compensation_pdf_mapper.rb
modified:   modules/claims_api/spec/lib/claims_api/v2/disability_compensation_pdf_mapper_spec.rb

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

@stiehlrod stiehlrod added Lighthouse lighthouse claimsApi modules/claims_api labels May 25, 2023
@stiehlrod stiehlrod self-assigned this May 25, 2023
@stiehlrod stiehlrod requested review from a team as code owners May 25, 2023 15:16
@va-vfs-bot va-vfs-bot temporarily deployed to API-26710-pdf-mapping-country-code/main/main May 25, 2023 15:21 Inactive
Copy link
Contributor

@mchristiansonVA mchristiansonVA left a comment

Choose a reason for hiding this comment

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

LGTM

@va-vsp-bot va-vsp-bot requested a deployment to API-26710-pdf-mapping-country-code/main/main May 31, 2023 15:30 In progress
@stiehlrod stiehlrod merged commit 7c0e173 into master May 31, 2023
@stiehlrod stiehlrod deleted the API-26710-pdf-mapping-country-code branch May 31, 2023 15:38
ryan-mcneil pushed a commit that referenced this pull request Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
claimsApi modules/claims_api Lighthouse lighthouse
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants