From d06db94e9793766ba8b67fcf6602f6d87bd624d4 Mon Sep 17 00:00:00 2001 From: "guy.pyrzak%gmail.com" <> Date: Thu, 10 Apr 2008 21:33:15 +0000 Subject: Bug 414236 Ð show_bug.cgi: Remove the knob in favor of normal , in case there is more - # than one open -> closed transition allowed. Allow to fallback to - # 'resolution' (useful when called from email_in.pl). - my $knob = $cgi->param('knob'); - my $status = new Bugzilla::Status({name => $knob}); - my $resolution; - if ($status) { - $resolution = $cgi->param('resolution_knob_' . $status->id) - || $cgi->param('resolution'); - } - else { - $resolution = $cgi->param('resolution_knob_change_resolution'); - } - - # Translate the knob values into new status and resolution values. - $b->process_knob($knob, $resolution, scalar $cgi->param('dup_id')); + if (should_set('bug_status')) { + $b->set_status( + scalar $cgi->param('bug_status'), + {resolution => scalar $cgi->param('resolution'), + dupe_of => scalar $cgi->param('dup_id')} + ); + } + elsif (should_set('resolution')) { + $b->set_resolution(scalar $cgi->param('resolution'), + {dupe_of => scalar $cgi->param('dup_id')}); + } + elsif (should_set('dup_id')) { + $b->set_dup_id(scalar $cgi->param('dup_id')); } } -- cgit v1.2.3-24-g4f1b