Skip to content

Commit

Permalink
Fixed calculation of done percentage.
Browse files Browse the repository at this point in the history
  • Loading branch information
clueware committed Apr 17, 2012
1 parent ab83469 commit 8196417
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/tracker_wrapper.rb
Expand Up @@ -56,7 +56,7 @@ def addIssue(issue)

# global stats
@closed_nb += 1 if issue.closed?
if issue.done_ratio > 0 && !issue.closed?
if issue.done_ratio > 0 && !issue.closed? && issue.leaf?
@sum_done_pct += issue.done_ratio
@done_nb += 1
end
Expand All @@ -72,7 +72,7 @@ def addIssue(issue)
end

if @done_nb>0
@done_pct = (@closed_pct.to_f+@sum_done_pct.to_f)/@done_nb.to_f
@done_pct = @sum_done_pct.to_f/@done_nb.to_f
else
@done_pct = 0
end
Expand Down

0 comments on commit 8196417

Please sign in to comment.