@@ -22,7 +22,7 | |||||
22 | <tr class="group open"> |
|
22 | <tr class="group open"> | |
23 | <td colspan="<%= query.inline_columns.size + 2 %>"> |
|
23 | <td colspan="<%= query.inline_columns.size + 2 %>"> | |
24 | <span class="expander" onclick="toggleRowGroup(this);"> </span> |
|
24 | <span class="expander" onclick="toggleRowGroup(this);"> </span> | |
25 | <%= group.blank? ? l(:label_none) : column_content(@query.group_by_column, issue) %> <span class="count"><%= @issue_count_by_group[group] %></span> |
|
25 | <%= (group.blank? && group != false) ? l(:label_none) : column_content(@query.group_by_column, issue) %> <span class="count"><%= @issue_count_by_group[group] %></span> | |
26 | <%= link_to_function("#{l(:button_collapse_all)}/#{l(:button_expand_all)}", |
|
26 | <%= link_to_function("#{l(:button_collapse_all)}/#{l(:button_expand_all)}", | |
27 | "toggleAllRowGroups(this)", :class => 'toggle-all') %> |
|
27 | "toggleAllRowGroups(this)", :class => 'toggle-all') %> | |
28 | </td> |
|
28 | </td> |
@@ -294,6 +294,22 class IssuesControllerTest < ActionController::TestCase | |||||
294 | end |
|
294 | end | |
295 | end |
|
295 | end | |
296 |
|
296 | |||
|
297 | def test_index_grouped_by_boolean_custom_field_should_distinguish_blank_and_false_values | |||
|
298 | cf = IssueCustomField.create!(:name => 'Bool', :is_for_all => true, :tracker_ids => [1,2,3], :field_format => 'bool') | |||
|
299 | CustomValue.create!(:custom_field => cf, :customized => Issue.find(1), :value => '1') | |||
|
300 | CustomValue.create!(:custom_field => cf, :customized => Issue.find(2), :value => '0') | |||
|
301 | CustomValue.create!(:custom_field => cf, :customized => Issue.find(3), :value => '') | |||
|
302 | ||||
|
303 | with_settings :default_language => 'en' do | |||
|
304 | get :index, :project_id => 1, :set_filter => 1, :group_by => "cf_#{cf.id}" | |||
|
305 | assert_response :success | |||
|
306 | end | |||
|
307 | ||||
|
308 | assert_select 'tr.group', :text => /Yes/ | |||
|
309 | assert_select 'tr.group', :text => /No/ | |||
|
310 | assert_select 'tr.group', :text => /none/ | |||
|
311 | end | |||
|
312 | ||||
297 | def test_index_with_query_grouped_by_tracker_in_normal_order |
|
313 | def test_index_with_query_grouped_by_tracker_in_normal_order | |
298 | 3.times {|i| Issue.generate!(:tracker_id => (i + 1))} |
|
314 | 3.times {|i| Issue.generate!(:tracker_id => (i + 1))} | |
299 |
|
315 |
General Comments 0
You need to be logged in to leave comments.
Login now