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