Commit db2e681e authored by Frédéric Buclin's avatar Frédéric Buclin Committed by Max Kanat-Alexander

Bug 534057: Auto-completion no longer works in email_in.pl

Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
parent 2502c9ff
......@@ -790,9 +790,9 @@ sub extract_flags_from_cgi {
my ($class, $bug, $attachment, $vars, $skip) = @_;
my $cgi = Bugzilla->cgi;
my $match_status = Bugzilla::User::match_field($cgi, {
my $match_status = Bugzilla::User::match_field({
'^requestee(_type)?-(\d+)$' => { 'type' => 'multi' },
}, $skip);
}, undef, $skip);
$vars->{'match_field'} = 'requestee';
if ($match_status == USER_MATCH_FAILED) {
......
......@@ -118,7 +118,7 @@ if ($action eq 'add') {
if ($action eq 'new') {
check_token_data($token, 'add_component');
# Do the user matching
Bugzilla::User::match_field ($cgi, {
Bugzilla::User::match_field ({
'initialowner' => { 'type' => 'single' },
'initialqacontact' => { 'type' => 'single' },
'initialcc' => { 'type' => 'multi' },
......@@ -219,7 +219,7 @@ if ($action eq 'edit') {
if ($action eq 'update') {
check_token_data($token, 'edit_component');
# Do the user matching
Bugzilla::User::match_field ($cgi, {
Bugzilla::User::match_field ({
'initialowner' => { 'type' => 'single' },
'initialqacontact' => { 'type' => 'single' },
'initialcc' => { 'type' => 'multi' },
......
......@@ -193,7 +193,7 @@ if ($cgi->param('update')) {
}
}
if (scalar %{$arglist}) {
&Bugzilla::User::match_field($cgi, $arglist);
Bugzilla::User::match_field($arglist);
}
for my $sid (@scheduleids) {
......
......@@ -152,6 +152,17 @@ sub post_bug {
$fields->{$field} = undef if !exists $fields->{$field};
}
my ($retval, $non_conclusive_fields) =
Bugzilla::User::match_field({
'assigned_to' => { 'type' => 'single' },
'qa_contact' => { 'type' => 'single' },
'cc' => { 'type' => 'multi' }
}, $fields, MATCH_SKIP_CONFIRM);
if ($retval != USER_MATCH_SUCCESS) {
ThrowUserError('user_match_too_many', {fields => $non_conclusive_fields});
}
my $bug = Bugzilla::Bug->create($fields);
debug_print("Created bug " . $bug->id);
return ($bug, $bug->comments->[0]);
......
......@@ -85,7 +85,7 @@ if ($token) {
}
# do a match on the fields if applicable
Bugzilla::User::match_field ($cgi, {
Bugzilla::User::match_field ({
'cc' => { 'type' => 'multi' },
'assigned_to' => { 'type' => 'single' },
'qa_contact' => { 'type' => 'single' },
......
......@@ -142,7 +142,7 @@ if (defined $cgi->param('dontchange')) {
}
# do a match on the fields if applicable
Bugzilla::User::match_field($cgi, {
Bugzilla::User::match_field({
'qa_contact' => { 'type' => 'single' },
'newcc' => { 'type' => 'multi' },
'masscc' => { 'type' => 'multi' },
......
......@@ -63,7 +63,7 @@ unless (defined $cgi->param('requestee')
$fields->{'requestee'}->{'type'} = 'single';
}
Bugzilla::User::match_field($cgi, $fields);
Bugzilla::User::match_field($fields);
if ($action eq 'queue') {
queue();
......
......@@ -1628,6 +1628,12 @@
<tt>[% name FILTER html %]</tt> does not exist or you are not allowed
to see that user.
[% ELSIF error == "user_match_too_many" %]
[% title = "No Conclusive Match" %]
[% terms.Bugzilla %] cannot make a conclusive match for one or more
of the names and/or email addresses you entered for
the [% fields.join(', ') FILTER html %] field(s).
[% ELSIF error == "user_not_insider" %]
[% title = "User Not In Insidergroup" %]
Sorry, but you are not allowed to (un)mark comments or attachments
......
......@@ -247,7 +247,7 @@ sub SaveEmail {
my $cgi = Bugzilla->cgi;
my $user = Bugzilla->user;
Bugzilla::User::match_field($cgi, { 'new_watchedusers' => {'type' => 'multi'} });
Bugzilla::User::match_field({ 'new_watchedusers' => {'type' => 'multi'} });
###########################################################################
# Role-based preferences
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment