From 7307c8c748e3245d65a25c016e7d92c6c7ae2aa4 Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Tue, 5 Oct 2010 01:39:01 -0700 Subject: Bug 26074 - Ability to limit search by number of Comments r=mkanat, a=mkanat (module owner) --- xt/lib/Bugzilla/Test/Search.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'xt/lib/Bugzilla/Test/Search.pm') diff --git a/xt/lib/Bugzilla/Test/Search.pm b/xt/lib/Bugzilla/Test/Search.pm index 02ff48a80..73bb86dfd 100644 --- a/xt/lib/Bugzilla/Test/Search.pm +++ b/xt/lib/Bugzilla/Test/Search.pm @@ -667,6 +667,13 @@ sub _create_one_bug { undef, $bug->id); } + # Bug 1 gets three comments, so that longdescs.count matches it + # uniquely. The third comment is added in the middle, so that the + # last comment contains all of the important data, like work_time. + if ($number == 1) { + $bug->add_comment("1-comment-" . random(100)); + } + my %update_params = %{ $self->_bug_update_values->{$number} }; my %reverse_map = reverse %{ Bugzilla::Bug->FIELD_MAP }; foreach my $db_name (keys %reverse_map) { @@ -712,7 +719,7 @@ sub _create_one_bug { $update_params{reporter_accessible} = $number == 1 ? 1 : 0; $update_params{cclist_accessible} = $number == 1 ? 1 : 0; $update_params{alias} = $update_alias; - + $bug->set_all(\%update_params); my $flags = $self->bug_create_value($number, 'set_flags')->{b}; $bug->set_flags([], $flags); -- cgit v1.2.3-24-g4f1b