anteo / redmine_custom_workflows

Allows to create custom workflows for Redmine
http://www.redmine.org/plugins/custom-workflows
GNU General Public License v2.0
178 stars 72 forks source link

parent_done_ratio float round(2) #334

Closed ashrafalzyoud closed 5 months ago

ashrafalzyoud commented 5 months ago

Hi thx for your lovely plugin If I can asking u?!

1_ I'm changing the type of column doneratio to float 2 setting the done ratio calculation from issue Field 3_ setting to calculate done ratio from subtask

4_ I using formula @issue.done_ratio = @ issue.custom.field.value(1).to_f.round(2)

5_ every things in child issue okay with float numbers done ratio

6_ the problem in parent task The done ratio appear 61% I need look to 60.69%

  Example 
  child1 (:done_ratio => 10.12)
  child2 (:done_ratio => 20.23)
  child3(:done_ratio => 90.45)
  (10.12 + 20.33 + 90.44) / 3 = 12
   parent.issue.done_ratio=60.69

If u can help where in core redmine code how calculate parent done ratio to be round(2)

Or by using your plugin?!