summaryrefslogtreecommitdiffstats
path: root/process_bug.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2009-08-05 14:35:50 +0200
committerlpsolit%gmail.com <>2009-08-05 14:35:50 +0200
commitd0002e9626b97df6fad2c597b89c8ec31f7c308a (patch)
treeb14fd7ecb63ad9931b5c72e9c666ef499f0daa1d /process_bug.cgi
parent8b2db148f30d74283d3a80ebd77691c94a1ca4a7 (diff)
downloadbugzilla-d0002e9626b97df6fad2c597b89c8ec31f7c308a.tar.gz
bugzilla-d0002e9626b97df6fad2c597b89c8ec31f7c308a.tar.xz
Bug 415541: Implement $bug->set_flags() and $attachment->set_flags() - Patch by Frédéric Buclin <LpSolit@gmail.com> a=LpSolit
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();
###############