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

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

vivek April 15, 2021

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

Mohamed Benziane
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 13, 2021

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
TAGS
AUG Leaders

Atlassian Community Events