diff --git a/app/helpers/versions_helper.rb b/app/helpers/versions_helper.rb index fe1fb8815..9d088a9d9 100644 --- a/app/helpers/versions_helper.rb +++ b/app/helpers/versions_helper.rb @@ -57,9 +57,9 @@ module VersionsHelper h = Hash.new {|k,v| k[v] = [0, 0]} begin # Total issue count - version.fixed_issues.group(criteria).count.each {|c,s| h[c][0] = s} + version.fixed_issues.visible.group(criteria).count.each {|c,s| h[c][0] = s} # Open issues count - version.fixed_issues.open.group(criteria).count.each {|c,s| h[c][1] = s} + version.fixed_issues.visible.open.group(criteria).count.each {|c,s| h[c][1] = s} rescue ActiveRecord::RecordNotFound # When grouping by an association, Rails throws this exception if there's no result (bug) end diff --git a/app/views/versions/_overview.html.erb b/app/views/versions/_overview.html.erb index 2effb3180..ec7a18a6f 100644 --- a/app/views/versions/_overview.html.erb +++ b/app/views/versions/_overview.html.erb @@ -14,22 +14,22 @@ <% end %> -<% if version.issues_count > 0 %> - <%= progress_bar([version.closed_percent, version.completed_percent], +<% if version.fixed_issues.visible.count > 0 %> + <%= progress_bar([version.fixed_issues.visible.closed_percent, version.fixed_issues.visible.completed_percent], :titles => - ["%s: %0.0f%%" % [l(:label_closed_issues_plural), version.closed_percent], - "%s: %0.0f%%" % [l(:field_done_ratio), version.completed_percent]], - :legend => ('%0.0f%%' % version.completed_percent)) %> + ["%s: %0.0f%%" % [l(:label_closed_issues_plural), version.fixed_issues.visible.closed_percent], + "%s: %0.0f%%" % [l(:field_done_ratio), version.fixed_issues.visible.completed_percent]], + :legend => ('%0.0f%%' % version.fixed_issues.visible.completed_percent)) %>
- <%= link_to(l(:label_x_issues, :count => version.issues_count), + <%= link_to(l(:label_x_issues, :count => version.fixed_issues.visible.count), version_filtered_issues_path(version, :status_id => '*')) %> - (<%= link_to_if(version.closed_issues_count > 0, - l(:label_x_closed_issues_abbr, :count => version.closed_issues_count), + (<%= link_to_if(version.fixed_issues.visible.closed_count > 0, + l(:label_x_closed_issues_abbr, :count => version.fixed_issues.visible.closed_count), version_filtered_issues_path(version, :status_id => 'c')) %> — - <%= link_to_if(version.open_issues_count > 0, - l(:label_x_open_issues_abbr, :count => version.open_issues_count), + <%= link_to_if(version.fixed_issues.visible.open_count > 0, + l(:label_x_open_issues_abbr, :count => version.fixed_issues.visible.open_count), version_filtered_issues_path(version, :status_id => 'o')) %>)
<% else %> diff --git a/app/views/versions/show.html.erb b/app/views/versions/show.html.erb index fc22a9ffb..83953cce0 100644 --- a/app/views/versions/show.html.erb +++ b/app/views/versions/show.html.erb @@ -12,12 +12,12 @@ <%= render(:partial => "wiki/content", :locals => {:content => @version.wiki_page.content}) if @version.wiki_page %>