Gitea: Send Email to Assignee on Assignment

Created on 18 Sep 2019  路  13Comments  路  Source: go-gitea/gitea

Description

This is a feature request to send an email to an assignee when that person is assigned an issue (unless they assigned themselves).

This is referenced in and similar to https://github.com/go-gitea/gitea/issues/5083 but I think it deserves it's own issue as it could be implemented independent of that more complex issue.

Based on our user's feedback the expected behavior is that assigning an issue to someone will email them. Otherwise, you have to assign someone and then do something like write a comment to let them know you've assigned it to them (that's redundant and painful).

Seems like this would be straightforward to add into https://github.com/go-gitea/gitea/blob/master/modules/notification/mail/mail.go and would make the email notifications more intuitive.

kinenhancement

Most helpful comment

@bhalbright @davidsvantesson @jag3773 I'm working on a template system for e-mails (#8329). This should be covered by that.

All 13 comments

Sounds like a useful feature but I also think there should be an option (site, owner, or repos wide) to enable/disable this - e.g. to avoid flooding people with notification emails.

@HenrikBengtsson Better with a user setting to allow user to choose what notifications to receive as e-mails?
I don't think e-mail at assignment will be the worst notification flooding.

@davidsvantesson I had been working on the same issue before noticing your PR :) My mistake to not post that I was looking at it. But I wanted to comment something as food for thought, one outstanding question I had about the existing code was the scenario where an issue is created with an assignee (as opposed to adding the assignee later). In this scenario, currently the assignee gets an email with the initial comment on the issue (because they are considered a participant). However, nothing in the email lets the user know they were assigned. I was going to propose that in this scenario the email include a sentence indicating they were also assigned to it. But I'll leave it for you to decide whether to address it or not. The alternatives IMO would be to either send a separate email about the assignment (like the add assignee does in your PR), or do nothing and it just continues to work as it is today. Maybe the way it works now is fine with most people, I don't know.

My preference would be to catch the initial email and add a sentence noting that it has been assigned to that person (rather than two nearly identical emails at nearly the same time!).

@bhalbright @davidsvantesson @jag3773 I'm working on a template system for e-mails (#8329). This should be covered by that.

@guillep2k So maybe finalizing this issue should wait until that is merged. It will conflict anyhow.

@davidsvantesson My PR will take at least another week (I'm very busy ATM). Don't worry about it, go ahead and I'll merge your changes in my PR when they're merged.

@bhalbright I am aware about the create issue case but was not sure how to handle it. Do you think the mail should

  • always state who / which people was assigned, or
  • only state "you were assigned" to the person that was assigned

With guillep2k's PR maybe also the subject could state "created and assigned to you"?

@bhalbright I am aware about the create issue case but was not sure how to handle it. Do you think the mail should

* always state who / which people was assigned, or

* only state "you were assigned" to the person that was assigned

To keep this PR on-topic, I'd send a separate notification "_xxx_ asigned you for _yyy_", even if the user will get another notification about the issue creation itself. Just my thoughts.

With guillep2k's PR maybe also the subject could state "created and assigned to you"?

With the current state of the PR, {{if cond}} and other control structures are supported. It's only a matter of making the required metadata available to the template engine.

@guillep2k I tested on GitHub and they do it like you suggest (two e-mails received). Only there is one discrepancy in GitHub, if you are not watching the repo and is assigned when repo is created you don't get the 'Repo created' e-mail. So they seem to do that in a separate step.

It can seem a bit redundant to send two emails, but it makes sense that there should be no difference if you create and assign in one step or separate. Also most mail clients should handle it well.

@davidsvantesson Whatever the mail subject, if your "assigned" e-mail has always the same structure, it's easier to setup rules and such. So, separate mails seem like win-win to me.

@davidsvantesson as a user I'd prefer to just receive one email, but it makes total sense to follow the github model and as @guillep2k suggested.

I think it shall be separate mails (notifications), it will allow more fine-grained settings of what notifications you want in the future.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

haytona picture haytona  路  3Comments

BNolet picture BNolet  路  3Comments

Fastidious picture Fastidious  路  3Comments

kifirkin picture kifirkin  路  3Comments

jakimfett picture jakimfett  路  3Comments