NAME
WebService::Bugzilla::Comment - Bugzilla Comment object and service
VERSION
version 0.001
SYNOPSIS
# Get comments for a bug
my $comments = $bz->comment->get(12345);
for my $c (@{$comments}) {
say $c->creator, ': ', $c->text;
}
# Add a comment
$bz->comment->create(12345, comment => 'See also bug 67890.');
# Fetch a single comment by ID
my $c = $bz->comment->get_by_id(98765);
DESCRIPTION
Provides access to the Bugzilla Comment API. Comment objects represent comments on bugs and provide helpers to create, fetch, render, and manage comment reactions and tags.
ATTRIBUTES
All attributes are read-only.
attachment_id-
Attachment ID associated with this comment, if any.
bug_id-
ID of the bug this comment belongs to.
count-
Zero-based index of this comment within the bug.
creation_time-
ISO 8601 datetime when the comment was created.
creator-
Login name of the user who wrote the comment.
is_markdown-
Boolean. Whether the comment body is Markdown.
is_private-
Boolean. Whether the comment is private (visible only to insiders).
raw_text-
Original comment text before any rendering.
reactions-
Hashref mapping emoji names to arrayrefs of WebService::Bugzilla::UserDetail objects.
-
Arrayref of tag strings attached to this comment.
text-
Rendered comment text.
time-
ISO 8601 datetime when the comment was recorded.
METHODS
create
my $c = $bz->comment->create($bug_id, %params);
Add a comment to a bug. See POST /rest/bug/{id}/comment.
get
my $comments = $bz->comment->get($bug_id);
Fetch all comments for a bug. See GET /rest/bug/{id}/comment.
Returns an arrayref of WebService::Bugzilla::Comment objects.
get_by_id
my $c = $bz->comment->get_by_id($comment_id);
Fetch a single comment by its numeric ID. See GET /rest/bug/comment/{id}.
Returns a WebService::Bugzilla::Comment, or undef if not found.
get_reactions
my $reactions = $bz->comment->get_reactions($comment_id);
Fetch reactions for a comment. Returns a hashref mapping emoji names to arrayrefs of WebService::Bugzilla::UserDetail objects.
render
my $html = $bz->comment->render(id => $comment_id);
my $html = $comment->render;
Render comment text (Markdown to HTML) via the server.
search_tags
my $tags = $bz->comment->search_tags($query, %params);
Search for comment tags matching a query string.
update_reactions
my $reactions = $bz->comment->update_reactions($comment_id, %params);
Add or remove reactions on a comment.
update_tags
my $tags = $bz->comment->update_tags($comment_id, %params);
Add or remove tags on a comment.
SEE ALSO
WebService::Bugzilla - main client
WebService::Bugzilla::UserDetail - lightweight user objects in reactions
https://bmo.readthedocs.io/en/latest/api/core/v1/comment.html - Bugzilla Comment REST API
AUTHOR
Dean Hamstead <dean@fragfest.com.au>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2026 by Dean Hamstead.
This is free software, licensed under:
The MIT (X11) License