Project

General

Profile

Actions

Defect #5006

closed

Roadmap display can raise an exception if no trackers are selected

Added by Jan from Planio www.plan.io over 14 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
High
Category:
Roadmap
Target version:
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

projects_controller.patch (605 Bytes) projects_controller.patch Jan from Planio www.plan.io, 2010-03-08 12:28
Actions #1

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

Also available in: Atom PDF