diff options
author | guy.pyrzak%gmail.com <> | 2008-04-10 21:33:15 +0000 |
---|---|---|
committer | guy.pyrzak%gmail.com <> | 2008-04-10 21:33:15 +0000 |
commit | d06db94e9793766ba8b67fcf6602f6d87bd624d4 (patch) | |
tree | 6d2045b1abb60d2fbd0fd86d77ecb57f23794366 /process_bug.cgi | |
parent | 09e9e8b9dba58ae262c0ce664561373f4380205f (diff) | |
download | bugs-d06db94e9793766ba8b67fcf6602f6d87bd624d4.tar bugs-d06db94e9793766ba8b67fcf6602f6d87bd624d4.tar.gz bugs-d06db94e9793766ba8b67fcf6602f6d87bd624d4.tar.bz2 bugs-d06db94e9793766ba8b67fcf6602f6d87bd624d4.tar.xz bugs-d06db94e9793766ba8b67fcf6602f6d87bd624d4.zip |
Bug 414236 Ð show_bug.cgi: Remove the knob in favor of normal <select> boxes
Patch By Guy Pyrzak<guy.pyrzak@gmail.com> r=mkanat, a=LpSolit.
Removes knob from edit single and edit multiple bugs.
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-x | process_bug.cgi | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/process_bug.cgi b/process_bug.cgi index 97cd3098d..cf24c96c9 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -495,23 +495,19 @@ if (!$cgi->param('id') && $cgi->param('dup_id')) { # down here, because the validity of status changes depends on other fields, # such as Target Milestone. foreach my $b (@bug_objects) { - if (should_set('knob')) { - # First, get the correct resolution <select>, 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')); } } |