1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-02-11 13:15:20 +00:00

Fixes for Performance/BigDecimalWithNumericArgument introduced in RuboCop Performance 1.13.0 (#35142).

git-svn-id: http://svn.redmine.org/redmine/trunk@21326 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2021-12-25 08:59:22 +00:00
parent 85873c103a
commit 91c00f51ec

View File

@ -1840,7 +1840,7 @@ class Issue < ActiveRecord::Base
child_with_total_estimated_hours.sum(&:total_estimated_hours).to_d / child_with_total_estimated_hours.sum(&:total_estimated_hours).to_d /
child_with_total_estimated_hours.count child_with_total_estimated_hours.count
else else
average = 1.0.to_d average = BigDecimal('1.0')
end end
done = children.sum do |c| done = children.sum do |c|
estimated = (c.total_estimated_hours || 0.0).to_d estimated = (c.total_estimated_hours || 0.0).to_d