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

[55803] Allow free input of status % complete in administration

Christophe Bliard138a53ef9641
diff --git a/app/views/statuses/_form.html.erb b/app/views/statuses/_form.html.erb
index 036367bd68d..b00e1eee3bd 100644
--- a/app/views/statuses/_form.html.erb
+++ b/app/views/statuses/_form.html.erb
@@ -31,12 +31,7 @@ See COPYRIGHT and LICENSE files for more details.
<section class="form--section">
<div class="form--field -required"><%= f.text_field "name", required: true, container_class: "-middle" %></div>
- <div class="form--field">
- <%= f.select :default_done_ratio,
- (0..100).step(10).map { |r| ["#{r} %", r] },
- container_class: "-xslim",
- label: WorkPackage.human_attribute_name(:done_ratio) %>
- </div>
+ <div class="form--field"><%= f.number_field "default_done_ratio", min: 0, max: 100, container_class: "-tiny" %></div>
<div class="form--field"><%= f.check_box "is_closed" %></div>
<% unless @status.is_default? %>
<div class="form--field"><%= f.check_box "is_default" %></div>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 79bbc996870..3a63ca12956 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -728,6 +728,7 @@ en:
is_closed: "Work package closed"
is_readonly: "Work package read-only"
excluded_from_totals: "Exclude from calculation of totals in hierarchy"
+ default_done_ratio: "% Complete"
journal:
notes: "Notes"
member:
@@ -1073,6 +1074,11 @@ en:
hours_per_day_are_missing: "The number of hours per day must be defined."
durations_are_not_positive_numbers: "The durations must be positive numbers."
hours_per_day_is_out_of_bounds: "Hours per day can't be more than 24"
+ status:
+ attributes:
+ default_done_ratio:
+ inclusion: "must be between 0 and 100."
+ readonly_default_exlusive: "can not be activated for statuses that are marked default."
time_entry:
attributes:
hours:
@@ -1187,8 +1193,6 @@ en:
version:
undeletable_archived_projects: "The version cannot be deleted as it has work packages attached to it."
undeletable_work_packages_attached: "The version cannot be deleted as it has work packages attached to it."
- status:
- readonly_default_exlusive: "can not be activated for statuses that are marked default."
token/api:
attributes:
token_name: