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

[CST] Shifts Claims Letters doctype logic into downloader #19516

Merged
merged 29 commits into from
Dec 4, 2024

Conversation

iandonovan
Copy link
Contributor

@iandonovan iandonovan commented Nov 19, 2024

Summary

This is an iterative change to #19241.

That original work there added the claims letters to the controller that is hit by vets-website, and this change moves everything one step upstream: the logic to determine which letter doctypes to retrieve is now located in the ClaimLetterDownloader. Prior to this change, the Website was the only client to use the feature flags to determine which letters to get. The Virtual Agent and Mobile were both configured to ignore those flags and only ever get doctype 184.

I did this after consulting with the Virtual Agent team and with the mobile team. They agree that the delineation of doctypes between clients is not necessary, and that all letters can be shown to everyone.

There is a separate feature flipper called mobile_filter_doc_27_decision_letters_out that now seems redundant. It exists to, even if the feature flipper enabling doctype 27 is turned on in general, strip those letters from the mobile app. We do not know why this exists. (The flipper enabling doctype 27 will remain off, as the Board has not approved digital delivery of these letters.)

The testing for the Claims Letters Controller is here, in the aforementioned PR.

  • This work is behind a feature toggle (flipper): YES
  • I'm on BMT2.
  • I am not introducing a new flipper, but in order for the additional claim letters to be rendered, we will have to enable the following two flippers:
  1. cst_include_ddl_5103_letters
  2. cst_include_ddl_sqd_letters

Related issue(s)

Testing done

  • New code is covered by unit tests
  • The Claim Letter downloader did not include a human-readable name with each letter. As a result, the client side was responsible for showing one (if at all). For example, this is the transformation done on vets-website.

What areas of the site does it impact?

This affects the Claim Letters view.

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 (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

@va-vfs-bot va-vfs-bot temporarily deployed to 96224-additional-claim-development-letters/main/main November 19, 2024 20:30 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to 96224-additional-claim-development-letters/main/main November 20, 2024 04:08 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to 96224-additional-claim-development-letters/main/main November 20, 2024 15:40 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to 96224-additional-claim-development-letters/main/main November 20, 2024 18:01 Inactive
@iandonovan iandonovan changed the title [CST] Adds new claims letters to separately-maintained list for mobile app [CST] Shifts Claims Letters doctype logic into downloader Nov 21, 2024
Copy link

Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: app/controllers/v0/virtual_agent_claim_letters_controller.rb

Copy link

Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: spec/controllers/v0/virtual_agent_claim_letters_controller_spec.rb

@va-vfs-bot va-vfs-bot temporarily deployed to 96224-additional-claim-development-letters/main/main December 2, 2024 15:45 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to 96224-additional-claim-development-letters/main/main December 3, 2024 14:45 Inactive
@@ -38,10 +42,9 @@
context 'with a valid response' do
context 'with mobile_filter_doc_27_decision_letters_out flag enabled' do
it 'returns expected decision letters' do
Flipper.enable('mobile_filter_doc_27_decision_letters_out')
Flipper.enable(:mobile_filter_doc_27_decision_letters_out)
Copy link
Contributor

Choose a reason for hiding this comment

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

I know these were already like this, but we have new conventions for Flipper specs. Do you mind updating these in accordance please?
https://depo-platform-documentation.scrollhelp.site/developer-docs/feature-toggles-guide#FeatureTogglesGuide-Backendexample
Particularly this part:

      # Recommended to limit the feature flag state to the scope of this test
      allow(Flipper).to receive(:enabled?).with(:feature_flag).and_return(true)
      # Not recommended. Affects global state and can have unintended side effects when tests run in parallel
      Flipper.enable(:feature_flag)

@iandonovan iandonovan requested review from jperk51 and dysbo December 3, 2024 20:55
@iandonovan iandonovan merged commit 16c18e9 into master Dec 4, 2024
51 checks passed
@iandonovan iandonovan deleted the 96224-additional-claim-development-letters branch December 4, 2024 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants