Forums

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

send email notifications of last comment of the ticket when status Declined

joanna_natial
Contributor
April 21, 2026

Hello,

Is there a JQL that can retrieve the last comment on a ticket? I’m creating an automation to send an email notification whenever the approval status is declined, and I’d like to include relevant ticket details along with the latest comment in the email body.
Thansks

2 answers

4 votes
Trudy Claspill
Community Champion
April 21, 2026

Hello @joanna_natial 

Have you already constructed your rule? Please provide screen images that show the entire rule.

JQL is intended to retrieve issues, not comments.

However within the context of an automation rule if you already have the issue then you can reference the body of the last comment on that issue with the smart value

{{issue.comments.last.body}}

Refer to

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--issue.comments--

 

1 vote
Chris Hampshire
April 21, 2026

Hi @joanna_natial 

As @Trudy Claspill has said above, JQL should be used to narrow down your scope of the automation.

Ive included a screenshot of an example automation rule that will resolve your issue.

You've mentioned in your post that you also want to include relevant details of the ticket, You can customise the email body to include smart values so you can display any field's value you want. Just be sure to use the customfield IDs if they are non system fields.

Screenshot 2026-04-22 075623.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events