Hello,
I am trying to create a Jira Automation rule that does the following:
Check if a user group has been mentioned in a new comment e.g.
@10-Company.Accounting
Add a new comment that mentions the user(s) contained in the group
This is how I am trying to achieve this:
I successfully check for
@([0-9]{2}-\w+\.\w+)
And then try to comment:
{{issue.comments.last.author.displayName}} mentioned the following users {{membersOf("{{comment.body.match("@([0-9]{2}-\w+\.\w+)")}}")}}
I have also tried omitting the curly braces inside:
{{issue.comments.last.author.displayName}} mentioned the following users {{membersOf("comment.body.match("@([0-9]{2}-\w+\.\w+)")")}}
What's wrong?
This successfully returns the mentioned group name.
{{comment.body.match("@([0-9]{2}-\w+\.\w+)")}}
Could anyone help me please?
I have found 2 issues with this:
This is the error message I got:
Error rendering smart-values when executing this rule:
Failed to get value for membersOf("{{comment.body.match("@([0-9]{2}-\w+\.\w+)"): {{issue.comments.last.author.displayName}} mentioned the following users {{membersOf("{{comment.body.match("@([0-9]{2}-\w+\.\w+)")}}")}}
And without the curly braces inside:
Failed to get value for membersOf("comment.body.match("@([0-9]{2}-\w+\.\w+)")"): {{issue.comments.last.author.displayName}} mentioned the following users {{membersOf("comment.body.match("@([0-9]{2}-\w+\.\w+)")")}}
I have seen this issue, but I am trying to find a workaround until it is implemented:
https://jira.atlassian.com/browse/JRACLOUD-28225
Thank you.