summaryrefslogtreecommitdiffstats
path: root/xt/lib/Bugzilla/Test/Search.pm
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-10-05 10:39:01 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-10-05 10:39:01 +0200
commit7307c8c748e3245d65a25c016e7d92c6c7ae2aa4 (patch)
tree97fa8ea6b7482fad71cecc5195c2a81e6cc866c8 /xt/lib/Bugzilla/Test/Search.pm
parentdaa533e7c6d1c6ff2e8600c5178ac75bf7a2538c (diff)
downloadbugzilla-7307c8c748e3245d65a25c016e7d92c6c7ae2aa4.tar.gz
bugzilla-7307c8c748e3245d65a25c016e7d92c6c7ae2aa4.tar.xz
Bug 26074 - Ability to limit search by number of Comments
r=mkanat, a=mkanat (module owner)
Diffstat (limited to 'xt/lib/Bugzilla/Test/Search.pm')
-rw-r--r--xt/lib/Bugzilla/Test/Search.pm9
1 files changed, 8 insertions, 1 deletions
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);