How to Add a Reply to a Comment Using the Jira API?
Hi all,
I plan to use the Jira API to add comments, and I would like to ask how to add a reply to a comment.
Thanks & Regards, Lil
You can add a new comment to the ticket by using Jira issue_add_comment method def issue_add_comment(self, issue_key, comment, visibility=None): """ Add comment into Jira issue :param issue_key: :param comment: :param visibility: OPTIONAL :return: """ base_url =
This will add a new comment to the bottom of the issue comment chain. I don't think you can start a 'thread' like reply to specific existing comment (even from gui)
As @gkowalc mentioned previously, you cannot directly reply to a comment.
Alternatively we can implement some workaround with links to the comment. Here's a code snippet
jira = Jira(url="https://your_project.atlassian.net/", username="username", password="password")
jira_issue = "MYISSUE-5"
# you can get list of comments using issue_get_comments(jira_issue)
comment_id = 10008
new_comment_message = f"Answering to [comment #{comment_id}|{jira.url}browse/{jira_issue}?focusedCommentId={comment_id}] ..."
jira.issue_add_comment(jira_issue, new_comment_message)
Resulting comment will look like this
@dunterov could you add into examples please ?