https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292016-08-23T02:41:42ZRedmineRedmine - Defect #23511: Progress of parent task should be calculated using total estimated hours of childrenhttps://www.redmine.org/issues/23511?journal_id=728732016-08-23T02:41:42ZJens Krämerjk@jkraemer.net
<ul><li><strong>File</strong> <a href="/attachments/16557">0001-test-case-for-grandchildren-s-done-percentages.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/16557/0001-test-case-for-grandchildren-s-done-percentages.patch">0001-test-case-for-grandchildren-s-done-percentages.patch</a> added</li><li><strong>File</strong> <a href="/attachments/16559">0002-fix-attempt-for-23511.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/16559/0002-fix-attempt-for-23511.patch">0002-fix-attempt-for-23511.patch</a> added</li></ul><p>This is a valid problem.</p>
<p>Given</p>
<pre>
Settings.issue_done_ratio == 'issue_field'
Settings.parent_issue_done_ratio == 'derived'
</pre>
<p>and issues like this:</p>
<ul>
<li>parent issue
<ul>
<li>child 1 (2h estd, 0% done)</li>
<li>child 2
<ul>
<li>child a (2h estd, 50% done)</li>
<li>child b (2h estd, 50% done)</li>
</ul></li>
</ul></li>
</ul>
<p>so in total 2h of 6h are done, which means the parent should have a done ratio of 33%. Redmine 3.2 and current master show 25% instead (average of 50% from child 2 and 0% from child 1).</p>
<p>It looks like this new issue has been introduced with my fix for <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Automatic done ratio calculation in issue tree is wrong in some cases (Closed)" href="https://www.redmine.org/issues/20995">#20995</a> which changed the calculation from leaves to children in the first place to solve another problem.</p>
<p>I don't have an idea how to solve this without breaking anything else right now. For now I'll attach a failing test case illustrating the problem and a second patch containing the fix attempt from this issue's description, which solves the problem at hand but breaks some other test cases.</p> Redmine - Defect #23511: Progress of parent task should be calculated using total estimated hours of childrenhttps://www.redmine.org/issues/23511?journal_id=728872016-08-23T13:20:26ZToshi MARUYAMA
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/72887/diff?detail_id=56663">diff</a>)</li></ul> Redmine - Defect #23511: Progress of parent task should be calculated using total estimated hours of childrenhttps://www.redmine.org/issues/23511?journal_id=728882016-08-23T13:24:17ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/20995">Defect #20995</a>: Automatic done ratio calculation in issue tree is wrong in some cases</i> added</li></ul> Redmine - Defect #23511: Progress of parent task should be calculated using total estimated hours of childrenhttps://www.redmine.org/issues/23511?journal_id=728902016-08-23T13:24:37ZToshi MARUYAMA
<ul><li><strong>Target version</strong> set to <i>3.4.0</i></li></ul> Redmine - Defect #23511: Progress of parent task should be calculated using total estimated hours of childrenhttps://www.redmine.org/issues/23511?journal_id=731832016-09-01T17:05:17ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Subject</strong> changed from <i>Problem of calculating the percentage of completion of a Issue </i> to <i>Progress of parent task should be calculated using total estimated hours of children</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li><li><strong>Assignee</strong> set to <i>Jean-Philippe Lang</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p>Fixed in <a class="changeset" title="Fixed that progress of parent should be calculated with total estimated hours of children (#23511)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/15802">r15802</a> by calculating the progress of parent task using the total estimated hours of children as proposed by Zouheir Najai. I've included the test provided by Jens.<br />Thanks to both of you.</p> Redmine - Defect #23511: Progress of parent task should be calculated using total estimated hours of childrenhttps://www.redmine.org/issues/23511?journal_id=746042016-11-21T13:02:34ZToshi MARUYAMA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/24213">Defect #24213</a>: % Done is not correct for parent to parents when calculated from subtasks</i> added</li></ul> Redmine - Defect #23511: Progress of parent task should be calculated using total estimated hours of childrenhttps://www.redmine.org/issues/23511?journal_id=747042016-11-25T14:41:29ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-1 priority-4 priority-default" href="/issues/24457">Defect #24457</a>: Progress of version should be calculated the same way as parent tasks</i> added</li></ul> Redmine - Defect #23511: Progress of parent task should be calculated using total estimated hours of childrenhttps://www.redmine.org/issues/23511?journal_id=798892017-07-09T03:24:37ZGo MAEDA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/23151">Defect #23151</a>: done_ratio calculation with multi-level sub tasks and estimated hours</i> added</li></ul>