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

refactor: use method WorkPackage.status_based_mode?

Christophe Bliard2566c8c1011f
diff --git a/app/views/admin/settings/progress_tracking/show.html.erb b/app/views/admin/settings/progress_tracking/show.html.erb
index 8556dfd8702..391de8f1a50 100644
--- a/app/views/admin/settings/progress_tracking/show.html.erb
+++ b/app/views/admin/settings/progress_tracking/show.html.erb
@@ -67,7 +67,7 @@ primer_form_with(
end
form.radio_button_group(
name: "percent_complete_on_status_closed",
- disabled: Setting.work_package_done_ratio == "status",
+ disabled: WorkPackage.status_based_mode?,
data: { admin__progress_tracking_target: "statusClosedRadioGroup" }
)
form.submit