From: lpsolit%gmail.com <> Date: Mon, 24 Mar 2008 01:25:07 +0000 (+0000) Subject: Bug 377025: email_in.pl doesn't allow you to close a bug - Patch by Frédéric Buclin... X-Git-Tag: bugzilla-3.0.4~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a3eea6272fae3ac513fc44b35f3f0def49364da;p=thirdparty%2Fbugzilla.git Bug 377025: email_in.pl doesn't allow you to close a bug - Patch by Frédéric Buclin r=mkanat a=LpSolit --- diff --git a/email_in.pl b/email_in.pl index 5fd28337e5..422b886f76 100644 --- a/email_in.pl +++ b/email_in.pl @@ -190,15 +190,22 @@ sub process_bug { 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'} = 'reopen' if $status =~ /REOPENED/i; + $fields{'knob'} = 'resolve' if $status =~ /RESOLVED/i; $fields{'knob'} = 'verify' if $status =~ /VERIFIED/i; $fields{'knob'} = 'close' if $status =~ /CLOSED/i; + # Only @bug_status = RESOLVED can have a @resolution. + delete $fields{'resolution'} if $status !~ /RESOLVED/i; } if ($fields{'dup_id'}) { $fields{'knob'} = 'duplicate'; } if ($fields{'resolution'}) { - $fields{'knob'} = 'resolve'; + # If @bug_status is defined and we come here, then we know + # @bug_status = RESOLVED as the resolution would be ignored otherwise. + # If bug_status is undefined, then all we want to do is to change + # the resolution of the bug, leaving its status alone. + $fields{'knob'} = 'change_resolution' unless $fields{'bug_status'}; } # Make sure we don't get prompted if we have to change the default