From 7e72019f561b3de00a8cfb41d9bdd58390e0766e Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Sun, 22 Feb 2026 03:17:27 +0000 Subject: [PATCH] Merge r24444 from trunk to 6.1-stable (#31972). git-svn-id: https://svn.redmine.org/redmine/branches/6.1-stable@24447 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/issues_controller_test.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index e120697ae..166505be9 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -2007,6 +2007,26 @@ class IssuesControllerTest < Redmine::ControllerTest end end + def test_index_with_group_by_and_nil_group_count_should_not_render_empty_badge + Issue.generate!(:created_on => '2019-08-29 10:00:00') + + IssueQuery.any_instance.stubs(:result_count_by_group).returns(nil) + + get( + :index, + :params => { + :set_filter => 1, + :group_by => 'created_on' + } + ) + assert_response :success + + assert_select 'tr.group' do + assert_select 'span.name' + assert_select 'span.badge-count.count', 0 + end + end + def test_index_with_int_custom_field_total field = IssueCustomField.generate!(:field_format => 'int', :is_for_all => true) CustomValue.create!(:customized => Issue.find(1), :custom_field => field, :value => '9800')