Project

General

Profile

Actions

Defect #33576

closed

Done ratio of a parent issue may be shown as 99% even though all subtasks are completed

Defect #33576: Done ratio of a parent issue may be shown as 99% even though all subtasks are completed

Added by Go MAEDA over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Issues
Target version:
Resolution:
Fixed
Affected version:

Description

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.

irb(main):001:0> 1610 / 16.1
=> 99.99999999999999

Steps to reproduce:

1. Set "% Done" setting (Administration > Settings > Issue tracking) to "Calculated from subtasks"
2. Create a parent task.
3. Create a subtask 1 with 10.0 estimated hours and 100% done ratio
4. Create a subtask 2 with 6.1 estimated hours and 100% done ratio
5. Now the done ratio of the parent task shows 99% instead of 100%


Files

clipboard-202006101529-abpb8.png (53.4 KB) clipboard-202006101529-abpb8.png Go MAEDA, 2020-06-10 08:47
fix-33576.patch (1.4 KB) fix-33576.patch Go MAEDA, 2020-06-10 10:18
fix-33576-v2.patch (1.94 KB) fix-33576-v2.patch Go MAEDA, 2020-06-10 11:33

Related issues 2 (0 open — 2 closed)

Related to Redmine - Defect #27848: The progress exceeding 99.5% is displayed as 100%ClosedJean-Philippe LangActions
Related to Redmine - Defect #37151: The done ratio of a parent issue may not be 100% even if all subtasks have a done ratio of 100%ClosedGo MAEDAActions

Updated by Go MAEDA over 6 years ago Actions #1

  • Related to Defect #27848: The progress exceeding 99.5% is displayed as 100% added

Updated by Go MAEDA over 6 years ago Actions #2

Attaching a patch that fixes the issue.

Updated by Go MAEDA over 6 years ago Actions #3

Updated the patch not to use Float in the calculation process of a derived done ratio.

Updated by Anonymous over 6 years ago Actions #4

  • File 4.jpg added

Updated by Go MAEDA over 6 years ago Actions #5

  • File deleted (4.jpg)

Updated by Go MAEDA over 6 years ago Actions #6

  • Target version changed from Candidate for next minor release to 4.0.8

Setting the target version to 4.0.8.

Updated by Go MAEDA over 6 years ago Actions #7

  • Subject changed from Parent task may show 99% done even when all subtasks are 100% done to Done ratio of a parent issue may be shown as 99% even though all subtasks are completed
  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch.

Updated by Sebastian Paluch over 6 years ago Actions #8

There are also other issues in Done ration calculation #21449

Updated by Go MAEDA over 4 years ago Actions #9

  • Related to Defect #37151: The done ratio of a parent issue may not be 100% even if all subtasks have a done ratio of 100% added
Actions

Also available in: PDF Atom