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
pull/351/head
Jean-Philippe Lang 17 years ago
parent 3eec500320
commit f94be4f8ab
  1. 3
      app/views/projects/changelog.rhtml
  2. 3
      app/views/projects/roadmap.rhtml

@ -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 }

Loading…
Cancel
Save