From: Frédéric Buclin Date: Thu, 12 Aug 2010 23:16:15 +0000 (+0200) Subject: Bug 581690: Restore the ability to move several bugs at once to another installation X-Git-Tag: bugzilla-4.0rc1~93 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ed1abf60dd4dd2b5113d023dcbba293095cd2c6;p=thirdparty%2Fbugzilla.git Bug 581690: Restore the ability to move several bugs at once to another installation r=ghendricks a=LpSolit --- diff --git a/extensions/OldBugMove/Extension.pm b/extensions/OldBugMove/Extension.pm index c6b5659b07..3aca16a573 100644 --- a/extensions/OldBugMove/Extension.pm +++ b/extensions/OldBugMove/Extension.pm @@ -107,7 +107,7 @@ sub object_end_of_set_all { my ($self, $args) = @_; my $object = $args->{'object'}; - if ($object->isa('Bugzilla::Bug') and _bug_is_moving($object)) { + if ($object->isa('Bugzilla::Bug') and Bugzilla->input_params->{'oldbugmove'}) { my $new_status = Bugzilla->params->{'duplicate_or_move_bug_status'}; $object->set_bug_status($new_status, { resolution => 'MOVED' }); } @@ -132,7 +132,7 @@ sub _check_bug_resolution { my $original_validator = shift; my ($invocant, $resolution) = @_; - if ($resolution eq 'MOVED' and !_bug_is_moving($invocant)) { + if ($resolution eq 'MOVED' and !Bugzilla->input_params->{'oldbugmove'}) { # MOVED has a special meaning and can only be used when # really moving bugs to another installation. ThrowUserError('oldbugmove_no_manual_move'); @@ -198,12 +198,6 @@ sub _move_bug { MessageToMTA($msg); } -sub _bug_is_moving { - my $bug = shift; - my $oldbugmove = Bugzilla->input_params->{"oldbugmove_" . $bug->id}; - return $oldbugmove ? 1 : 0; -} - sub _user_is_mover { my $user = shift; diff --git a/extensions/OldBugMove/template/en/default/hook/bug/edit-after_comment_textarea.html.tmpl b/extensions/OldBugMove/template/en/default/hook/bug/edit-after_comment_textarea.html.tmpl index 71fe065901..0a7a4fa278 100644 --- a/extensions/OldBugMove/template/en/default/hook/bug/edit-after_comment_textarea.html.tmpl +++ b/extensions/OldBugMove/template/en/default/hook/bug/edit-after_comment_textarea.html.tmpl @@ -19,9 +19,9 @@ #%] [% IF oldbugmove_user_is_mover(user) AND bug.resolution != 'MOVED' %] -
- +

+ +

[% END %] diff --git a/extensions/OldBugMove/template/en/default/hook/list/edit-multiple-after_groups.html.tmpl b/extensions/OldBugMove/template/en/default/hook/list/edit-multiple-after_groups.html.tmpl new file mode 100644 index 0000000000..10e6f73b3f --- /dev/null +++ b/extensions/OldBugMove/template/en/default/hook/list/edit-multiple-after_groups.html.tmpl @@ -0,0 +1,28 @@ +[%# The contents of this file are subject to the Mozilla Public + # License Version 1.1 (the "License"); you may not use this file + # except in compliance with the License. You may obtain a copy of + # the License at http://www.mozilla.org/MPL/ + # + # Software distributed under the License is distributed on an "AS + # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + # implied. See the License for the specific language governing + # rights and limitations under the License. + # + # The Original Code is the Bugzilla Bug Tracking System. + # + # The Initial Developer of the Original Code is Everything Solved, Inc. + # Portions created by the Initial Developer are Copyright (C) 2010 + # the Initial Developer. All Rights Reserved. + # + # Contributor(s): + # Max Kanat-Alexander + # Frédéric Buclin + #%] + +[% IF oldbugmove_user_is_mover(user) %] +

+ +

+[% END %] diff --git a/template/en/default/list/edit-multiple.html.tmpl b/template/en/default/list/edit-multiple.html.tmpl index 736f2c71a2..1f22624d64 100644 --- a/template/en/default/list/edit-multiple.html.tmpl +++ b/template/en/default/list/edit-multiple.html.tmpl @@ -371,6 +371,9 @@ [% END %] [% END %] + +[%+ Hook.process('after_groups') %] + [%############################################################################%]