summaryrefslogtreecommitdiffstats
path: root/process_bug.cgi
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2007-07-14 05:00:57 +0200
committermkanat%bugzilla.org <>2007-07-14 05:00:57 +0200
commit88bf1df40e30b2d534e55593bfc3dc85c9b5c3f8 (patch)
treee3285aba23abf404472e5a9be42179acb205c254 /process_bug.cgi
parente3837b96c71158697052cd72f253f910ae7f79dc (diff)
downloadbugzilla-88bf1df40e30b2d534e55593bfc3dc85c9b5c3f8.tar.gz
bugzilla-88bf1df40e30b2d534e55593bfc3dc85c9b5c3f8.tar.xz
Bug 388036: Make Bugzilla::Bug do updating for alias in process_bug
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-xprocess_bug.cgi31
1 files changed, 8 insertions, 23 deletions
diff --git a/process_bug.cgi b/process_bug.cgi
index 267613f67..7773d15e7 100755
--- a/process_bug.cgi
+++ b/process_bug.cgi
@@ -651,28 +651,13 @@ if ($cgi->param('component') ne $cgi->param('dontchange')) {
}
}
-# If this installation uses bug aliases, and the user is changing the alias,
-# add this change to the query.
-if (Bugzilla->params->{"usebugaliases"} && defined $cgi->param('alias')) {
- my $alias = trim($cgi->param('alias'));
-
- # Since aliases are unique (like bug numbers), they can only be changed
- # for one bug at a time, so ignore the alias change unless only a single
- # bug is being changed.
- if (scalar(@idlist) == 1) {
- # Add the alias change to the query. If the field contains the blank
- # value, make the field be NULL to indicate that the bug has no alias.
- # Otherwise, if the field contains a value, update the record
- # with that value.
- DoComma();
- if ($alias ne "") {
- ValidateBugAlias($alias, $idlist[0]);
- $::query .= "alias = ?";
- push(@values, $alias);
- } else {
- $::query .= "alias = NULL";
- }
- }
+# Since aliases are unique (like bug numbers), they can only be changed
+# for one bug at a time. So if we're doing a mass-change, we ignore
+# the alias field.
+if (Bugzilla->params->{"usebugaliases"} && defined $cgi->param('alias')
+ && scalar(@bug_objects) == 1)
+{
+ $bug_objects[0]->set_alias($cgi->param('alias'));
}
# If the user is submitting changes from show_bug.cgi for a single bug,
@@ -1391,7 +1376,7 @@ foreach my $id (@idlist) {
# Bugzilla::Bug does these for us already.
next if grep($_ eq $col, qw(keywords op_sys rep_platform priority
- bug_severity short_desc
+ bug_severity short_desc alias
status_whiteboard bug_file_loc),
Bugzilla->custom_field_names);