mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: email-template changes overview (#3494)
* style: template design * fix: project url and actors * fix: heading jinja * fix: typo in workspace * fix: issue title change * fix: top project, issue redirection --------- Co-authored-by: NarayanBavisetti <narayan3119@gmail.com>
This commit is contained in:
parent
888665783e
commit
f0836ceb10
@ -148,10 +148,12 @@ def send_email_notification(
|
|||||||
template_data = []
|
template_data = []
|
||||||
total_changes = 0
|
total_changes = 0
|
||||||
comments = []
|
comments = []
|
||||||
|
actors_involved = []
|
||||||
for actor_id, changes in data.items():
|
for actor_id, changes in data.items():
|
||||||
actor = User.objects.get(pk=actor_id)
|
actor = User.objects.get(pk=actor_id)
|
||||||
total_changes = total_changes + len(changes)
|
total_changes = total_changes + len(changes)
|
||||||
comment = changes.pop("comment", False)
|
comment = changes.pop("comment", False)
|
||||||
|
actors_involved.append(actor_id)
|
||||||
if comment:
|
if comment:
|
||||||
comments.append(
|
comments.append(
|
||||||
{
|
{
|
||||||
@ -191,6 +193,7 @@ def send_email_notification(
|
|||||||
context = {
|
context = {
|
||||||
"data": template_data,
|
"data": template_data,
|
||||||
"summary": summary,
|
"summary": summary,
|
||||||
|
"actors_involved": len(set(actors_involved)),
|
||||||
"issue": {
|
"issue": {
|
||||||
"issue_identifier": f"{str(issue.project.identifier)}-{str(issue.sequence_id)}",
|
"issue_identifier": f"{str(issue.project.identifier)}-{str(issue.sequence_id)}",
|
||||||
"name": issue.name,
|
"name": issue.name,
|
||||||
@ -200,6 +203,9 @@ def send_email_notification(
|
|||||||
"email": receiver.email,
|
"email": receiver.email,
|
||||||
},
|
},
|
||||||
"issue_url": f"{base_api}/{str(issue.project.workspace.slug)}/projects/{str(issue.project.id)}/issues/{str(issue.id)}",
|
"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",
|
"user_preference": f"{base_api}/profile/preferences/email",
|
||||||
"comments": comments,
|
"comments": comments,
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user