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

[DBX-94173] Cleanup after 526 failure email staging test #19066

Merged

Conversation

SamStuckey
Copy link
Contributor

@SamStuckey SamStuckey commented Oct 24, 2024

Summary

  • This work is behind a feature toggle (flipper): YES
  • Acoomodate new Product / Design ask to insert 'None' into email template if Vet-provided files and / or ancillary forms are blank
  • Refactor for redability
  • add nil check to error logging
  • Update shared spec logic

Related issue(s)

Testing done

  • New code is covered by unit tests
  • Email template rejects an empty array for the files_submitted and forms_submitted arguments. After a cycle with design we agreed the best solution (which also avoides empty bullet points) is to simply interpolate 'None'
  • Command line testing of staging to ensure email template was generated

Manual command line test code

forms = ['VA Form 21-0781', 'VA Form 21-0781a']
files = ['thing.pdf', 'thang.txt']

# forms_submitted = 'None'
# files_submitted = 'None'

forms_submitted = forms
files_submitted = files

email_client = VaNotify::Service.new(Settings.vanotify.services.benefits_disability.api_key)
template_id = Settings.vanotify.services.benefits_disability.template_id
                      .form526_submission_failure_notification_template_id
email_client.send_email(
  email_address: <your email>,
  template_id:,
  personalisation: {
    first_name: "empty_strings",
    date_submitted: Date.today.strftime("%m/%d/%Y"),
    forms_submitted:,
    files_submitted:
  }
)

Or the job can be manually called if a submission exists with the desired components

Form526SubmissionFailureEmailJob.new.perform(submission.id)

Screenshots

Case of Args present

NOTE: weird layout is being worked on by design, purpose here is simply to show correct interpolation
Screenshot 2024-10-24 at 12 16 31 PM

Case of 'None'

Screenshot 2024-10-24 at 11 58 52 AM

What areas of the site does it impact?

(Describe what parts of the site are impacted andifcode touched other areas)

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

kylesoskin
kylesoskin previously approved these changes Oct 24, 2024
@SamStuckey SamStuckey added disability-experience To manage benefits disability claims experience. disability-compensation Label used for Pull Requests that impact Disability Compensation claims (526EZ) ZSF:Email zero-silent-failures labels Oct 24, 2024
@kylesoskin kylesoskin self-requested a review October 24, 2024 18:25
kylesoskin
kylesoskin previously approved these changes Oct 24, 2024
@SamStuckey SamStuckey marked this pull request as ready for review October 24, 2024 18:26
@SamStuckey SamStuckey requested review from a team as code owners October 24, 2024 18:26
@va-vfs-bot va-vfs-bot temporarily deployed to dbx-94173/526_submission_failure_email_staging_test/main/main October 24, 2024 18:34 Inactive
@SamStuckey SamStuckey marked this pull request as draft October 24, 2024 18:50
@va-vfs-bot va-vfs-bot temporarily deployed to dbx-94173/526_submission_failure_email_staging_test/main/main October 24, 2024 20:10 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to dbx-94173/526_submission_failure_email_staging_test/main/main October 24, 2024 20:53 Inactive
Copy link
Contributor

@rmtolmach rmtolmach left a comment

Choose a reason for hiding this comment

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

see Kyle previously approved the PR.

Copy link

Backend-review-group approval confirmed.

@SamStuckey SamStuckey merged commit e55aceb into master Oct 25, 2024
29 checks passed
@SamStuckey SamStuckey deleted the dbx-94173/526_submission_failure_email_staging_test branch October 25, 2024 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disability-compensation Label used for Pull Requests that impact Disability Compensation claims (526EZ) disability-experience To manage benefits disability claims experience. require-backend-approval test-passing zero-silent-failures ZSF:Email
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants