@@ -40,7 +40,7 module QueriesHelper | |||
|
40 | 40 | else |
|
41 | 41 | case column.name |
|
42 | 42 | when :subject |
|
43 |
h((@project.nil? |
|
|
43 | h((!@project.nil? && @project != issue.project) ? "#{issue.project.name} - " : '') + | |
|
44 | 44 | link_to(h(value), :controller => 'issues', :action => 'show', :id => issue) |
|
45 | 45 | when :done_ratio |
|
46 | 46 | progress_bar(value, :width => '80px') |
@@ -92,6 +92,7 class Query < ActiveRecord::Base | |||
|
92 | 92 | cattr_reader :operators_by_filter_type |
|
93 | 93 | |
|
94 | 94 | @@available_columns = [ |
|
95 | QueryColumn.new(:project, :sortable => "#{Project.table_name}.name"), | |
|
95 | 96 | QueryColumn.new(:tracker, :sortable => "#{Tracker.table_name}.position"), |
|
96 | 97 | QueryColumn.new(:status, :sortable => "#{IssueStatus.table_name}.position"), |
|
97 | 98 | QueryColumn.new(:priority, :sortable => "#{Enumeration.table_name}.position", :default_order => 'desc'), |
@@ -236,7 +237,10 class Query < ActiveRecord::Base | |||
|
236 | 237 | |
|
237 | 238 | def columns |
|
238 | 239 | if has_default_columns? |
|
239 | available_columns.select {|c| Setting.issue_list_default_columns.include?(c.name.to_s) } | |
|
240 | available_columns.select do |c| | |
|
241 | # Adds the project column by default for cross-project lists | |
|
242 | Setting.issue_list_default_columns.include?(c.name.to_s) || (c.name == :project && project.nil?) | |
|
243 | end | |
|
240 | 244 | else |
|
241 | 245 | # preserve the column_names order |
|
242 | 246 | column_names.collect {|name| available_columns.find {|col| col.name == name}}.compact |
@@ -58,6 +58,8 class IssuesControllerTest < Test::Unit::TestCase | |||
|
58 | 58 | end |
|
59 | 59 | |
|
60 | 60 | def test_index |
|
61 | Setting.default_language = 'en' | |
|
62 | ||
|
61 | 63 | get :index |
|
62 | 64 | assert_response :success |
|
63 | 65 | assert_template 'index.rhtml' |
@@ -68,6 +70,8 class IssuesControllerTest < Test::Unit::TestCase | |||
|
68 | 70 | # private projects hidden |
|
69 | 71 | assert_no_tag :tag => 'a', :content => /Issue of a private subproject/ |
|
70 | 72 | assert_no_tag :tag => 'a', :content => /Issue on project 2/ |
|
73 | # project column | |
|
74 | assert_tag :tag => 'th', :content => /Project/ | |
|
71 | 75 | end |
|
72 | 76 | |
|
73 | 77 | def test_index_should_not_list_issues_when_module_disabled |
General Comments 0
You need to be logged in to leave comments.
Login now