is_cc_accessible => 'cclist_accessible',
is_creator_accessible => 'reporter_accessible',
last_change_time => 'delta_ts',
+ comment_count => 'longdescs.count',
platform => 'rep_platform',
severity => 'bug_severity',
status => 'bug_status',
return \@comments;
}
+sub comment_count {
+ my ($self) = @_;
+ return $self->{comment_count} if $self->{comment_count};
+ my $dbh = Bugzilla->dbh;
+ return $self->{comment_count} =
+ $dbh->selectrow_array('SELECT COUNT(longdescs.comment_id)
+ FROM longdescs
+ WHERE longdescs.bug_id = ?',
+ undef, $self->id);
+}
+
# This is needed by xt/search.t.
sub percentage_complete {
my $self = shift;
= [ map { $self->_user_to_hash($_, $params, undef, 'mentors') } @{ $bug->mentors } ];
}
+ if (filter_wants $params, 'comment_count') {
+ $item{'comment_count'} = $self->type('int', $bug->comment_count);
+ }
+
return \%item;
}
"email": "namachi@netscape.com"
},
"cf_free_text": "",
- "blocks": []
+ "blocks": [],
+ "comment_count": 12
}
]
}
member of the groups the bug is restricted to.
keywords array Each keyword that is on this bug.
last_change_time datetime When the bug was last changed.
+comment_count int Number of comments associated with the bug.
op_sys string The name of the operating system that the bug
was filed against.
platform string The name of the platform (hardware) that the bug