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
Make rubocop happier
Christophe Bliardfa83a52657e7
diff --git a/app/services/work_packages/set_attributes_service/pre_14_4_derive_progress_values.rb b/app/services/work_packages/set_attributes_service/pre_14_4_derive_progress_values.rbindex 852dcb7abd8..a1766f16c60 100644--- a/app/services/work_packages/set_attributes_service/pre_14_4_derive_progress_values.rb+++ b/app/services/work_packages/set_attributes_service/pre_14_4_derive_progress_values.rb@@ -26,6 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#+++# rubocop:disable Metrics/AbcSizeclass WorkPackages::SetAttributesServiceclass Pre144DeriveProgressValuesattr_reader :work_package@@ -148,7 +149,7 @@ class WorkPackages::SetAttributesService# on the computation of it derived from the status's default done ratio# and the estimated hours. If the estimated hours are unset, then also# unset the remaining hours.- # rubocop:disable Metrics/AbcSize,Metrics/PerceivedComplexity+ # rubocop:disable Metrics/PerceivedComplexitydef update_remaining_hoursif WorkPackage.use_status_for_done_ratio?update_remaining_hours_from_percent_complete@@ -166,7 +167,7 @@ class WorkPackages::SetAttributesServiceendendend- # rubocop:enable Metrics/AbcSize,Metrics/PerceivedComplexity+ # rubocop:enable Metrics/PerceivedComplexitydef estimated_hours_from_done_ratio_and_remaining_hoursremaining_ratio = 1.0 - ((work_package.done_ratio || 0) / 100.0)@@ -182,3 +183,4 @@ class WorkPackages::SetAttributesServiceendendend+# rubocop:enable Metrics/AbcSizediff --git a/spec/contracts/work_packages/base_contract_pre_14_4_without_percent_complete_edition_spec.rb b/spec/contracts/work_packages/base_contract_pre_14_4_without_percent_complete_edition_spec.rbindex 95d78a84c44..73c7c7d24b2 100644--- a/spec/contracts/work_packages/base_contract_pre_14_4_without_percent_complete_edition_spec.rb+++ b/spec/contracts/work_packages/base_contract_pre_14_4_without_percent_complete_edition_spec.rb@@ -235,7 +235,7 @@ RSpec.describe WorkPackages::BaseContract, "pre 14.4 without percent complete ed# Breaking abstraction here to avoid mocking hell.# We might want to extract the assignable_... into separate# objects.- allow(contract)+ allow(contract) # rubocop:disable RSpec/SubjectStub.to receive(:new_statuses_allowed_from).with(work_package.status).and_return(new_statuses_scope)