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

Link to the documentation for more info on the inner workings of progress

Aaron Contreras982d1cdb8c4e
diff --git a/app/components/work_packages/progress/base_modal_component.rb b/app/components/work_packages/progress/base_modal_component.rb
index e0445c4fdbc..728aff84b1c 100644
--- a/app/components/work_packages/progress/base_modal_component.rb
+++ b/app/components/work_packages/progress/base_modal_component.rb
@@ -66,6 +66,10 @@ module WorkPackages
end
end
+ def learn_more_href
+ OpenProject::Static::Links.links[:progress_tracking_docs][:href]
+ end
+
def should_display_migration_warning?
work_package.done_ratio.present? && work_package.estimated_hours.nil? && work_package.remaining_hours.nil?
end
diff --git a/app/components/work_packages/progress/status_based/modal_body_component.html.erb b/app/components/work_packages/progress/status_based/modal_body_component.html.erb
index 28551e5fc8f..e050b328c62 100644
--- a/app/components/work_packages/progress/status_based/modal_body_component.html.erb
+++ b/app/components/work_packages/progress/status_based/modal_body_component.html.erb
@@ -21,7 +21,7 @@
<% modal_body.with_row(mt: 3) do |_tooltip| %>
<%= render(Primer::Beta::Text.new(font_weight: :semibold)) { t("work_package.progress.label_note") } %>
<%= render(Primer::Beta::Text.new) { t("work_package.progress.modal.status_based_help_text") } %>
- <%= render(Primer::Beta::Link.new(href: "#")) { t(:label_learn_more) } %>
+ <%= render(Primer::Beta::Link.new(href: learn_more_href)) { t(:label_learn_more) } %>
<% end %>
<% modal_body.with_row(mt: 3) do |_actions_row| %>
diff --git a/app/components/work_packages/progress/work_based/modal_body_component.html.erb b/app/components/work_packages/progress/work_based/modal_body_component.html.erb
index 8ac95a31007..27ea211e162 100644
--- a/app/components/work_packages/progress/work_based/modal_body_component.html.erb
+++ b/app/components/work_packages/progress/work_based/modal_body_component.html.erb
@@ -21,7 +21,7 @@
<% modal_body.with_row(mt: 3) do |_tooltip| %>
<%= render(Primer::Beta::Text.new(font_weight: :semibold)) { t("work_package.progress.label_note") } %>
<%= render(Primer::Beta::Text.new) { t("work_package.progress.modal.work_based_help_text") } %>
- <%= render(Primer::Beta::Link.new(href: "#")) { t(:label_learn_more) } %>
+ <%= render(Primer::Beta::Link.new(href: learn_more_href)) { t(:label_learn_more) } %>
<% end %>
<% modal_body.with_row(mt: 3) do |_actions_row| %>
diff --git a/lib/open_project/static/links.rb b/lib/open_project/static/links.rb
index 3bde27c86b6..5bdddd6f1b5 100644
--- a/lib/open_project/static/links.rb
+++ b/lib/open_project/static/links.rb
@@ -239,6 +239,9 @@ module OpenProject
pricing: {
href: "https://www.openproject.org/pricing/"
},
+ progress_tracking_docs: {
+ href: "https://www.openproject.org/docs/user-guide/time-and-costs/progress-tracking/"
+ },
enterprise_docs: {
form_configuration: {
href: "https://www.openproject.org/docs/system-admin-guide/manage-work-packages/work-package-types/#work-package-form-configuration-enterprise-add-on"
diff --git a/spec/components/work_packages/progress/shared_modal_examples.rb b/spec/components/work_packages/progress/shared_modal_examples.rb
index f5c9ba4e6ed..595fa50b978 100644
--- a/spec/components/work_packages/progress/shared_modal_examples.rb
+++ b/spec/components/work_packages/progress/shared_modal_examples.rb
@@ -76,3 +76,17 @@ RSpec.shared_examples_for "progress modal submit path" do
end
end
end
+
+RSpec.shared_examples_for "progress modal help links" do
+ describe "#learn_more_href" do
+ subject(:component) { render_inline(described_class.new(WorkPackage.new)) }
+
+ it "returns the link to the progress tracking documentation" do
+ subject
+
+ expect(page)
+ .to have_link("Learn more",
+ href: OpenProject::Static::Links.links[:progress_tracking_docs][:href])
+ end
+ end
+end
diff --git a/spec/components/work_packages/progress/status_based/modal_body_component_spec.rb b/spec/components/work_packages/progress/status_based/modal_body_component_spec.rb
index a90896286ba..7c406052978 100644
--- a/spec/components/work_packages/progress/status_based/modal_body_component_spec.rb
+++ b/spec/components/work_packages/progress/status_based/modal_body_component_spec.rb
@@ -36,6 +36,7 @@ RSpec.describe WorkPackages::Progress::StatusBased::ModalBodyComponent,
include_examples "progress modal validations"
include_examples "progress modal submit path"
+ include_examples "progress modal help links"
describe "#mode" do
subject(:component) { described_class.new(WorkPackage.new) }
diff --git a/spec/components/work_packages/progress/work_based/modal_body_component_spec.rb b/spec/components/work_packages/progress/work_based/modal_body_component_spec.rb
index c01e6333d5d..a304347e2c2 100644
--- a/spec/components/work_packages/progress/work_based/modal_body_component_spec.rb
+++ b/spec/components/work_packages/progress/work_based/modal_body_component_spec.rb
@@ -36,6 +36,7 @@ RSpec.describe WorkPackages::Progress::WorkBased::ModalBodyComponent,
include_examples "progress modal validations"
include_examples "progress modal submit path"
+ include_examples "progress modal help links"
describe "#mode" do
subject(:component) { described_class.new(WorkPackage.new) }