diff options
author | Simon Green <sgreen@redhat.com> | 2014-08-14 01:40:47 +0200 |
---|---|---|
committer | Simon Green <sgreen@redhat.com> | 2014-08-14 01:40:47 +0200 |
commit | 424b21e37cd9aeac01588ce0defd3ee665944b1d (patch) | |
tree | 594aa91a4fafc7c30d26e0ee9a160f62bf4d063f /process_bug.cgi | |
parent | 6dbcec07eba4b0910c883141a85b0b9928b85f32 (diff) | |
download | bugzilla-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-x | process_bug.cgi | 13 |
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 }; } } |