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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[50956] Rename "done ratio" as "% Complete" in UI
Christophe Bliardc666fdf01317
diff --git a/app/controllers/statuses_controller.rb b/app/controllers/statuses_controller.rbindex 0330a7906d7..fcf4ab900c2 100644--- a/app/controllers/statuses_controller.rb+++ b/app/controllers/statuses_controller.rb@@ -86,7 +86,7 @@ class StatusesController < ApplicationControllerif Status.update_work_package_done_ratiosflash[:notice] = I18n.t(:notice_work_package_done_ratios_updated)else- flash[:error] = I18n.t(:error_work_package_done_ratios_not_updated)+ flash[:error] = I18n.t(:error_work_package_done_ratios_not_updated)endredirect_to action: 'index'enddiff --git a/config/locales/en.yml b/config/locales/en.ymlindex 24a30b6f8a8..eab72ab8c56 100644--- a/config/locales/en.yml+++ b/config/locales/en.yml@@ -1468,7 +1468,7 @@ en:error_pdf_export_too_many_columns: "Too many columns selected for the PDF export. Please reduce the number of columns."error_pdf_failed_to_export: "The PDF export could not be saved: %{error}"error_token_authenticity: "Unable to verify Cross-Site Request Forgery token. Did you try to submit data on multiple browsers or tabs? Please close all tabs and try again."- error_work_package_done_ratios_not_updated: "Work package done ratios not updated."+ error_work_package_done_ratios_not_updated: "Work package % Complete values not updated."error_work_package_not_found_in_project: "The work package was not found or does not belong to this project"error_must_be_project_member: "must be project member"error_migrations_are_pending: "Your OpenProject installation has pending database migrations. You have likely missed running the migrations on your last upgrade. Please check the upgrade guide to properly upgrade your installation."@@ -2179,7 +2179,7 @@ en:label_type_new: "New type"label_type_plural: "Types"label_ui: "User Interface"- label_update_work_package_done_ratios: "Update work package done ratios"+ label_update_work_package_done_ratios: "Update work package % Complete values"label_updated_time: "Updated %{value} ago"label_updated_time_at: "%{author} %{age}"label_updated_time_by: "Updated by %{author} %{age} ago"@@ -2458,7 +2458,7 @@ en:notice_file_not_found: "The page you were trying to access doesn't exist or has been removed."notice_forced_logout: "You have been automatically logged out after %{ttl_time} minutes of inactivity."notice_internal_server_error: "An error occurred on the page you were trying to access. If you continue to experience problems please contact your %{app_title} administrator for assistance."- notice_work_package_done_ratios_updated: "Work package done ratios updated."+ notice_work_package_done_ratios_updated: "Work package % Complete values updated."notice_locking_conflict: "Information has been updated by at least one other user in the meantime."notice_locking_conflict_additional_information: "The update(s) came from %{users}."notice_locking_conflict_reload_page: "Please reload the page, review the changes and reapply your updates."@@ -2849,10 +2849,10 @@ en: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 the work package done ratio with"- setting_work_package_done_ratio_field: "Use the work package field"- setting_work_package_done_ratio_status: "Use the work package status"- setting_work_package_done_ratio_disabled: "Disable (hide the progress)"+ 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_list_default_columns: "Display by default"setting_work_package_properties: "Work package properties"setting_work_package_startdate_is_adddate: "Use current date as start date for new work packages"@@ -3358,9 +3358,9 @@ en:unsupported_context: "The resource given is not supported as context."context_object_not_found: "Cannot find the resource given as the context."validation:- done_ratio: "Done ratio cannot be set on parent work packages, when it is inferred by status or when it is disabled."+ done_ratio: "% Complete cannot be set on parent work packages, when it is inferred by status or when it is disabled."due_date: "Finish date cannot be set on parent work packages."- estimated_hours: "Estimated hours cannot be set on parent work packages." # feel like this one should be removed eventually+ estimated_hours: "Work cannot be set on parent work packages." # feel like this one should be removed eventuallyinvalid_user_assigned_to_work_package: "The chosen user is not allowed to be '%{property}' for this work package."start_date: "Start date cannot be set on parent work packages."eprops:diff --git a/config/locales/js-en.yml b/config/locales/js-en.ymlindex 7df08547718..872866f1b46 100644--- a/config/locales/js-en.yml+++ b/config/locales/js-en.yml@@ -1042,7 +1042,6 @@ en:date: "Date"dueDate: "Finish date"duration: "Duration"- estimatedTime: "Estimated time"spentTime: "Spent time"category: "Category"percentageDone: "Percentage done"diff --git a/docs/user-guide/time-and-costs/progress-tracking/README.md b/docs/user-guide/time-and-costs/progress-tracking/README.mdindex 6b46c4e5bd6..18e0060ca9e 100644--- a/docs/user-guide/time-and-costs/progress-tracking/README.md+++ b/docs/user-guide/time-and-costs/progress-tracking/README.md@@ -73,7 +73,7 @@ your OpenProject system to associate work packages statuses .In the Administration, please navigate to Work packages -> Settings and change “Calculate the work package done ratio” to“Use the work package status”.-+In this mode, OpenProject does _not_ allow you to manually modify the**Progress (%)** field in the work packages.@@ -89,7 +89,7 @@ statuses together with suitable “Progress (%)” values.For example, setting the status of a work package to “In progress”is equivalent to setting **Progress (%)** to 50% manually.-Note: The status and it’s associated progress value from the+Note: The status and its associated progress value from theadministration screen also determines the **Progress (%)** ofwork packages with children. So there is no roll-up of progressin the work package table hierarchy in this configuration.diff --git a/modules/backlogs/config/locales/js-en.yml b/modules/backlogs/config/locales/js-en.ymlindex b246bc3204c..bf40cd1d6c3 100644--- a/modules/backlogs/config/locales/js-en.yml+++ b/modules/backlogs/config/locales/js-en.yml@@ -31,4 +31,4 @@ en:work_packages:properties:storyPoints: "Story Points"- remainingTime: "Remaining hours"+ remainingTime: "Remaining work"diff --git a/spec/contracts/work_packages/base_contract_spec.rb b/spec/contracts/work_packages/base_contract_spec.rbindex eb8ed747a45..c4e459ce872 100644--- a/spec/contracts/work_packages/base_contract_spec.rb+++ b/spec/contracts/work_packages/base_contract_spec.rb@@ -679,21 +679,15 @@ RSpec.describe WorkPackages::BaseContract dodescribe 'percentage done' doit_behaves_like 'a parent unwritable property', :done_ratio- context 'when done ratio inferred by status' do- before do- allow(Setting).to receive(:work_package_done_ratio).and_return('status')- end-+ context 'when % Complete inferred by status',+ with_settings: { work_package_done_ratio: 'status' } doit_behaves_like 'invalid if changed', :done_ratioend- context 'when done ratio disabled' do+ context 'when % Complete disabled',+ with_settings: { work_package_done_ratio: 'disabled' } dolet(:changed_values) { [:done_ratio] }- before do- allow(Setting).to receive(:work_package_done_ratio).and_return('disabled')- end-it_behaves_like 'invalid if changed', :done_ratioendenddiff --git a/spec/controllers/statuses_controller_spec.rb b/spec/controllers/statuses_controller_spec.rbindex 697a6789ad0..aeb2a8af2f2 100644--- a/spec/controllers/statuses_controller_spec.rb+++ b/spec/controllers/statuses_controller_spec.rb@@ -211,34 +211,26 @@ RSpec.describe StatusesController doenddescribe '#update_work_package_done_ratio' do- shared_examples_for 'flash' do- it { is_expected.to set_flash.to(message) }- end-context "with 'work_package_done_ratio' using 'field'" do- let(:message) { /not updated/ }-before doallow(Setting).to receive(:work_package_done_ratio).and_return 'field'post :update_work_package_done_ratioend- it_behaves_like 'flash'+ it { is_expected.to set_flash[:error].to(I18n.t('error_work_package_done_ratios_not_updated')) }it_behaves_like 'redirect'endcontext "with 'work_package_done_ratio' using 'status'" do- let(:message) { /Work package done ratios updated/ }-before doallow(Setting).to receive(:work_package_done_ratio).and_return 'status'post :update_work_package_done_ratioend- it_behaves_like 'flash'+ it { is_expected.to set_flash[:notice].to(I18n.t('notice_work_package_done_ratios_updated')) }it_behaves_like 'redirect'enddiff --git a/spec/models/status_spec.rb b/spec/models/status_spec.rbindex f6ac574d300..258efc99f7f 100644--- a/spec/models/status_spec.rb+++ b/spec/models/status_spec.rb@@ -112,7 +112,7 @@ RSpec.describe Status doendcontext 'with Setting.work_package_done_ratio using the status', with_settings: { work_package_done_ratio: 'status' } do- it "updates all of the work package's done_ratios to match their status" do+ it "updates all of the work package's % Complete values to match their status" dodescribed_class.update_work_package_done_ratiosexpect(work_package.reload.done_ratio)