]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 875744: Bug history messed up when two comments are made private
authorHugo Seabrook <hugo.seabrook@yahoo.com>
Wed, 5 Jun 2013 18:13:49 +0000 (20:13 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Wed, 5 Jun 2013 18:13:49 +0000 (20:13 +0200)
r/a=LpSolit

Bugzilla/Bug.pm

index 4d1181315fad39ce753ad4d0acdc52d158f03dad..768015f880b2aba5e7a2079a85d7ec06dadb3d06 100644 (file)
@@ -3895,6 +3895,7 @@ sub get_activity {
             if ($operation->{'who'} && $who eq $operation->{'who'}
                 && $when eq $operation->{'when'}
                 && $fieldname eq $operation->{'fieldname'}
+                && ($comment_id || 0) == ($operation->{'comment_id'} || 0)
                 && ($attachid || 0) == ($operation->{'attachid'} || 0))
             {
                 my $old_change = pop @$changes;
@@ -3909,7 +3910,7 @@ sub get_activity {
             $change{'added'} = $added;
 
             if ($comment_id) {
-                $change{'comment'} = Bugzilla::Comment->new($comment_id);
+               $operation->{comment_id} = $change{'comment'} = Bugzilla::Comment->new($comment_id);
             }
 
             push (@$changes, \%change);