Hi All,
I'm trying to autolink issues based on a 6 digit alphanumeric code that will be found somewhere in the Summary. Some examples of the possible summaries (with XXXXXX being the alphanumeric characters, IE (A-Z, 0-9):
XXXXXX | Bla bla bla
Bla bla bla / Bla bla bla / BK#:XXXXXX / Bla bla bla
Bla bla bla: #XXXXXX
I have been able to successfully get this to work if the code in the summary is all digits (8 digits in this case):
Compare 2 smart values:
First Value: {{issue.summary}}
Condition: contains regular expression
Regular expression: .*\d{8}.*
Then Create Smart variable
Variable name: numberInSummary
Smart Value: {{issue.summary.match(".*(\d{8}).*")}}
Then match JQL and then link issue to the trigger issue
However i'm stumped when it comes to the regex to find 6 alphanumeric characters especially since there are words in the summary with 6 letters and i don't want to match to those, only 6 digit alphanumeric.
i've tried using the compare regular expression as
^[a-zA-Z0-9]{6,}$
and the smart value as
{{issue.summary.match(".*(^[a-zA-Z0-9]{6,}$).*")}}
but that doesn't work and I don't know how to write the correct regex.
Thanks in Advance!