Feature #32436 » timelog-issue-groupable.diff
| app/models/time_entry_query.rb | ||
|---|---|---|
| 30 | 30 |
QueryColumn.new(:author, :sortable => lambda {User.fields_for_order_statement}),
|
| 31 | 31 |
QueryColumn.new(:user, :sortable => lambda {User.fields_for_order_statement}, :groupable => true),
|
| 32 | 32 |
QueryColumn.new(:activity, :sortable => "#{TimeEntryActivity.table_name}.position", :groupable => true),
|
| 33 |
QueryColumn.new(:issue, :sortable => "#{Issue.table_name}.id"),
|
|
| 33 |
QueryColumn.new(:issue, :sortable => "#{Issue.table_name}.id", :groupable => true),
|
|
| 34 | 34 |
QueryAssociationColumn.new(:issue, :tracker, :caption => :field_tracker, :sortable => "#{Tracker.table_name}.position"),
|
| 35 | 35 |
QueryAssociationColumn.new(:issue, :status, :caption => :field_status, :sortable => "#{IssueStatus.table_name}.position"),
|
| 36 | 36 |
QueryAssociationColumn.new(:issue, :category, :caption => :field_category, :sortable => "#{IssueCategory.table_name}.name"),
|
| test/functional/timelog_controller_test.rb | ||
|---|---|---|
| 1385 | 1385 |
assert_select '+ span.count', :text => '2' |
| 1386 | 1386 |
end |
| 1387 | 1387 |
end |
| 1388 | ||
| 1389 |
def test_index_grouped_by_issue |
|
| 1390 |
get :index, :params => {
|
|
| 1391 |
:set_filter => 1, |
|
| 1392 |
:group_by => 'issue' |
|
| 1393 |
} |
|
| 1394 |
assert_response :success |
|
| 1395 | ||
| 1396 |
assert_select 'tr.group span.name' do |elements| |
|
| 1397 |
target_element = elements[1] |
|
| 1398 |
assert_equal "Bug #1: Cannot print recipes", target_element.text |
|
| 1399 |
assert_select target_element, '+ span.count', :text => '2' |
|
| 1400 |
end |
|
| 1401 |
end |
|
| 1388 | 1402 |
end |