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

Update project archived status messages to display in all bold

Mir Bhatiace706f94ffb4
diff --git a/lib/open_project/journal_formatter/template.rb b/lib/open_project/journal_formatter/template.rb
index f49f7462985..f44a48503c9 100644
--- a/lib/open_project/journal_formatter/template.rb
+++ b/lib/open_project/journal_formatter/template.rb
@@ -37,6 +37,7 @@ class OpenProject::JournalFormatter::Template < JournalFormatter::Base
else
I18n.t('activerecord.attributes.project.templated_value.false')
end
+ value = content_tag(:strong, value) if options[:html]
I18n.t(:text_journal_label_value, label: label_text, value:)
end
diff --git a/spec/lib/journal_formatter/template_spec.rb b/spec/lib/journal_formatter/template_spec.rb
index bacf44fc67c..8ac39e59728 100644
--- a/spec/lib/journal_formatter/template_spec.rb
+++ b/spec/lib/journal_formatter/template_spec.rb
@@ -33,7 +33,7 @@ describe OpenProject::JournalFormatter::Template do
it "renders correctly when marked as template" do
html = instance.render("templated", [false, true], html: true)
- expect(html).to eq("<strong>Project</strong> marked as template")
+ expect(html).to eq("<strong>Project</strong> <strong>marked as template</strong>")
html = instance.render("templated", [false, true], html: false)
expect(html).to eq("Project marked as template")
@@ -43,7 +43,7 @@ describe OpenProject::JournalFormatter::Template do
it "renders correctly when unmarked as template" do
html = instance.render("templated", [true, false], html: true)
- expect(html).to eq("<strong>Project</strong> unmarked as template")
+ expect(html).to eq("<strong>Project</strong> <strong>unmarked as template</strong>")
html = instance.render("templated", [true, false], html: false)
expect(html).to eq("Project unmarked as template")