diff options
-rw-r--r-- | Bugzilla/Comment.pm | 10 | ||||
-rw-r--r-- | Bugzilla/WebService/Bug.pm | 1 |
2 files changed, 6 insertions, 5 deletions
diff --git a/Bugzilla/Comment.pm b/Bugzilla/Comment.pm index a8f915bfd..7c2d5c4ea 100644 --- a/Bugzilla/Comment.pm +++ b/Bugzilla/Comment.pm @@ -468,12 +468,12 @@ sub count { my $dbh = Bugzilla->dbh; ($self->{'count'}) = $dbh->selectrow_array( "SELECT COUNT(*) - FROM longdescs - WHERE bug_id = ? - AND bug_when <= ?", - undef, $self->bug_id, $self->creation_ts); + FROM longdescs + WHERE bug_id = ? + AND comment_id < ?", + undef, $self->bug_id, $self->id); - return --$self->{'count'}; + return $self->{'count'}; } 1; diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm index f9a91797e..20a21147d 100644 --- a/Bugzilla/WebService/Bug.pm +++ b/Bugzilla/WebService/Bug.pm @@ -388,6 +388,7 @@ sub _translate_comment { is_private => $self->type('boolean', $comment->is_private), text => $self->type('string', $comment->body_full), attachment_id => $self->type('int', $attach_id), + count => $self->type('int', $comment->count), }; # Don't load comment tags unless enabled |