summaryrefslogtreecommitdiffstats
path: root/process_bug.cgi
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2012-05-07 17:58:22 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2012-05-07 17:58:22 +0200
commit92a81752931c5fd7cdbf4b63305389844193d029 (patch)
tree13cae837e5d0491e9ad5d6426b558de741d261eb /process_bug.cgi
parent4e5dcf363dd1ffa63f0d7a190fa61891061ddea2 (diff)
downloadbugzilla-92a81752931c5fd7cdbf4b63305389844193d029.tar.gz
bugzilla-92a81752931c5fd7cdbf4b63305389844193d029.tar.xz
Bug 616191: Implement UI to easily tag bugs from the bug report directly (and get rid of the current form in the footer)
r=timello a=LpSolit
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-xprocess_bug.cgi12
1 files changed, 8 insertions, 4 deletions
diff --git a/process_bug.cgi b/process_bug.cgi
index 30e30b622..29cc54e9f 100755
--- a/process_bug.cgi
+++ b/process_bug.cgi
@@ -28,10 +28,6 @@ use Bugzilla::Bug;
use Bugzilla::User;
use Bugzilla::Util;
use Bugzilla::Error;
-use Bugzilla::Field;
-use Bugzilla::Product;
-use Bugzilla::Component;
-use Bugzilla::Keyword;
use Bugzilla::Flag;
use Bugzilla::Status;
use Bugzilla::Token;
@@ -330,6 +326,14 @@ if (defined $cgi->param('id')) {
my ($flags, $new_flags) = Bugzilla::Flag->extract_flags_from_cgi(
$first_bug, undef, $vars);
$first_bug->set_flags($flags, $new_flags);
+
+ # Tags can only be set to one bug at once.
+ if (should_set('tag')) {
+ my @new_tags = split(/[\s,]+/, $cgi->param('tag'));
+ my ($tags_removed, $tags_added) = diff_arrays($first_bug->tags, \@new_tags);
+ $first_bug->remove_tag($_) foreach @$tags_removed;
+ $first_bug->add_tag($_) foreach @$tags_added;
+ }
}
##############################