Hello,
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--
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.