Actions
Defect #5006
closedRoadmap display can raise an exception if no trackers are selected
Start date:
2010-03-08
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
In projects_controller.rb
, line 297:
@issues_by_version = {}
unless @selected_tracker_ids.empty?
@versions.each do |version|
issues = version.fixed_issues.visible.find(:all,
:include => [:project, :status, :tracker, :priority],
: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
end
@versions.reject! {|version| !project_ids.include?(version.project_id) && @issues_by_version[version].empty?}
if @selected_tracker_ids.empty?
is true
, @issues_by_version
will always be {}
and @issues_by_version[version].empty?
yields a NoMethodError
.
Instead of empty?
, blank?
should be used. Patch is attached.
Files
Updated by Jean-Philippe Lang over 14 years ago
- Status changed from New to Closed
- Target version set to 0.9.4
- Resolution set to Fixed
Fixed in r3555. Thanks.
Actions