Commit f94be4f8 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

Fixed: SQL error on roadmap and changelog if there is no tracker to display.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@636 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 3eec5003
......@@ -24,7 +24,8 @@
<% issues = version.fixed_issues.find(:all,
:include => [:status, :tracker],
:conditions => ["#{IssueStatus.table_name}.is_closed=? AND #{Issue.table_name}.tracker_id in (#{@selected_tracker_ids.join(',')})", true],
:order => "#{Tracker.table_name}.position")
:order => "#{Tracker.table_name}.position") unless @selected_tracker_ids.empty?
issues ||= []
%>
<% if !issues.empty? %>
<ul>
......
......@@ -27,7 +27,8 @@
<% issues = version.fixed_issues.find(:all,
:include => [:status, :tracker],
:conditions => ["tracker_id in (#{@selected_tracker_ids.join(',')})"],
:order => "#{Tracker.table_name}.position")
:order => "#{Tracker.table_name}.position") unless @selected_tracker_ids.empty?
issues ||= []
total = issues.size
complete = issues.inject(0) {|c,i| i.status.is_closed? ? c + 1 : c }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment