From c4846e535fc79353de0ccdef1ad7c29ddca969b4 Mon Sep 17 00:00:00 2001 From: Seth Darr <92405130+sethdarragile6@users.noreply.github.com> Date: Fri, 22 Nov 2024 09:08:24 -0800 Subject: [PATCH] Update Received email va-notify template with date_received (#19560) * dbex/96487-add-date-received-to-template: add date_received as Time.now to Received Email * dbex/96487-add-date-received-to-template: rubocop'd it --- app/models/form526_submission.rb | 1 + app/sidekiq/form526_confirmation_email_job.rb | 1 + spec/sidekiq/form526_confirmation_email_job_spec.rb | 2 ++ 3 files changed, 4 insertions(+) diff --git a/app/models/form526_submission.rb b/app/models/form526_submission.rb index 0c43d08dad4..8478412beb1 100644 --- a/app/models/form526_submission.rb +++ b/app/models/form526_submission.rb @@ -367,6 +367,7 @@ def personalization_parameters(first_name) 'email' => form['form526']['form526']['veteran']['emailAddress'], 'submitted_claim_id' => submitted_claim_id, 'date_submitted' => created_at.strftime('%B %-d, %Y %-l:%M %P %Z').sub(/([ap])m/, '\1.m.'), + 'date_received' => Time.now.utc.strftime('%B %-d, %Y %-l:%M %P %Z').sub(/([ap])m/, '\1.m.'), 'first_name' => first_name } end diff --git a/app/sidekiq/form526_confirmation_email_job.rb b/app/sidekiq/form526_confirmation_email_job.rb index 42a4c3c6d48..7ea8e0a7c9d 100644 --- a/app/sidekiq/form526_confirmation_email_job.rb +++ b/app/sidekiq/form526_confirmation_email_job.rb @@ -20,6 +20,7 @@ def perform(personalization_parameters) personalisation: { 'claim_id' => personalization_parameters['submitted_claim_id'], 'date_submitted' => personalization_parameters['date_submitted'], + 'date_received' => personalization_parameters['date_received'], 'first_name' => personalization_parameters['first_name'] } ) diff --git a/spec/sidekiq/form526_confirmation_email_job_spec.rb b/spec/sidekiq/form526_confirmation_email_job_spec.rb index 926145c4bac..7fdc638cd8e 100644 --- a/spec/sidekiq/form526_confirmation_email_job_spec.rb +++ b/spec/sidekiq/form526_confirmation_email_job_spec.rb @@ -36,6 +36,7 @@ 'email' => email_address, 'submitted_claim_id' => '600191990', 'date_submitted' => 'July 12, 2020', + 'date_received' => 'July 15, 2020', 'first_name' => 'firstname' } end @@ -64,6 +65,7 @@ personalisation: { 'claim_id' => '600191990', 'date_submitted' => 'July 12, 2020', + 'date_received' => 'July 15, 2020', 'first_name' => 'firstname' } }