Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the latest comment from an issue in Jira?

Edilson Hernandez Serpa
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 24, 2023

Hi community!

I need to filter the latest commment from an issue (epic,task,etc.) because I want to generate a report automatically.

Thanks!!

2 answers

2 accepted

3 votes
Answer accepted
Mikael Sandberg
Community Champion
April 24, 2023 edited

You could do this by creating an automation and then use {{issue.comments.last.body}} to get the last comment.

Edilson Hernandez Serpa
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 25, 2023

Hi Mikael

Thanks for your answer!

I am trying to do a JQL query with that smart value and I am having problems. My idea is to do a query because I want to make a Confluence page and have the reports automatically. I am trying this:

project = POR39505 AND summary ~ "Book project" AND issuetype = Epic AND "comment ~ {{issue.comments.last.body}}"

I need to extract the last comment from that epic. If you can give me some advice on this, I will be very grateful

Thanks!

Sherwin Soriano
Contributor
February 13, 2025

@Mikael Sandberg How do you configure this on the automation rule, I mean where is the output, is it via email? just curious

Mikael Sandberg
Community Champion
February 14, 2025

@Sherwin Soriano you can use the smart value as part of the email content, something like this:

Here is the last comment on the request:

{{issue.comments.last.body}}

Sherwin Soriano
Contributor
February 17, 2025

@Mikael Sandberg 

a little help, how do you configure the rule? I mean what is the trigger or how does the structure of the rule will start?

Also, is it possible to like create a new field and then update the {{issue.comments.last.body}} in that field every time a new comment is added? is this possible?

Mikael Sandberg
Community Champion
February 18, 2025

@Sherwin Soriano My automation was setup to trigger on the transition, so for example when it transitioned to Finance approval the automation checked if the Finance approvers field was empty of not, and if it was then the automation approved it so that the ticket kept on moving in the workflow.

1 vote
Answer accepted
Hannes Obweger - JXL for Jira
Atlassian Partner
April 25, 2023

Hi @Edilson Hernandez Serpa

if you're open to solutions from the Atlassian Marketplace, this would be easy to do using the app that my team and I are working on, JXL for Jira.

JXL is a full-fledged spreadsheet/table view for your issues that allows viewing, inline-editing, sorting, and filtering by all your issue fields, much like you’d do in e.g. Excel or Google Sheets. It also comes with a large number of so-called "smart columns" that aren’t natively available, including the latest comment (along with many other comment-related columns).

This is how it looks in action:

comments.gif

As you can see above, you can easily view, sort, and filter by the latest comment, and also add new comments, either on a single issue or in bulk via copy/paste. You can also use the latest comment across JXL's advanced features such as (configurable) issue hierarchies, issue grouping, sum-ups, or conditional formatting.

Any questions just let me know,

Best,

Hannes

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
atlassian, team '25 europe, atlassian event, barcelona 2025, jira, confluence, atlassian intelligence, rovo, ai-powered collaboration, developer tools, agile teams, digital transformation, teamwork solutions, atlassian conference, product announcements

🌆 Team '25 Europe registration is now open!

Join the largest European gathering of the Atlassian Community and reimagine what’s possible when great teams and transformative technology come together. Plus, grab your Super Fan ticket now and save over €1,000 on your pass before prices rise on 3 June.

Register now
AUG Leaders

Atlassian Community Events