Skip to content

Jmax/lg 9565 re enable reminder letter job#9319

Merged
jmax-gsa merged 10 commits intomainfrom
jmax/LG-9565-re-enable-reminder-letter-job
Oct 10, 2023
Merged

Jmax/lg 9565 re enable reminder letter job#9319
jmax-gsa merged 10 commits intomainfrom
jmax/LG-9565-re-enable-reminder-letter-job

Conversation

@jmax-gsa
Copy link
Contributor

@jmax-gsa jmax-gsa commented Oct 5, 2023

🎫 Ticket

LG-9595

🛠 Summary of changes

Fix a bug where users with multiple GPO letter requests outstanding would recieve multiple reminder emails for one of them, not the single reminder that they should. (We weren't marking all of the GPO requests as 'reminder sent' after sending a reminder, only the most recent one.)

📜 Testing Plan

Provide a checklist of steps to confirm the changes.

  • Create a user and enter the IdV verify by mail flow. Request a letter.
  • Using the Rails console, back-date the GpoConfirmationCode to 2.weeks.ago (GpoConfirmationCode.all to find yours, then GpoConfirmationCode.find(<your code's id>).update(created_at: 2.weeks.ago, updated_at: 2.weeks.ago, code_sent_at: 2.weeks.ago)
  • Refresh or log back into the app, and request another letter.
  • Using the Rails console, back-date your new GpoConfirmationCode as above.
  • Using the Rails console, run the GpoReminderJob (GpoReminderJob.perform_now(2.weeks.ago))
  • Verify that two reminder emails were sent
  • Using the Rails console, run the job again, and verify that no emails are sent.

@jmax-gsa jmax-gsa marked this pull request as ready for review October 6, 2023 16:24
@jmax-gsa jmax-gsa requested review from a team and jmhooper October 6, 2023 16:37
Copy link
Contributor

@soniaconnolly soniaconnolly left a comment

Choose a reason for hiding this comment

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

LGTM

Co-authored-by: Sonia Connolly <sonia.connolly@gsa.gov>
@jmax-gsa jmax-gsa merged commit 751c2c1 into main Oct 10, 2023
@jmax-gsa jmax-gsa deleted the jmax/LG-9565-re-enable-reminder-letter-job branch October 10, 2023 14:34
@jmhooper jmhooper mentioned this pull request Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants