Skip to content
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

Make the default notification for all user roles be e-mail #2882

Closed
3 tasks done
frjo opened this issue Jun 9, 2022 · 19 comments · Fixed by #2991
Closed
3 tasks done

Make the default notification for all user roles be e-mail #2882

frjo opened this issue Jun 9, 2022 · 19 comments · Fixed by #2991
Assignees
Labels
Status: Tested - approved for live ✅ Type: Feature This is something new (not an enhancement of an existing thing).
Milestone

Comments

@frjo
Copy link
Contributor

frjo commented Jun 9, 2022

Additional context

This is a sub-issue of #2911

User Story

As a staff member, I need to receive email notifications when a contractor has submitted an invoice, when a new application has been submitted, or when I need to approve or review an item in Hypha.

Description

  • List all the Slack notifications that do not have an e-mail version
  • Create e-mail templates for all the missing notifications
  • Make Hypha send e.mail notification by default.

The staff user roles now get notification only via Slack. For organisations not using slack this is big negative point in Hypha.

We should make all notification be e-mail by default and then keep Slack as an option for staff notifications. This should be controlled by an environment setting.

A neat plus feature would be to allow staff set their preferred notification method if there is more than one.

If an organisation have set that staff notification should go to Slack a staff user would then have the option to say that they want e-mail as well.

@frjo frjo added the Type: Feature This is something new (not an enhancement of an existing thing). label Jun 9, 2022
@sks444
Copy link
Contributor

sks444 commented Jun 9, 2022

@sks444
Copy link
Contributor

sks444 commented Jun 10, 2022

Here are demo text messages that we send on slack, this could be helpful for designing email templates for them.

UPDATE_LEAD: The lead of submission name has been updated from Di to Shrikrishna Singh by Shrikrishna Singh
BATCH_UPDATE_LEAD: Shrikrishna Singh has batch changed lead to Shrikrishna Singh on: submission 1, submission 2
APPLICANT_EDIT: Shrikrishna Singh has edited submission
PROPOSAL_SUBMITTED: 'A proposal has been submitted for review: submission
NEW_REVIEW: Shrikrishna Singh has submitted a review for submission. Outcome: Yes, Score: NA
OPENED_SEALED: Shrikrishna Singh has opened the sealed submission: submission
REVIEW_OPINION: Shrikrishna Singh Agrees with Test Reviewers review of submission(this should be a link)
DELETE_SUBMISSION: Shrikrishna Singh has deleted submission
DELETE_REVIEW: Shrikrishna Singh has deleted {review_author} review for submission.
UPDATE_PROJECT_LEAD: The lead of project project has been updated from sks Staff to Shrikrishna Singh by Shrikrishna Singh
EDIT_REVIEW: Shrikrishna Singh has edited {review_author} review for submission
SEND_FOR_APPROVAL: Shrikrishna Singh has requested approval on project submission
APPROVE_PROJECT: Shrikrishna Singh has approved project project
REQUEST_PROJECT_CHANGE: Shrikrishna has requested changes for project acceptance on project
APPROVE_CONTRACT: Shrikrishna Singh has approved contract for <{link}|{source.title}>.
CREATE_INVOICE: Shrikrishna Singh has created invoice for project
DELETE_INVOICE: Shrikrishna Singh has deleted invoice from project
BATCH_DELETE_SUBMISSION: Shrikrishna Singh has deleted submissions: submission 1, submission 2

@fourthletter
Copy link
Contributor

On June 21 standup we discussed the need to have different templates for slack, email, etc. because this feature would split up email from other messaging apps like slack,zulip, etc.

Next Steps

  • user research to hone in on what notifications users need and want
  • refine message temaplates

@fourthletter
Copy link
Contributor

As a user I prefer to receive an email notification when a new application is submitted to the lab I am managing.

@fourthletter
Copy link
Contributor

fourthletter commented Aug 2, 2022

On August 2 @theskumar is working on this issue to ensure existing slack messages have email equivalents. When implemented this solution would ensure organizations could receive notifications without third party messaging apps like slack, signal, etc.

The next phase of implementation could potentially include email digests, timed emails that are not sent in real time, and give users more options to select their preferences. To determine user base preferences we would need to determine a standard list of categories.

Screenshot 2022-08-02 12 45 43 PM

theskumar added a commit that referenced this issue Aug 11, 2022
Related to #2882

The messaging.py has quite a lot of code with multiple concerns, which can be easily divided into individual independent modules.

This refractor puts different messaging adapters into its modules for better maintainability and readability.
@fourthletter
Copy link
Contributor

Do we still need this functionality in the project settings (image below) after the completion of #2882?

image

@theskumar
Copy link
Member

Hi @fourthletter, In my last discussion with @frjo , I am 100 % not sure if we are keeping this particular setting. Still, for the v1 of the default email notification, we decided to have an alternative email added that should be seen as the equivalent of the slack bot's channel.

We have a game plan of how the V2 of the notification system could look. At a high level, it would mean that we'll have a broadly classified set of notifications that are a little flexible, and those notifications can be followed by different people or emails. Etc.

@fourthletter
Copy link
Contributor

Hi @fourthletter, In my last discussion with @frjo , I am 100 % not sure if we are keeping this particular setting. Still, for the v1 of the default email notification, we decided to have an alternative email added that should be seen as the equivalent of the slack bot's channel.

@theskumar your approach makes a lot of sense moving forward. Thank you for clarifying.

@fourthletter
Copy link
Contributor

Comments in Hypha are currently routed to an email designated by (ie app@apply.opentech.fund). Is this a global setting? Fund?

@frjo
Copy link
Contributor Author

frjo commented Sep 14, 2022

@fourthletter Can you post a copy of one of these comment notification mails ot Slack? I thought we only send e-mails to applicants regarding comments.

@fourthletter
Copy link
Contributor

On September 20th standup we discussed Saurabh's implementation approach of making default email into a global setting associated with a particular Fund. The email template will be a digest of similar slack messages in groups. For example, all slack notifications associated with a new submission will be in one email digest.

@fourthletter fourthletter modified the milestones: Quarter 4, Quarter 3 Sep 21, 2022
@theskumar
Copy link
Member

The email template will be a digest of similar slack messages in groups. For example, all slack notifications associated with a new submission will be in one email digest.

@fourthletter Correction, the idea here is not the send different emails for different message types. The emails will be sent regularly (say 3 Hours or daily). If any new message comes for the staff/slack, since last sent they all will be sent in a single email. In this email, the message type can be grouped together in different sections.

e.g.

Summary

# Submissions
- New Submission 1
- New Submission 2
- Reviewer added

# Projects
- Invoice added to project 1

@fourthletter
Copy link
Contributor

On September 27 standup we received a demo of feature. The same consistent set of messages could be sent via slack and/or email. Other messaging options include Zulip or Signal. Next step is to have a webhook

@frjo frjo added the Status: Needs testing Tickets that need testing/qa label Oct 13, 2022
@frjo
Copy link
Contributor Author

frjo commented Oct 13, 2022

@fourthletter This is now on test, I have set so the e-mail digest goes out to your and mine e-mail addresses. On live I assume you will set some team/list e-mail address(s).

@frjo
Copy link
Contributor Author

frjo commented Oct 13, 2022

I have set the cron job that sends the digest to every 10 minuts for the test site.

@frjo
Copy link
Contributor Author

frjo commented Oct 13, 2022

I have received my first digest from the test site. Seems to work just as intended.

@fourthletter
Copy link
Contributor

Thank you for pushing this through!

  1. Will emails be part of a continuous thread?
  2. Slack enables certain funds and labs to have unique (separate) slack channels. Is this also possible for emails?
  3. What is your proposed 2.0? Could we separate activities into broad categories?

image

@frjo
Copy link
Contributor Author

frjo commented Oct 18, 2022

  1. Each e-mail is a separate e-mail.
  2. No, not at this point.
  3. This PR already separate them into new submissions/comments/reviews/other. This can easily be adjusted based on feedback from users. We saw it as a decent starting point.

@fourthletter
Copy link
Contributor

We will need to refine this issue before OTF could use it. However, the feature works. Thank you! 👍

We need to document the chron job and other details for developers because each organization using it will have specific needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Tested - approved for live ✅ Type: Feature This is something new (not an enhancement of an existing thing).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants