How to edit/update comment in Jira(Python)

I am trying to edit a comment in jira using jira-python, but I couldnt find anything.

I know Add_comment will add a comment, but I also want to know how to edit a comment. thanks~!!

2 answers

1 accepted

0 votes
Shaun Seaver Atlassian Team Oct 19, 2017

You can edit a comment by first getting the comment ID. If you hover over the link icon of a comment(see screenshot) the ID should be contained in the link URL. commentID.png

With the commentID you can then update the comment

jira_options={'server': 'http://<jira_url>'}
jira=JIRA(options=jira_options,basic_auth=('username','password'))

comment = jira.comment('ALPHA-27', '10100')
comment.update(body = 'the text here will replace the text in the comment')

I'm sure there is a more streamlined method of obtaining the comment ID, but that should work for the sake of testing. 

when I edit a customfield, it returns

response text = {"errorMessages":["Internal server error"],"errors":{}}

 

do you know how to fix this?@Shaun Seaver

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,139 views 13 19
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot