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 comment to be all bold when archiving/unarchiving

Mir Bhatiad4b32fbd9d40
diff --git a/lib/open_project/journal_formatter/active_status.rb b/lib/open_project/journal_formatter/active_status.rb
index 479020a8b28..9483e97b0e5 100644
--- a/lib/open_project/journal_formatter/active_status.rb
+++ b/lib/open_project/journal_formatter/active_status.rb
@@ -37,6 +37,7 @@ class OpenProject::JournalFormatter::ActiveStatus < JournalFormatter::Base
else
I18n.t('activerecord.attributes.project.active_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/active_status_spec.rb b/spec/lib/journal_formatter/active_status_spec.rb
index 1c6bb1232db..a03c7cd75aa 100644
--- a/spec/lib/journal_formatter/active_status_spec.rb
+++ b/spec/lib/journal_formatter/active_status_spec.rb
@@ -33,7 +33,7 @@ describe OpenProject::JournalFormatter::ActiveStatus do
it "renders correctly when unarchiving" do
html = instance.render("active", [false, true], html: true)
- expect(html).to eq("<strong>Project</strong> unarchived")
+ expect(html).to eq("<strong>Project</strong> <strong>unarchived</strong>")
html = instance.render("active", [false, true], html: false)
expect(html).to eq("Project unarchived")
@@ -41,7 +41,7 @@ describe OpenProject::JournalFormatter::ActiveStatus do
it "renders correctly when archiving" do
html = instance.render("active", [true, false], html: true)
- expect(html).to eq("<strong>Project</strong> archived")
+ expect(html).to eq("<strong>Project</strong> <strong>archived</strong>")
html = instance.render("active", [true, false], html: false)
expect(html).to eq("Project archived")