Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Show comment in notification row in daily email

Henriette Darge80253c71ea7b
diff --git a/app/views/digest_mailer/work_packages.html.erb b/app/views/digest_mailer/work_packages.html.erb
index 2594dbb5ae7..3efed52cbee 100644
--- a/app/views/digest_mailer/work_packages.html.erb
+++ b/app/views/digest_mailer/work_packages.html.erb
@@ -78,6 +78,14 @@
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="font-size: 12px;">
<% notifications_by_work_package.each do | notification | %>
+ <% if notification.journal.notes.present? %>
+ <tr style="color: #878787; line-height: 20px; white-space: nowrap;">
+ <td>
+ <%= I18n.t(:'mail.digests.work_packages.comment_added').html_safe %>
+ <%= digest_notification_timestamp_text(notification) %>
+ </td>
+ </tr>
+ <% end %>
<% notification.journal.details.each do |detail| %>
<tr style="color: #878787; line-height: 20px; white-space: nowrap;">
<td>
diff --git a/app/views/digest_mailer/work_packages.text.erb b/app/views/digest_mailer/work_packages.text.erb
index e6388d20582..46090e8d8a4 100644
--- a/app/views/digest_mailer/work_packages.text.erb
+++ b/app/views/digest_mailer/work_packages.text.erb
@@ -15,6 +15,7 @@
<% journal = notification.journal %>
<% if journal.notes.present? %>
+ <%= I18n.t(:label_comment_added) %>:
<%= journal.notes %>
<% end %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 7baca0c65c2..e987f8c7265 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -1972,6 +1972,7 @@ en:
settings: 'Change email settings'
time_frame: "At %{time} on %{weekday}, %{date}, you have %{number_unread} unread notifications in %{number_work_packages} work packages"
work_packages:
+ comment_added: '<b>Comment</b> added'
created: 'Created'
created_at: 'by %{user} %{timestamp} ago'
login_to_see_all: 'Log in to see all notifications.'