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

Hide non-rendered activity details

Christophe Bliard5e108dbfb2b4
diff --git a/app/helpers/activity_helper.rb b/app/helpers/activity_helper.rb
index 28ba29c7e59..c9a6820d41f 100644
--- a/app/helpers/activity_helper.rb
+++ b/app/helpers/activity_helper.rb
@@ -10,4 +10,10 @@ module ActivityHelper
event.event_type
end
end
+
+ def journal_rendered_details(journal)
+ journal.details
+ .map { |detail| journal.render_detail(detail) }
+ .compact
+ end
end
diff --git a/app/views/activities/index.html.erb b/app/views/activities/index.html.erb
index 08d336cdaee..03b114e54ef 100644
--- a/app/views/activities/index.html.erb
+++ b/app/views/activities/index.html.erb
@@ -56,8 +56,8 @@ See COPYRIGHT and LICENSE files for more details.
<% unless journal.initial? %>
<% if journal.details.any? -%>
<ul class="op-project-activity-list--item-details">
- <% journal.details.each do |detail| -%>
- <li class="op-project-activity-list--item-detail"><%= journal.render_detail(detail) %></li>
+ <% journal_rendered_details(journal).each do |detail| -%>
+ <li class="op-project-activity-list--item-detail"><%= detail %></li>
<% end -%>
</ul>
<% end -%>