fix: email-template heading overview (#3525)

* fix: email-template heading

* fix: typo
This commit is contained in:
Lakhan Baheti 2024-01-31 20:16:47 +05:30 committed by GitHub
parent 6f210e1f4b
commit 4fc4da7982
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 26 additions and 7 deletions

View File

@ -186,7 +186,7 @@ def send_email_notification(
}
)
summary = "updates were made to the issue by"
summary = "Updates were made to the issue by"
# Send the mail
subject = f"{issue.project.identifier}-{issue.sequence_id} {issue.name}"

View File

@ -108,14 +108,33 @@
margin-bottom: 15px;
"
/>
{% if actors_involved > 0 %}
{% if actors_involved == 1 %}
<p style="font-size: 1rem;color: #1f2d5c; line-height: 28px">
{{summary}}
<span style="font-size: 1rem; font-weight: 700; line-height: 28px">
{{ data.0.actor_detail.first_name}}
{{data.0.actor_detail.last_name}}
</span>.
</p>
{% else %}
<p style="font-size: 1rem;color: #1f2d5c; line-height: 28px">
{{summary}}
<span style="font-size: 1rem; font-weight: 700; line-height: 28px">
{{ data.0.actor_detail.first_name}}
{{data.0.actor_detail.last_name }}
</span>and others.
</p>
{% endif %}
<!-- {% if actors_involved == 1 %}
{% if data|length > 0 and comments|length == 0 %}
<p style="font-size: 1rem;color: #1f2d5c; line-height: 28px">
<span style="font-size: 1rem; font-weight: 700; line-height: 28px">
{{ data.0.actor_detail.first_name}}
{{data.0.actor_detail.last_name }}
</span>
made {{data|length}} {% if data|length > 1 %}updates{% else %}update{% endif %} to the issue.
made {{total_updates}} {% if total_updates > 1 %}updates{% else %}update{% endif %} to the issue.
</p>
{% elif data|length == 0 and comments|length > 0 %}
<p style="font-size: 1rem;color: #1f2d5c; line-height: 28px">
@ -123,7 +142,7 @@
{{ comments.0.actor_detail.first_name}}
{{comments.0.actor_detail.last_name }}
</span>
added {{comments|length}} new {% if comments|length > 1 %}comments{% else %}comment{% endif %}.
added {{total_comments}} new {% if total_comments > 1 %}comments{% else %}comment{% endif %}.
</p>
{% elif data|length > 0 and comments|length > 0 %}
<p style="font-size: 1rem;color: #1f2d5c; line-height: 28px">
@ -131,14 +150,14 @@
{{ data.0.actor_detail.first_name}}
{{data.0.actor_detail.last_name }}
</span>
made {{data|length}} {% if data|length > 1 %}updates{% else %}update{% endif %} and added {{comments|length}} new {% if comments|length > 1 %}comments{% else %}comment{% endif %} on the issue.
made {{total_updates}} {% if total_updates > 1 %}updates{% else %}update{% endif %} and added {{total_comments}} new {% if total_comments > 1 %}comments{% else %}comment{% endif %} on the issue.
</p>
{% endif %}
{% else %}
<p style="font-size: 1rem;color: #1f2d5c; line-height: 28px">
There are {{ data|length }} new updates and {{comments|length}} new comments on the issue
There are {{ total_updates }} new updates and {{total_comments}} new comments on the issue.
</p>
{% endif %}
{% endif %} -->
{% for update in data %} {% if update.changes.name %}
<!-- Issue title updated -->
<p style="font-size: 1rem; line-height: 28px; color: #1f2d5c">