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;
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