summaryrefslogtreecommitdiffstats
path: root/email_in.pl
diff options
context:
space:
mode:
Diffstat (limited to 'email_in.pl')
-rwxr-xr-xemail_in.pl11
1 files changed, 11 insertions, 0 deletions
diff --git a/email_in.pl b/email_in.pl
index 044c13040..c7b11d8a7 100755
--- a/email_in.pl
+++ b/email_in.pl
@@ -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]);