codeforboston / codeforboston/maple
Send Email after Reported Testimony Resolution
- Dominant language
- TypeScript
- Stars
- 56
- Forks
- 175
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 13
Description
## Problem
After an admin resolves a testimony report, they will either accept the report and delete the reported testimony or reject the report and do nothing to the reported testimony.
To better communicate our decisions to the involved users, we want to send an email notification when the report is resolved. If the report is accepted, we should notify the user who submitted the original testimony that their testimony has been deleted. If the report is rejected, we should notify the user who submitted the report that their report has been rejected.
## Success Criteria
- [ ] Add Email template for "Reported Testimony Resolution"
- [ ] We may be able to use a Sendgrid Template here - the `firestore-send-email` extension we use supports it, and this email will be much simpler from a layout standpoint than the notification emails that we render with custom handlebars templates.
- [ ] The email should support two variants:
- [ ] ACCEPTED
- [ ] The email's `to` should be the contact email address of the user that submitted the deleted testimony
- [ ] Subject: "Your MAPLE testimony has been removed"
- [ ] The text should be : (COPY TBD - @mvictor55 ) - something like "Your testimony on bill has been removed because: "
- [ ] REJECTED
- [ ] The email's `to` should be the contact email address of the user that submitted the report
- [ ] Subject: "Your testimony report has been rejected"
- [ ] The text should be: (COPY TBD - @mvictor55 ) - something like "Your request to remove testimony you reported on bill has been rejected."
- [ ] These emails should send automatically as part of the "Resolve Testimony" flow in the Admin page
## Additional Links
- [ ] Design: (None as of yet, but I think we can live with just the existing header/footer from the notification emails + a simple text body)
- [ ] Copy: (TBD: Need copy for both "Your testimony was removed" case and "Your report was rejected" case)
- [ ] SendGrid API: https://www.twilio.com/docs/sendgrid/ui/sending-email/how-to-send-an-email-with-dynamic-templates
Contributor guide
Assessment
This issue has not been assessed yet.