summaryrefslogtreecommitdiffstats
path: root/process_bug.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-xprocess_bug.cgi20
1 files changed, 7 insertions, 13 deletions
diff --git a/process_bug.cgi b/process_bug.cgi
index 9faaf7445..f10467d4e 100755
--- a/process_bug.cgi
+++ b/process_bug.cgi
@@ -143,22 +143,13 @@ if (defined $cgi->param('dontchange')) {
}
# do a match on the fields if applicable
-
-# The order of these function calls is important, as Flag::validate
-# assumes User::match_field has ensured that the values
-# in the requestee fields are legitimate user email addresses.
-&Bugzilla::User::match_field($cgi, {
+Bugzilla::User::match_field($cgi, {
'qa_contact' => { 'type' => 'single' },
'newcc' => { 'type' => 'multi' },
'masscc' => { 'type' => 'multi' },
'assigned_to' => { 'type' => 'single' },
- '^requestee(_type)?-(\d+)$' => { 'type' => 'multi' },
});
-# Validate flags in all cases. validate() should not detect any
-# reference to flags if $cgi->param('id') is undefined.
-Bugzilla::Flag::validate($cgi->param('id'));
-
print $cgi->header() unless Bugzilla->usage_mode == USAGE_MODE_EMAIL;
# Check for a mid-air collision. Currently this only works when updating
@@ -280,6 +271,12 @@ foreach my $bug (@bug_objects) {
$product_change ||= $changed;
}
+# Flags should be set AFTER the bug has been moved into another product/component.
+if ($cgi->param('id')) {
+ my ($flags, $new_flags) = Bugzilla::Flag->extract_flags_from_cgi($first_bug, undef, $vars);
+ $first_bug->set_flags($flags, $new_flags);
+}
+
if ($cgi->param('id') && (defined $cgi->param('dependson')
|| defined $cgi->param('blocked')) )
{
@@ -586,9 +583,6 @@ foreach my $bug (@bug_objects) {
CheckIfVotedConfirmed($bug->id);
}
- # Set and update flags.
- Bugzilla::Flag->process($bug, undef, $timestamp, $vars);
-
$dbh->bz_commit_transaction();
###############