-
Notifications
You must be signed in to change notification settings - Fork 7
EAP: Email setup and templates #2607
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
base: project/eap-workflow
Are you sure you want to change the base?
EAP: Email setup and templates #2607
Conversation
486f463 to
832c190
Compare
susilnem
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor changes
eap/tasks.py
Outdated
| cc_recipients = [ | ||
| instance.national_society_contact_email, | ||
| *settings.EMAIL_EAP_DREF_AA_GLOBAL_TEAM, | ||
| *regional_coordinator_emails, | ||
| ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might need unique here.
| cc_recipients = [ | |
| instance.national_society_contact_email, | |
| *settings.EMAIL_EAP_DREF_AA_GLOBAL_TEAM, | |
| *regional_coordinator_emails, | |
| ] | |
| cc_recipients = list( | |
| set([ | |
| instance.national_society_contact_email, | |
| *settings.EMAIL_EAP_DREF_AA_GLOBAL_TEAM, | |
| *regional_coordinator_emails, | |
| ]) | |
| ) |
eap/tasks.py
Outdated
| email_context = get_eap_registration_email_context(instance) | ||
| email_subject = f"[{instance.get_eap_type_display()} IN DEVELOPMENT] {instance.country} {instance.disaster_type}" | ||
| email_body = render_to_string("email/eap/registration.html", email_context) | ||
| email_type = "EAP-REGISTRATION" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| email_type = "EAP-REGISTRATION" | |
| email_type = "New EAP Registration" |
eap/tasks.py
Outdated
| *regional_coordinator_emails, | ||
| ] | ||
| email_context = get_eap_registration_email_context(instance) | ||
| email_subject = f"[{instance.get_eap_type_display()} IN DEVELOPMENT] {instance.country} {instance.disaster_type}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might need smth like this, as EAP_type can be set to null.
| email_subject = f"[{instance.get_eap_type_display()} IN DEVELOPMENT] {instance.country} {instance.disaster_type}" | |
| email_subject = f"[{instance.get_eap_type_display() if instance.get_eap_type_display() else 'EAP'} IN DEVELOPMENT] {instance.country} {instance.disaster_type}" | |
| </tr> | ||
| <tr> | ||
| <td style="font-weight: bold;">Type of EAP</td> | ||
| <td>{{ eap_type_display }}</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be None.
eap/utils.py
Outdated
| "ns_contact_name": eap_registration_data["national_society_contact_name"], | ||
| "ns_contact_email": eap_registration_data["national_society_contact_email"], | ||
| "ns_contact_phone": eap_registration_data["national_society_contact_phone_number"], | ||
| "status_display": eap_registration_data["status_display"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need the National Society contact info for the Kind regards section of the email.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, I was asking about status display.
| {{ ns_contact_phone }} | ||
| </p> | ||
| </td> | ||
| </tr> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might need here to redirect to frontend url..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s not mentioned in the Process Emails docs, but I’ve added it.
c1ac5ac to
aa730e6
Compare
Changes
Checklist
Things that should succeed before merging.
Release
If there is a version update, make sure to tag the repository with the latest version.