Vote #80913
完了Done ratio of a parent issue may be shown as 99% even though all subtasks are completed
0%
説明
Due to a rounding error at source:tags/4.1.1/app/models/issue.rb#L1717, a parent task may show 99% done even when all subtasks are 100% done.
!{width: 846px; border: 1px solid grey;}.clipboard-202006101529-abpb8.png!
irb(main):001:0> 1610 / 16.1 => 99.99999999999999
Steps to reproduce:
- Set "% Done" setting (Administration > Settings > Issue tracking) to "Calculated from subtasks"
- Create a parent task.
- Create a subtask 1 with 10.0 estimated hours and 100% done ratio
- Create a subtask 2 with 6.1 estimated hours and 100% done ratio
- Now the done ratio of the parent task shows 99% instead of 100%
journals
--------------------------------------------------------------------------------
Attaching a patch that fixes the issue.
--------------------------------------------------------------------------------
Updated the patch not to use Float in the calculation process of a derived done ratio.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Setting the target version to 4.0.8.
--------------------------------------------------------------------------------
Committed the patch.
--------------------------------------------------------------------------------
There are also other issues in Done ration calculation #21449
--------------------------------------------------------------------------------
related_issues
relates,Closed,27848,The progress exceeding 99.5% is displayed as 100%