First, it will be necessary to create an Advanced compare condition for the comment with the desired project Key, with this smart value: {{issue.comment.last.body.text}}
It will be necessary to create a variable, "test" for example with this smart value and regex validator: {{comment.body.match("([A-Z]{2,}-\d+).*")}} Note: I recommend not using a variable name with any word that could be related to some Jira property, as this will make automation not work (I found this out by doing several tests using the word "issue" until I used the word "test" which worked).
So the icing on the cake here is to add a Link issues action into the automation rule using the variable that we already create with this smart value: {{variable_name}}
Extra tip: if you want to link tickets from different projects by a comment, just change the scope of the automation rule to Global(All projects for Multi projects):
Now the ticket mentioned in a comment will be automatically linked. The automation rule will work as in the screen recording below:
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
Hi @Bruno Altenhofen , I stumbled across this automation rule and love the idea, but I'm unable to find the step in the flow to add the variable created to the audit log. I don't see that as a step I can add. In turn, when I add the Link work items step, I only have Trigger work item and most recently created work item as options to choose from.
I know you created this rule back in 2022 so I'm sure updates have been made/changed, but any assistance here would be greatly appreciated! Thanks!
14 comments