Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,359,986
Community Members
 
Community Events
168
Community Groups

Jira + Python : How can I retrieve the last comment of an issue with specific string

Edited

Hi, I have written a code which give me all the comments in jira issue. But I only want last comment  which contain the specific string I want. Can anybody help me with that.

 

id = objJira.getIssue(issueid)
comment = id.fields.comment.comments

for com in comment:
  print(com.body)

1 comment

I guess the last comment will have the higher ID. May be you can get the date of the comment and work with it in your block instruction.

Comment

Log in or Sign up to comment