Skip to content

Commit ee92b6b

Browse files
committed
Fixed done ratio calculation of the issue which has not estimated time
1 parent b660260 commit ee92b6b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

app/controllers/charts_burndown2_controller.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,8 @@ def get_data_for_burndown_chart
161161
total_logged_hours[index] += logged_hours_per_issue[0][index]
162162

163163
if issues_per_date[index] > 0
164-
total_done[index] *= issues_per_date[index] - estimated_count
165-
total_done[index] += (1 - (total_remaining_hours[index] / total_estimated_hours[index])) * issues_per_date[index]
166-
total_done[index] /= issues_per_date[index] / 100.0
164+
total_done[index] += (1 - (total_remaining_hours[index] / total_estimated_hours[index])) * 100 * estimated_count if total_estimated_hours[index] > 0
165+
total_done[index] /= issues_per_date[index]
167166
end
168167

169168
total_predicted_hours[index] = total_remaining_hours[index] + total_logged_hours[index]

0 commit comments

Comments
 (0)