I am trying to follow the instructions in this blog post to setup automatic issue linking when an issue is mentioned in the comments.
When I test, I am able to get a successful run of the automation when I use a regex that is looking for a specific issue key, but when I use a generic regex to look for any project key, it fails. When I test the regex itself on an online tool, it successfully finds the issue key regardless of location in a comment so I don't think this is a regex specific issue.
Successful Automation: {{comment.body.match(“(ABC-\d+)")}}
Unsuccessful Automation: {{comment.body.match(“([A-Z]+-\d+)")}}
There was at one point a bug posted for this, but was closed as cannot reproduce which is not the case for me. Any guidance on how to configure this to avoid creating an automation rule for every project we have would be appreciated.
Hi @Bryan Rogers and welcome to the community!
I have a rule based upon this premise that works well for me where I use a similar regex:
{{comment.body.match("([A-Z0-9]+-\d+)")}}
However, one thing I do is capture this in a variable and then use that variable for my later action.
Also, make sure that your rule scope is set to global (or at least multiple projects) if you intend it to span multiple projects.
Well what do you know, my regex worked perfectly once put into a branch/variable. Thanks Mark!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.