Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Hi to fetch comment from jira ticket using python code?


For my automation work i have to fetch comment from JIRA ticket. Please let me know how to fetch comment from jira ticket.

3 answers

2 accepted

1 vote
Answer accepted


I am trying to fetch latest comment from JIRA ticket. 

i used this in python script.


<class 'jira.resources.PropertyHolder'>

this is the output i received.

Please let me know what is the issue
DPK J Community Leader Sep 09, 2019

You need to do something like this,

comments =  issue.fields.comment.comments

for comment in comments:
    print("Text: ", comment.body)
1 vote
Answer accepted

Thank you..i am able to read the description.

Now when new ticket is arrived to my jira account i have to fetch description automatically. Am trying for that.

Can you help me.

DPK J Community Leader Sep 08, 2019

@AnnapurnaI have already replied for this in your other question.

In external environment, you only have two possibilities, Polling Search API, or Webhooks.


Also, if my above answer helped you, please upvote and accept it, so that other people looking for same thing can also get help.

0 votes
DPK J Community Leader Sep 08, 2019

You have two ways to do this,

  1. Using Jira Python (python wrapper for calling Jira API's)
    1. Reference -
    2. Comments Example -
  2. Using rest API's provided by Jira
    1. You will need to use 'requests' module from python (or any other) to simply consume Rest API provided by Jira
    2. API Reference -
    3. Get comment based on issue -
DPK J Community Leader Sep 10, 2019

Can you also mark this as accepted solution if someone is looking for comprehensive solution.

Like Preeti Chaturvedi likes this

Suggest an answer

Log in or Sign up to
This widget could not be displayed.

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you