Conversation
|
There is some bolding missing in the second paragraph, as follows:
Also not sure why the line break in the second paragraph is so different from the Figma, but it's OK. |
|
Also, the footer styling is substantially different from the Figma, but this seems to actually be the case in all our emails. Don't think we should fix this here, but might be worth a separate task or investigation @n1zyy |
Interesting! My first thought was that this was maybe an issue with the mail preview itself, but it is not. Live mail I've received looks the same. The core email template is https://github.com/18F/identity-idp/blob/main/app/views/layouts/user_mailer.html.erb for all these. I agree about splitting that out into a separate ticket from this one. It probably makes sense for our team to pick it up, but FWIW it's the template used by all emails. fe08811 is where the "Sent at" came in. |
n1zyy
left a comment
There was a problem hiding this comment.
I really need to get my PR in since I think this is the logical successor to it.
I think instead of your handle_call_in_needed method, we just want to drop your email send into the code I'm adding for handling fraud_pending_reason users who proof. In hindsight the ticket wasn't super clear about this.
But otherwise, this is looking good.
|
@n1zyy Yeah, just wanted to flag it while there was an active example. Maybe let's try to track it down and connect with @eryn-sobing in planning. |
@n1zyy I'll wait to merge your changes into my branch before finalizing this pr |
app/services/analytics_events.rb
Outdated
|
|
||
| # Tracks please call emails that are initiated during GetUspsProofingResultsJob | ||
| def idv_in_person_usps_proofing_results_job_please_call_email_initiated( | ||
| **extra |
There was a problem hiding this comment.
This may fail when merged to main since #9946 was merged and requires explicit documentation for every received analytics argument. I'd suggest merging main or rebasing the branch to make sure that check passes.
There was a problem hiding this comment.
since it's it's called from within an existing job, it might get a free pass due to allowed_extra_analytics: [:*] on many existing files
There was a problem hiding this comment.
I am wondering how I can use a string rather than the method name in track_event() like other analytics events do.
There was a problem hiding this comment.
Method name is the expected event name, this is a recent-ish change in process which is why other events log a string.
Related: https://github.com/18F/identity-idp/blob/main/docs/backend.md#analytics
JackRyan1989
left a comment
There was a problem hiding this comment.
This looks great so far! I just have a few small comments and questions that should be fairly easy to resolve. Good job Shannon!
| end | ||
| end | ||
|
|
||
| def handle_call_in_needed(enrollment, response) |
There was a problem hiding this comment.
Nit: This method name is slightly confusing to me. Could we include 'fraud' somewhere in the name so it's clear it relates directly to fraud?
There was a problem hiding this comment.
Good idea, updated to handle_passed_with_fraud_review_pending
|
|
||
| def send_please_call_email(user, enrollment) | ||
| user.confirmed_email_addresses.each do |email_address| | ||
| # rubocop:disable IdentityIdp/MailLaterLinter |
There was a problem hiding this comment.
Nit: Is there an easy-ish formatting thing we can do so we're not disabling the linter? I feel like that's a bit of a flag.
There was a problem hiding this comment.
This is a custom rule that enforces the use of deliver_now_or_later vs deliver_later. I'd wonder if we should be using deliver_now_and_later to avoid the lint? There are a few cases where we want to ensure it's delivered exclusively now or later, but I'm not sure that applies here.
https://github.com/18F/identity-idp/blob/main/lib/linters/mail_later_linter.rb
There was a problem hiding this comment.
Ok interesting. Thanks for that info @aduth. Yeah unfortunately I don't know enough about the motivation for enforcing that we do these calls async. This might be a good thing to bring back to our team and see what folks think.
There was a problem hiding this comment.
The idea with deliver_now_or_later is that we'd typically want to deliver messages asynchronously (to avoid blocking the response), but this is controlled through configuration to allow us the option to deliver synchronously if needed in an environment or if there's issues with asynchronous delivery.
See also:
identity-idp/config/initializers/ext_action_mailer.rb
Lines 14 to 20 in 21d5b41
There was a problem hiding this comment.
digging back through some old prs and it looks like we previously made the decision to use deliver_later for the emails sent in this job, pr where we made the switch
There was a problem hiding this comment.
I generally don't like the pattern of rubocop:disable for stuff without a really compelling reason. But, as you pointed out, and as is found in some old Slack threads, there's precedent here: every other mailer call in this file is deliver_later.
So, in the end, unless others object, I would support leaving this as-is. I'd rather the file stay consistent, even if it's not strictly necessary in this case.
Filed LG-12314 for this so it doesn't get lost. |
n1zyy
left a comment
There was a problem hiding this comment.
Sorry for being slow on the update here, but I'm now on Team
here. Thanks for your patience in getting this story through!


🎫 Ticket
Link to the relevant ticket:
LG-12091
🛠 Summary of changes
This pr sends a "Please call" email when a user who has fraud review pending gets passed by usps.
📜 Testing Plan
Provide a checklist of steps to confirm the changes.
app/jobs/get_usps_proofing_results_job.rbrails ce = InPersonEnrollment.lastjson = UspsInPersonProofing::Mock::Fixtures.request_passed_proofing_results_responseres = JSON.parse(json)e.profile.update!(fraud_pending_reason: 1)GetUspsProofingResultsJob.new.send(:process_enrollment_response, e, res)👀 Screenshots
If relevant, include a screenshot or screen capture of the changes.
En:

Es:

Fr:
