Send Notification of Facility Report Response #1250
Conversation
Looking at this now. |
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.
Looks good. I was able to successfully see mail in the console.
We should hold off on merging this until we get final text from @katieashaw.
@katieashaw The application is ready to send email to contributors when a facility closure/reopening is approved or rejected by the moderation team. Please add the text you want to appear in the emails in a comment on issue #1247 or comment on this PR. Thanks. |
Facility closure approved text: Hi there, Thanks for reporting XXX facility as closed. The facility profile in the Open Apparel Registry has now been updated and the facility is marked as closed. OAR Team review notes: Should you receive reports that the facility is re-opened in the future, you can share this update with the OAR Team. Best wishes, The OAR Team Facility closure rejected text Hi there, Thanks for reporting XXX facility as closed. We have rejected this report and the facility's profile in the OAR has not been changed. OAR Team review notes: If you have additional evidence that can be used to verify the facility closure, this can be shared with: info@openapparel.org Best wishes, The OAR Team Facility reopening approved text Hi there, Thanks for reporting that XXX facility has re-opened. The facility profile in the Open Apparel Registry has now been updated and the facility is no longer marked as closed. OAR Team review notes: Best wishes, The OAR Team Facility reopening rejected text Hi there, Thanks for reporting that XXX facility has re-opened. We have rejected this report and the facility's profile in the OAR has not been changed. OAR Team review notes: If you have additional evidence to verify the facility re-opening, this can be shared with: info@openapparel.org Best wishes, The OAR Team |
@jwalgran Could you take another look and confirm that the updated text looks good to you? I ended up making more code changes than I initially expected in the process of updating. |
Looking at this now. |
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.
I tested these and they look good. I made a note about how we can potentially clean up the output of the plain text template.
Thanks for reporting {{ facility_name }} facility as {{ closure_state|lower }}. | ||
{% if is_closure and is_rejected %} | ||
We have rejected this report and the facility's profile in the OAR has not been changed. | ||
{% endif %} |
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.
Newlines in the templates are preserved in the output, even if the only content on the line is a template tag
django_1 | --===============8035258767979269043==
django_1 | Content-Type: text/plain; charset="utf-8"
django_1 | MIME-Version: 1.0
django_1 | Content-Transfer-Encoding: 7bit
django_1 |
django_1 |
django_1 | Hi there,
django_1 |
django_1 | Thanks for reporting 4teams - Advertising & Merchandising, Lda. facility as closed.
django_1 |
django_1 | We have rejected this report and the facility's profile in the OAR has not been changed.
django_1 |
django_1 |
django_1 |
django_1 |
django_1 |
django_1 | OAR Team review notes: NOO
django_1 |
django_1 |
django_1 | If you have additional evidence that can be used to verify the facility has closed, this can be shared with: info@openapparel.org
django_1 |
django_1 |
django_1 |
django_1 | Best wishes,
django_1 |
django_1 |
django_1 | Open Apparel Registry
django_1 |
django_1 |
django_1 |
django_1 |
django_1 | --===============8035258767979269043==
It makes the conditionals in the templates a little harder to read but we should consider removing some newlines
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.
The user who reports a facility as closed or reopened will receive a notification email when an OAR administrator confirms or rejects the report.
One of the activity report proptypes was incorrect.
948cb66
to
0f01689
Compare
Overview
The user who reports a facility as closed or reopened will receive a
notification email when an OAR administrator confirms or rejects the
report.
Connects #1247
Demo
Rejected
Confirmed
No Reason Provided
Notes
We are planning to reopen this and adjust the email content once the finalized notification text is provided.
Testing Instructions
./scripts/server
Checklist
fixup!
commits have been squashed