INNER JOIN profiles
ON profiles.userid = longdescs.who
WHERE longdescs.bug_id = ?';
+
if ($start) {
- $query .= ' AND longdescs.bug_when > ?
- AND longdescs.bug_when <= ?';
- push(@args, ($start, $end));
+ $query .= ' AND longdescs.bug_when > ?';
+ push(@args, $start);
+ }
+ if ($end) {
+ $query .= ' AND longdescs.bug_when <= ?';
+ push(@args, $end);
}
+
$query .= " ORDER BY longdescs.bug_when $sort_order";
my $sth = $dbh->prepare($query);
$sth->execute(@args);
my $bug = Bugzilla::Bug->check($bug_id);
# We want the API to always return comments in the same order.
my $comments = Bugzilla::Bug::GetComments(
- $bug->id, 'oldest_to_newest');
+ $bug->id, 'oldest_to_newest', $params->{new_since});
my @result;
foreach my $comment (@$comments) {
next if $comment->{isprivate} && !$user->is_insider;
returned individually, separate from any other comments in their
respective bugs.
+=item C<new_since>
+
+C<dateTime> If specified, the method will only return comments I<newer>
+than this time. This only affects comments returned from the C<bug_ids>
+argument. You will always be returned all comments you request in the
+C<comment_ids> argument, even if they are older than this date.
+
=back
=item B<Returns>