@issues_by_version = {}
unless @selected_tracker_ids.empty?
@versions.each do |version|
- conditions = {:tracker_id => @selected_tracker_ids}
- if !@project.versions.include?(version)
- conditions.merge!(:project_id => project_ids)
- end
issues = version.fixed_issues.visible.find(:all,
:include => [:project, :status, :tracker, :priority],
- :conditions => conditions,
+ :conditions => {:tracker_id => @selected_tracker_ids, :project_id => project_ids},
:order => "#{Project.table_name}.lft, #{Tracker.table_name}.position, #{Issue.table_name}.id")
@issues_by_version[version] = issues
end