my $update_alias = $self->bug_update_value($number, 'alias');
# Otherwise, make bug 6 a clone of bug 1.
+ my $real_number = $number;
$number = 1 if $number == 6;
my $reporter = $self->bug_create_value($number, 'reporter');
$update_params{groups} = { add => $update_params{groups},
remove => $bug->groups_in };
my @cc_remove = map { $_->login } @{ $bug->cc_users };
- my $cc_add = $update_params{cc};
- $cc_add = [$cc_add] if !ref $cc_add;
- $update_params{cc} = { add => $cc_add, remove => \@cc_remove };
+ my $cc_new = $update_params{cc};
+ my @cc_add = ref($cc_new) ? @$cc_new : ($cc_new);
+ # We make the admin an explicit CC on bug 1 (but not on bug 6), so
+ # that we can test the %user% pronoun properly.
+ if ($real_number == 1) {
+ push(@cc_add, $self->admin->login);
+ }
+ $update_params{cc} = { add => \@cc_add, remove => \@cc_remove };
my $see_also_remove = $bug->see_also;
my $see_also_add = [$update_params{see_also}];
$update_params{see_also} = { add => $see_also_add,
# while the other fails. In this case, we have a special override for
# "operator-value", which uniquely identifies tests.
use constant KNOWN_BROKEN => {
+ "equals-%group.<1-bug_group>%" => {
+ commenter => { contains => [1,2,3,4,5] },
+ },
notequals => { NEGATIVE_BROKEN },
notsubstring => { NEGATIVE_BROKEN },
notregexp => { NEGATIVE_BROKEN },
{ field => 'resolution', operator => 'anyexact', value => '---',
contains => [5] },
+ # email* query parameters.
{ field => 'assigned_to', operator => 'anyexact',
value => '<1>, <2-reporter>', contains => [1,2],
extra_params => { emailreporter1 => 1 } },
extra_params => {
email2 => generate_random_password(100), emaillongdesc2 => 1,
},
- }
+ },
+
+ # standard pronouns
+ { field => 'assigned_to', operator => 'equals', value => '%assignee%',
+ contains => [1,2,3,4,5] },
+ { field => 'reporter', operator => 'equals', value => '%reporter%',
+ contains => [1,2,3,4,5] },
+ { field => 'qa_contact', operator => 'equals', value => '%qacontact%',
+ contains => [1,2,3,4,5] },
+ { field => 'cc', operator => 'equals', value => '%user%',
+ contains => [1] },
+ # group pronouns
+ { field => 'reporter', operator => 'equals',
+ value => '%group.<1-bug_group>%', contains => [1,2,3,4,5] },
+ { field => 'assigned_to', operator => 'equals',
+ value => '%group.<1-bug_group>%', contains => [1,2,3,4,5] },
+ { field => 'qa_contact', operator => 'equals',
+ value => '%group.<1-bug_group>%', contains => [1,2,3,4] },
+ { field => 'cc', operator => 'equals',
+ value => '%group.<1-bug_group>%', contains => [1,2,3,4] },
+ { field => 'commenter', operator => 'equals',
+ value => '%group.<1-bug_group>%', contains => [1,2,3,4,5] },
);
1;