Hello,
I have an Automation that works but I want to change it slightly. I looked for information everywhere for smart value {issue.comment} and variations to it, but it fails.
The Automation sends an e-mail to 1 person from organization ABC, if comment is added to one of the issues (tickets) from someone from ABC, so
When: Issue commented; comment is the main action.
If: Organization is ABC
Then: Send e-mail (to 1 person of ABC)
The following script (an example in Jira Help) in the e-mail works:
Subject:
Issue {{issue.key}} was just updated!
Content:
{{#issue.comments}}
Comment by: {{author.displayName}} at: {{created}}
{{body}}
{{/}}
If there is an issue from ABC where comment is added it sends an e-mail with all comments on that issue, see below the Content of the e-mail it generates:
Comment by: Roland Uittenbogaard at: 2023-01-16T09:19:52.2+0000
[Tekst of the comment]
Comment by: [name of someone from ABC] at: 2023-01-17T08:01:03.9+0000
[Text of the comment]
Comment by: Roland Uittenbogaard at: 2023-01-18T12:52:45.7+0000
[Text of the comments]
Now I only want to send the last comment of that issue, not all comments on that issue. I tried the following:
{{issue.comments.last.body}}
Comment by: {{author.displayName}} at: {{created}}
{{body}}
{{/}}
{{issue.comments.last}}
Comment by: {{author.displayName}} at: {{created}}
{{body}}
{{/}}
Both fail. I can find smart values and some examples in Jira Help, but not a coherent manual or explanation of possible smart values. Thanks for any help.