From 92129e7250e8fd9af8330de686ad5f77b6b73932 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Thu, 24 Jan 2008 03:49:31 +0000 Subject: Bug 391669: Modifying a bug via email_in.pl fails because there are many fields that process_bug.cgi requires but aren't provided to it - Patch by Frédéric Buclin r=mkanat a=LpSolit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- email_in.pl | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'email_in.pl') diff --git a/email_in.pl b/email_in.pl index 13e81e77e..02d00a3e2 100644 --- a/email_in.pl +++ b/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. -- cgit v1.2.3-24-g4f1b