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 Leaders.
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 Leaders.
12 comments