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

[54646] Update cause text in journal activity

Christophe Bliard7b442e2cd2b4
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 5011e2bef30..ae9083733a2 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -1766,7 +1766,8 @@ Project attributes and sections are defined in the <a href=%{admin_settings_url}
progress_calculation_adjusted: >-
Progress calculation automatically <a href="%{href}" target="_blank">adjusted with version update</a>.
totals_removed_from_childless_work_packages: >-
- Totals automatically removed from childless work packages with version update.
+ Work and progress totals automatically removed for non-parent work packages with <a href="%{href}" target="_blank">version update</a>.
+ This is a maintenance task and can be safely ignored.
links:
configuration_guide: "Configuration guide"
diff --git a/lib/open_project/journal_formatter/cause.rb b/lib/open_project/journal_formatter/cause.rb
index 85c9275bc79..cd316b8fcd6 100644
--- a/lib/open_project/journal_formatter/cause.rb
+++ b/lib/open_project/journal_formatter/cause.rb
@@ -82,6 +82,8 @@ class OpenProject::JournalFormatter::Cause < JournalFormatter::Base
when "progress_calculation_adjusted_from_disabled_mode",
"progress_calculation_adjusted"
{ href: OpenProject::Static::Links.links[:blog_article_progress_changes][:href] }
+ when "totals_removed_from_childless_work_packages"
+ { href: OpenProject::Static::Links.links[:release_notes_14_0_1][:href] }
else
{}
end
diff --git a/lib/open_project/static/links.rb b/lib/open_project/static/links.rb
index 30650d602d7..d63d9587ac8 100644
--- a/lib/open_project/static/links.rb
+++ b/lib/open_project/static/links.rb
@@ -177,6 +177,10 @@ module OpenProject
href: "https://www.openproject.org/docs/release-notes/",
label: :label_release_notes
},
+ release_notes_14_0_1: {
+ href: "https://www.openproject.org/docs/release-notes/14-0-1/",
+ label: "Release notes for OpenProject 14.0.1"
+ },
data_privacy: {
href: "https://www.openproject.org/legal/privacy/",
label: :label_privacy_policy
diff --git a/spec/lib/journal_formatter/cause_spec.rb b/spec/lib/journal_formatter/cause_spec.rb
index 3b072631489..f85369703a0 100644
--- a/spec/lib/journal_formatter/cause_spec.rb
+++ b/spec/lib/journal_formatter/cause_spec.rb
@@ -430,6 +430,38 @@ RSpec.describe OpenProject::JournalFormatter::Cause do
end
end
+ context "when cause is a system update: totals removed from childless work packages" do
+ let(:cause) do
+ {
+ "type" => "system_update",
+ "feature" => "totals_removed_from_childless_work_packages"
+ }
+ end
+
+ context "when rendering HTML variant" do
+ let(:html) { true }
+
+ it do
+ href = OpenProject::Static::Links.links[:release_notes_14_0_1][:href]
+ expect(subject).to eq "<strong>OpenProject system update:</strong> Work and progress totals " \
+ "automatically removed for non-parent work packages with " \
+ "<a href=\"#{href}\" target=\"_blank\">version update</a>. " \
+ "This is a maintenance task and can be safely ignored."
+ end
+ end
+
+ context "when rendering raw variant" do
+ let(:html) { false }
+
+ it do
+ expect(subject).to eq "OpenProject system update: Work and progress totals " \
+ "automatically removed for non-parent work packages with " \
+ "version update. " \
+ "This is a maintenance task and can be safely ignored."
+ end
+ end
+ end
+
context "when the change was caused by a system update" do
let(:cause) do
{