Skip to content
Browse files

Fixed calculation of done percentage.

  • Loading branch information...
1 parent ab83469 commit 81964172ba98723ebb2a6c6cef11cc17250ffa3e @clueware committed Apr 17, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/tracker_wrapper.rb
View
4 lib/tracker_wrapper.rb
@@ -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
@@ -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

0 comments on commit 8196417

Please sign in to comment.
Something went wrong with that request. Please try again.