mirror of
https://github.com/redmine/redmine.git
synced 2025-11-15 09:46:02 +01:00
Show Last Comment in Issue list (#1474).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@16367 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -1302,10 +1302,10 @@ class QueryTest < ActiveSupport::TestCase
|
||||
|
||||
def test_inline_and_block_columns
|
||||
q = IssueQuery.new
|
||||
q.column_names = ['subject', 'description', 'tracker']
|
||||
q.column_names = ['subject', 'description', 'tracker', 'last_notes']
|
||||
|
||||
assert_equal [:id, :subject, :tracker], q.inline_columns.map(&:name)
|
||||
assert_equal [:description], q.block_columns.map(&:name)
|
||||
assert_equal [:description, :last_notes], q.block_columns.map(&:name)
|
||||
end
|
||||
|
||||
def test_custom_field_columns_should_be_inline
|
||||
@@ -1335,6 +1335,13 @@ class QueryTest < ActiveSupport::TestCase
|
||||
end
|
||||
end
|
||||
|
||||
def test_query_should_preload_last_notes
|
||||
q = IssueQuery.new(:name => '_', :column_names => [:subject, :last_notes])
|
||||
assert q.has_column?(:last_notes)
|
||||
issues = q.issues
|
||||
assert_not_nil issues.first.instance_variable_get("@last_notes")
|
||||
end
|
||||
|
||||
def test_groupable_columns_should_include_custom_fields
|
||||
q = IssueQuery.new
|
||||
column = q.groupable_columns.detect {|c| c.name == :cf_1}
|
||||
|
||||
Reference in New Issue
Block a user