Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Linking issues that are mentioned in an issues comments

Sarah Fajerberg June 1, 2023

Hey Community, 

I'm trying to create an automation that will link issues mentioned in another issues comments. 

This is the automation that I've been trying. But it is trowing an error. Anyone who can tell me what's wrong? Or help me analyse what is going wrong in the automation?

Screenshot 2023-06-01 at 13.07.41.png

1 answer

1 accepted

0 votes
Answer accepted
Gideon Nolte _Eficode_
Rising Star
Rising Star
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.
June 1, 2023

Hi @Sarah Fajerberg

here's the syntax for your matching: `{{comment.body.match(".*?([A-Z]+-\d+).*?")}}`

Since the match method may return multiple values, I would suggest using it with "Advanced Branching". Adding up on that, match may return groups which are not actual keys. You can confirm that you only link to values that represent a value, by checking if there is an issue present with that key. 

See the full setup below. 
image.png

 

Feel free to ask for clarification or help if anything is unclear.

Greetings
Gideon 

Sarah Fajerberg June 1, 2023

I tried this and got this error. I also attached a screenshot of my setup based on yours. 
Screenshot 2023-06-01 at 15.06.40.pngScreenshot 2023-06-01 at 15.05.41.png

Gideon Nolte _Eficode_
Rising Star
Rising Star
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.
June 1, 2023

I suppose your branch config looks like this:
image.png

Just to be sure you - you do not need the `` around the smart value in my first post. I had success with this:

{{comment.body.match(".*?([A-Z]+-\d+).*?")}}

 

Hope this helps.
Gideon

Sarah Fajerberg June 1, 2023

I see my error now. It worked! 
Thank you very much

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events