diff options
author | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-06-18 22:48:21 +0200 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-06-18 22:48:21 +0200 |
commit | db2a5492739a143ff828bbf25b1c97ab1524a9b9 (patch) | |
tree | 5047b59069a9f21f4a45ce770d991fc53fcba245 /process_bug.cgi | |
parent | 7ae63b1e06f607ede3ed32829ac9316e4c657247 (diff) | |
download | bugzilla-db2a5492739a143ff828bbf25b1c97ab1524a9b9.tar.gz bugzilla-db2a5492739a143ff828bbf25b1c97ab1524a9b9.tar.xz |
Bug 556422: Move the existing bug-moving functionality into an extension
called OldBugMove.
r=dkl, a=mkanat
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-x | process_bug.cgi | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/process_bug.cgi b/process_bug.cgi index f915a0893..5e6657939 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -376,72 +376,6 @@ if (defined $cgi->param('id')) { $first_bug->set_flags($flags, $new_flags); } -my $move_action = $cgi->param('action') || ''; -if ($move_action eq Bugzilla->params->{'move-button-text'}) { - Bugzilla->params->{'move-enabled'} || ThrowUserError("move_bugs_disabled"); - - $user->is_mover || ThrowUserError("auth_failure", {action => 'move', - object => 'bugs'}); - - $dbh->bz_start_transaction(); - - # First update all moved bugs. - foreach my $bug (@bug_objects) { - $bug->add_comment('', { type => CMT_MOVED_TO, extra_data => $user->login }); - } - # Don't export the new status and resolution. We want the current ones. - local $Storable::forgive_me = 1; - my $bugs = dclone(\@bug_objects); - - my $new_status = Bugzilla->params->{'duplicate_or_move_bug_status'}; - foreach my $bug (@bug_objects) { - $bug->set_bug_status($new_status, {resolution => 'MOVED', moving => 1}); - } - $_->update() foreach @bug_objects; - $dbh->bz_commit_transaction(); - - # Now send emails. - foreach my $bug (@bug_objects) { - $vars->{'mailrecipients'} = { 'changer' => $user }; - $vars->{'id'} = $bug->id; - $vars->{'type'} = "move"; - send_results($bug->id, $vars); - } - # Prepare and send all data about these bugs to the new database - my $to = Bugzilla->params->{'move-to-address'}; - $to =~ s/@/\@/; - my $from = Bugzilla->params->{'moved-from-address'}; - $from =~ s/@/\@/; - my $msg = "To: $to\n"; - $msg .= "From: Bugzilla <" . $from . ">\n"; - $msg .= "Subject: Moving bug(s) " . join(', ', map($_->id, @bug_objects)) - . "\n\n"; - - my @fieldlist = (Bugzilla::Bug->fields, 'group', 'long_desc', - 'attachment', 'attachmentdata'); - my %displayfields; - foreach (@fieldlist) { - $displayfields{$_} = 1; - } - - $template->process("bug/show.xml.tmpl", { bugs => $bugs, - displayfields => \%displayfields, - }, \$msg) - || ThrowTemplateError($template->error()); - - $msg .= "\n"; - MessageToMTA($msg); - - # End the response page. - unless (Bugzilla->usage_mode == USAGE_MODE_EMAIL) { - $template->process("bug/navigate.html.tmpl", $vars) - || ThrowTemplateError($template->error()); - $template->process("global/footer.html.tmpl", $vars) - || ThrowTemplateError($template->error()); - } - exit; -} - ############################## # Do Actual Database Updates # ############################## |