]> 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:12:30 +0000 (20:12 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Wed, 5 Jun 2013 18:12:30 +0000 (20:12 +0200)
r/a=LpSolit

Bugzilla/Bug.pm

index 576ce9d52206ecd4ebf0bcbf793b5bf57a99e219..985978cb63c1cf80b2333617c46226d8d804bff3 100644 (file)
@@ -3944,6 +3944,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;
@@ -3958,7 +3959,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);