summaryrefslogtreecommitdiffstats
path: root/process_bug.cgi
diff options
context:
space:
mode:
authorSimon Green <sgreen@redhat.com>2014-08-14 01:40:47 +0200
committerSimon Green <sgreen@redhat.com>2014-08-14 01:40:47 +0200
commit424b21e37cd9aeac01588ce0defd3ee665944b1d (patch)
tree594aa91a4fafc7c30d26e0ee9a160f62bf4d063f /process_bug.cgi
parent6dbcec07eba4b0910c883141a85b0b9928b85f32 (diff)
downloadbugzilla-424b21e37cd9aeac01588ce0defd3ee665944b1d.tar.gz
bugzilla-424b21e37cd9aeac01588ce0defd3ee665944b1d.tar.xz
Bug 1012506 - Allow a bug to have multiple aliases
r=dkl, a=sgreen
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-xprocess_bug.cgi13
1 files changed, 11 insertions, 2 deletions
diff --git a/process_bug.cgi b/process_bug.cgi
index bc558682e..37beee14a 100755
--- a/process_bug.cgi
+++ b/process_bug.cgi
@@ -289,8 +289,17 @@ if (defined $cgi->param('newcc')
if (defined $cgi->param('id')) {
# Since aliases are unique (like bug numbers), they can only be changed
# for one bug at a time.
- if (defined $cgi->param('alias')) {
- $set_all_fields{alias} = $cgi->param('alias');
+ if (defined $cgi->param('newalias') || defined $cgi->param('removealias')) {
+ my @alias_add = split /[, ]+/, $cgi->param('newalias');
+
+ # We came from bug_form which uses a select box to determine what
+ # aliases need to be removed...
+ my @alias_remove = ();
+ if ($cgi->param('removealias') && $cgi->param('alias')) {
+ @alias_remove = $cgi->param('alias');
+ }
+
+ $set_all_fields{alias} = { add => \@alias_add, remove => \@alias_remove };
}
}