Skip to content

Commit

Permalink
Remove Disabled option from Progress calculation setting
Browse files Browse the repository at this point in the history
Also renamed the other options to Work-based and Status-based, and added
an explanation of the two options.
  • Loading branch information
cbliard committed Apr 5, 2024
1 parent 1907529 commit d5d65f7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/models/work_package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class WorkPackage < ApplicationRecord

include OpenProject::Journal::AttachmentHelper

DONE_RATIO_OPTIONS = %w(field status disabled).freeze
DONE_RATIO_OPTIONS = %w[field status].freeze

belongs_to :project
belongs_to :type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ See COPYRIGHT and LICENSE files for more details.
<div class="form--field"><%= setting_check_box :cross_project_work_package_relations %></div>
<div class="form--field"><%= setting_check_box :display_subprojects_work_packages %></div>
<div class="form--field"><%= setting_check_box :work_package_startdate_is_adddate %></div>
<div class="form--field"><%= setting_select :work_package_done_ratio, WorkPackage::DONE_RATIO_OPTIONS.collect { |i| [t("setting_work_package_done_ratio_#{i}"), i] }, container_class: "-middle" %></div>
<div class="form--field">
<%= setting_select :work_package_done_ratio,
WorkPackage::DONE_RATIO_OPTIONS.collect { |i| [t("setting_work_package_done_ratio_#{i}"), i] },
container_class: "-middle" %>
<div class="form--field-instructions"><%= t("setting_work_package_done_ratio_explanation_html") %></div>
</div>
<div class="form--field settings--highlighting-mode">
<%= setting_select(:work_package_list_default_highlighting_mode,
Query::Highlighting::QUERY_HIGHLIGHTING_MODES.map do |mode|
Expand Down
10 changes: 6 additions & 4 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3019,10 +3019,12 @@ Project attributes and sections are defined in the <a href=%{admin_settings_url}
setting_file_max_size_displayed: "Max size of text files displayed inline"
setting_host_name: "Host name"
setting_invitation_expiration_days: "Activation email expires after"
setting_work_package_done_ratio: "Calculate work package % Complete with"
setting_work_package_done_ratio_field: "The work package field"
setting_work_package_done_ratio_status: "The work package status"
setting_work_package_done_ratio_disabled: "Disable (hide the % Complete field)"
setting_work_package_done_ratio: "Progress calculation"
setting_work_package_done_ratio_field: "Work-based"
setting_work_package_done_ratio_status: "Status-based"
setting_work_package_done_ratio_explanation_html: >
In work-based mode, % Complete is calculated from how much work is done in relation to total work.<br>
In status-based mode, each status has a % Complete value associated with it. Changing status will change % Complete.
setting_work_package_properties: "Work package properties"
setting_work_package_startdate_is_adddate: "Use current date as start date for new work packages"
setting_work_packages_projects_export_limit: "Work packages / Projects export limit"
Expand Down

0 comments on commit d5d65f7

Please sign in to comment.