Bug 54779

git-svn-id: svn://svn.office.custis.ru/3rdparty/bugzilla.org/trunk@1379 6955db30-a419-402b-8a0d-67ecbb4d7f56
master
vfilippov 2011-09-26 13:17:47 +00:00
parent d88383c777
commit f5917a3906
1 changed files with 23 additions and 9 deletions

View File

@ -997,6 +997,29 @@ sub init
my $type = $H->{"emailtype$id"};
$type = "anyexact" if $type eq "exact";
if ($type eq "anyexact")
{
my @guessed = split /,/, $email;
foreach my $name (@guessed)
{
$name = trim($name);
if ($name && lc $name ne '%user%' && !login_to_id($name))
{
# Do a match on user login or name
my $u = Bugzilla::User::match($name, 1)->[0];
if ($u)
{
$name = $u->login;
}
else
{
ThrowUserError('invalid_username', { name => $name });
}
}
}
$email = join ',', @guessed;
}
my @clist;
foreach my $field ("assigned_to", "reporter", "cc", "qa_contact")
{
@ -1015,15 +1038,6 @@ sub init
# No field is selected. Nothing to see here.
next;
}
if ($type eq "anyexact")
{
foreach my $name (split /,/, $email)
{
$name = trim($name);
login_to_id($name, THROW_ERROR) if $name && lc $name ne '%user%';
}
}
}
$Bugzilla::Search::interval_from = undef;