From 8a3eea6272fae3ac513fc44b35f3f0def49364da Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Mon, 24 Mar 2008 01:25:07 +0000 Subject: [PATCH] =?utf8?q?Bug=20377025:=20email=5Fin.pl=20doesn't=20allow?= =?utf8?q?=20you=20to=20close=20a=20bug=20-=20Patch=20by=20Fr=C3=83=C2=A9d?= =?utf8?q?=C3=83=C2=A9ric=20Buclin=20=20r=3Dmkanat=20a?= =?utf8?q?=3DLpSolit?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- email_in.pl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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 -- 2.47.2