From 20c96f82ca2f624f57766adc44be087879f55d53 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Tue, 20 Sep 2016 13:48:07 +0000 Subject: Bug 1303659 - Bug.comments (/rest/bug//comment) should return the count value in the results --- Bugzilla/Comment.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Bugzilla/Comment.pm') 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; -- cgit v1.2.3-24-g4f1b