Forums

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

How to get last public comment date in JSM

Radhika Rajendran September 18, 2024

I'm using an automation to capture last public comment date. If the latest comment is internal, it's ignoring previous external comments and returning empty. 

{{#issue.comments}}

{{#if(not(internal))}}

{{last.created.jiraDate}}

{{/}}{{/}}

There's a known bug in Jira. The inbuilt 'Last public comment date' custom field gives Last Internal Comment date if the latest comment is internal.

How to get the latest communication date with a customer?

1 answer

Suggest an answer

Log in or Sign up to answer
1 vote
Tuncay Senturk
Community Champion
September 20, 2024

First reversing the comments and then filtering out non-internal comments (not(internal)) will allow us to get the right order. If there is at least one comment, the first one will give us the correct comment.

{{issue.comments.reverse.filter(not(internal)).first.created.jiraDate}}
TAGS
AUG Leaders

Atlassian Community Events