diff --git a/apiserver/plane/bgtasks/email_notification_task.py b/apiserver/plane/bgtasks/email_notification_task.py index cf7255585..cc9588ca6 100644 --- a/apiserver/plane/bgtasks/email_notification_task.py +++ b/apiserver/plane/bgtasks/email_notification_task.py @@ -148,10 +148,12 @@ def send_email_notification( template_data = [] total_changes = 0 comments = [] + actors_involved = [] for actor_id, changes in data.items(): actor = User.objects.get(pk=actor_id) total_changes = total_changes + len(changes) comment = changes.pop("comment", False) + actors_involved.append(actor_id) if comment: comments.append( { @@ -191,6 +193,7 @@ def send_email_notification( context = { "data": template_data, "summary": summary, + "actors_involved": len(set(actors_involved)), "issue": { "issue_identifier": f"{str(issue.project.identifier)}-{str(issue.sequence_id)}", "name": issue.name, @@ -200,6 +203,9 @@ def send_email_notification( "email": receiver.email, }, "issue_url": f"{base_api}/{str(issue.project.workspace.slug)}/projects/{str(issue.project.id)}/issues/{str(issue.id)}", + "project_url": f"{base_api}/{str(issue.project.workspace.slug)}/projects/{str(issue.project.id)}/issues/", + "workspace":str(issue.project.workspace.slug), + "project": str(issue.project.name), "user_preference": f"{base_api}/profile/preferences/email", "comments": comments, } diff --git a/apiserver/templates/emails/notifications/issue-updates.html b/apiserver/templates/emails/notifications/issue-updates.html index 4374846df..bdc6a53a3 100644 --- a/apiserver/templates/emails/notifications/issue-updates.html +++ b/apiserver/templates/emails/notifications/issue-updates.html @@ -1,978 +1,1108 @@ -
- - -
-
-
- ![]() |
-
- - {{ issue.issue_identifier }} updates - -- {{ issue.name }}: {{ issue.issue_identifier }} - - |
-
- {% if data.1 %}{{ data|length }}{% endif %} {{ summary }} - - {{ data.0.actor_detail.first_name}} - {{data.0.actor_detail.last_name }} - -
- {% if comments.0 %} -- {{ comments|length }} {% if comments|length == 1 %}comment was{% else %}comments were{% endif %} left by - - {% if comments|length == 1 %} - {{ data.0.actor_detail.first_name }} - {{ data.0.actor_detail.last_name }} - {% else %} - {{ data.0.actor_detail.first_name }} - {{ data.0.actor_detail.last_name }} and others - {% endif %} - -
- {% endif %} - {% if mentions and comments.0 and data.0 %} -- There are 3 new updates, added 1 new comment and, you were - - @{{ data.0.actor_detail.first_name}} - {{data.0.actor_detail.last_name }} - - mentioned a comment of this issue. -
- {% endif %} - {% for update in data %} {% if update.changes.name %} - -- The issue title has been updated from “{{update.changes.user.old_value.0}}“ to "{{update.changes.user.new_value|last}}" -
- {% endif %} - - {% if data %} -- Updates -
-