sub _bug_is_unassigned {
my ($self) = @_;
my $assignee = $self->assigned_to->login;
- return $assignee eq 'nobody@mozilla.org' || $assignee =~ /\.bugs$/;
+ return $assignee eq 'nobody@mozilla.org' || $assignee =~ /@(?!invalid).+\.bugs$/;
}
sub _bug_has_current_patch {
# and the assignee isn't a real person
return
unless $new_bug->assigned_to->login eq 'nobody@mozilla.org'
- || $new_bug->assigned_to->login =~ /\.bugs$/;
+ || $new_bug->assigned_to->login =~ /@(?!invalid).+\.bugs$/;
# and the user can set the status to NEW
return
# these are used in a few places
is_cced = bug.cc.contains(user.login);
unassigned = (bug.assigned_to.login == "nobody@mozilla.org")
- || (bug.assigned_to.login.search('\.bugs$'));
+ || (bug.assigned_to.login.search('@(?!invalid).+\.bugs$'));
# custom fields that have custom rendering, or should not be rendered
rendered_custom_fields = [
if ($value eq '') {
ThrowUserError('component_watch_missing_watch_user');
}
- if ($value !~ /\.bugs$/i) {
+ if ($value !~ /@(?!invalid).+\.bugs$/i) {
ThrowUserError('component_watch_invalid_watch_user');
}
return Bugzilla::User->check($value)->id;
<td>
<em>If you want to assign this [% terms.bug %] to yourself,
check the box below.</em><br>
- [% IF bug.assigned_to.login == "nobody@mozilla.org" || bug.assigned_to.login.search('.bugs$') %]
+ [% IF bug.assigned_to.login == "nobody@mozilla.org" || bug.assigned_to.login.search('@(?!invalid).+\.bugs$') %]
[% take_if_patch = 1 %]
[% END %]
<input type="checkbox" id="takebug" name="takebug" value="1" [% IF take_if_patch %] data-take-if-patch="1" [% END %]>