Patch #19455 ยป versions_helper.rb.patch
app/helpers/versions_helper.rb (working copy) | ||
---|---|---|
57 | 57 |
h = Hash.new {|k,v| k[v] = [0, 0]} |
58 | 58 |
begin |
59 | 59 |
# Total issue count |
60 |
Issue.where(:fixed_version_id => version.id).group(criteria).count.each {|c,s| h[c][0] = s}
|
|
60 |
version.fixed_issues.group(criteria).count.each {|c,s| h[c][0] = s}
|
|
61 | 61 |
# Open issues count |
62 |
Issue.open.where(:fixed_version_id => version.id).group(criteria).count.each {|c,s| h[c][1] = s}
|
|
62 |
version.fixed_issues.open.group(criteria).count.each {|c,s| h[c][1] = s}
|
|
63 | 63 |
rescue ActiveRecord::RecordNotFound |
64 | 64 |
# When grouping by an association, Rails throws this exception if there's no result (bug) |
65 | 65 |
end |