summaryrefslogtreecommitdiffstats
path: root/editusers.cgi
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2014-06-11 17:11:51 +0200
committerByron Jones <glob@mozilla.com>2014-06-11 17:11:51 +0200
commit02719d27e660f1212450a563e0e0b8aefa6c6883 (patch)
tree52e06b9419833d016617b9039f61a939677fbc63 /editusers.cgi
parent4d5e362475a95c83f478b846ed847ac5ebe31234 (diff)
downloadbugzilla-02719d27e660f1212450a563e0e0b8aefa6c6883.tar.gz
bugzilla-02719d27e660f1212450a563e0e0b8aefa6c6883.tar.xz
Bug 978146: activity entry when setting flags isn't split across multiple rows
r=dkl,a=sgreen
Diffstat (limited to 'editusers.cgi')
-rwxr-xr-xeditusers.cgi11
1 files changed, 3 insertions, 8 deletions
diff --git a/editusers.cgi b/editusers.cgi
index 3ce22068e..5eb49d139 100755
--- a/editusers.cgi
+++ b/editusers.cgi
@@ -421,10 +421,6 @@ if ($action eq 'search') {
my $sth_set_bug_timestamp =
$dbh->prepare('UPDATE bugs SET delta_ts = ? WHERE bug_id = ?');
- my $sth_updateFlag = $dbh->prepare('INSERT INTO bugs_activity
- (bug_id, attach_id, who, bug_when, fieldid, removed, added)
- VALUES (?, ?, ?, ?, ?, ?, ?)');
-
# Flags
my $flag_ids =
$dbh->selectcol_arrayref('SELECT id FROM flags WHERE requestee_id = ?',
@@ -439,16 +435,15 @@ if ($action eq 'search') {
# so we have to log these changes manually.
my %bugs;
push(@{$bugs{$_->bug_id}->{$_->attach_id || 0}}, $_) foreach @$flags;
- my $fieldid = get_field_id('flagtypes.name');
foreach my $bug_id (keys %bugs) {
foreach my $attach_id (keys %{$bugs{$bug_id}}) {
my @old_summaries = Bugzilla::Flag->snapshot($bugs{$bug_id}->{$attach_id});
$_->_set_requestee() foreach @{$bugs{$bug_id}->{$attach_id}};
my @new_summaries = Bugzilla::Flag->snapshot($bugs{$bug_id}->{$attach_id});
my ($removed, $added) =
- Bugzilla::Flag->update_activity(\@old_summaries, \@new_summaries);
- $sth_updateFlag->execute($bug_id, $attach_id || undef, $userid,
- $timestamp, $fieldid, $removed, $added);
+ Bugzilla::Flag->update_activity(\@old_summaries, \@new_summaries);
+ LogActivityEntry($bug_id, 'flagtypes.name', $removed, $added,
+ $userid, $timestamp, undef, $attach_id);
}
$sth_set_bug_timestamp->execute($timestamp, $bug_id);
$updatedbugs{$bug_id} = 1;