Hello,
We are wanting to create a variable in our Automation rule that returns the body of the last comment made in the Issue, by the initiator of the rule.
The following returns the last comment in the issue where the automation is executed. However, the author of the last comment could be from any Jira user. We are looking for the last comment from a specific Jira user.
{{issue.comments.last.body}}
Desired outcome in pseudocode
{{issue.comments[where author.displayName = initiator.displayName].last.body}}
Thanks for your input
Hello @Daniel Boling ,
Welcome to the community!
You can try with {{initiator.displayName}} has the change {{issue.comment.last.body}}
Initiator.displayName refer to the user who triggered the rule.
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-users/
Hope this would help! Have a great day
Thanks, Himanshi.
We are attempting to create a string of comment id's in the issue based off the initiator's display name, delimited by ",":
{{#issue.comments}}{{#if(equals(author.displayName, initiator.displayName))}},{{id}}{{/}}{{/}}
However, initiator.displayName is returning a blank in the if statement. Is there a restriction that would prevent us from using that particular smart variable in the if statement?
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.