alexmonteiro / Redmine-Monitoring-Controlling

Redmine Plugin that works with Highcharts to show tasks on project throught Charts.
Other
131 stars 79 forks source link

Time monitoring is broken when parent issues are present #56

Closed drf closed 12 years ago

drf commented 12 years ago

The graphs monitoring time display wrong values when parent issues are in the equation. Example:

My project has a roadmap view which amounts up to 105 hours. Between the issues, there are two "container" issues which amount respectively to 33 and 36 hours. The time management graph shows a total of estimated hours which is 174 hours, exactly 33+36+105 hours.

The spent time view is broken as well, but I couldn't find a clear pattern there unfortunately. In this case, the roadmap view tells me (again, righteously) the total spent time is 109.16 hours. The graph, instead, tells me 63.04 hours have been spent. For the records, the amount of time spent in the two "container" issues amounts to 45.52 and 37.40. Here I couldn't find an evidence on where the math is wrong.

Interestingly, the "by version" graph behaves in a very different way. Here, the two versions are calculated correctly for a total amount of estimated time of 105 hours. Instead, the calculation of spent time is even more weird. In this case, it says 9.33 hours have been spent on the first version and 0 on the second, whereas they should be 71.76 and 37.40.

I tried having a look myself and the query in the controller should indeed exclude issues without a parent from the calculation, but probably something goes wrong somewhere. If I have some time later I'll try debugging the error again. Redmine 1.4.1-debian here.

drf commented 12 years ago

Pull request #57 was created with a fix

drf commented 12 years ago

Closing this issue as #57 fixes all of the above.