From b69e2bc7852bdfd9cedebc88fca10ff151d7acdd Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" Date: Wed, 23 Jan 2008 21:49:31 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20391669:=20Modifying=20a=20bug=20via=20ema?= =?UTF-8?q?il=5Fin.pl=20fails=20because=20there=20are=20many=20fields=20th?= =?UTF-8?q?at=20process=5Fbug.cgi=20requires=20but=20aren't=20provided=20t?= =?UTF-8?q?o=20it=20-=20Patch=20by=20Fr=C3=83=C2=A9d=C3=83=C2=A9ric=20Bucl?= =?UTF-8?q?in=20=20r=3Dmkanat=20a=3DLpSolit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://10.0.0.236/trunk@243854 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/email_in.pl | 17 ++++++----------- mozilla/webtools/bugzilla/process_bug.cgi | 6 ++++-- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/mozilla/webtools/bugzilla/email_in.pl b/mozilla/webtools/bugzilla/email_in.pl index 13e81e77eb1..02d00a3e215 100755 --- a/mozilla/webtools/bugzilla/email_in.pl +++ b/mozilla/webtools/bugzilla/email_in.pl @@ -213,22 +213,17 @@ sub process_bug { ValidateBugID($bug_id); my $bug = new Bugzilla::Bug($bug_id); - if ($fields{'assigned_to'}) { - $fields{'knob'} = 'reassign'; + if ($fields{'bug_status'}) { + $fields{'knob'} = $fields{'bug_status'}; } - if (my $status = $fields{'bug_status'}) { - $fields{'knob'} = 'confirm' if $status =~ /NEW/i; - $fields{'knob'} = 'accept' if $status =~ /ASSIGNED/i; - $fields{'knob'} = 'clearresolution' if $status =~ /REOPENED/i; - $fields{'knob'} = 'verify' if $status =~ /VERIFIED/i; - $fields{'knob'} = 'close' if $status =~ /CLOSED/i; + # If no status is given, then we only want to change the resolution. + elsif ($fields{'resolution'}) { + $fields{'knob'} = 'change_resolution'; + $fields{'resolution_knob_change_resolution'} = $fields{'resolution'}; } if ($fields{'dup_id'}) { $fields{'knob'} = 'duplicate'; } - if ($fields{'resolution'}) { - $fields{'knob'} = 'resolve'; - } # Make sure we don't get prompted if we have to change the default # groups. diff --git a/mozilla/webtools/bugzilla/process_bug.cgi b/mozilla/webtools/bugzilla/process_bug.cgi index 3f223542227..912440ce278 100755 --- a/mozilla/webtools/bugzilla/process_bug.cgi +++ b/mozilla/webtools/bugzilla/process_bug.cgi @@ -488,12 +488,14 @@ if (!$cgi->param('id') && $cgi->param('dup_id')) { foreach my $b (@bug_objects) { if (should_set('knob')) { # First, get the correct resolution