Hey everyone,
I'm trying to create an automation that when a link to an external Jira issue is added to the comments, it pastes the link into a custom External URL field. I'm new to regex so to test it I'm just having Jira bot return a comment with the URL.
When I add the URL into a comment as a hyperlink, Jira bot returns the URL back twice. However, If I paste a non-hyperlinked URL into the comments, it works correctly.
I'm not exactly sure what I'm missing when I try to insert {{issue.comment.last.body.match("(https:\/\/jira.test.com\/browse\/ABC-\d+)")}} into the comment.
Any help is greatly appreciated.
Community moderators have prevented the ability to post new answers.
If you were to export that issue with the comment and look at the body, I expect you will see it includes something like this
[https://jira.test.com/browse/ABC-135|https://jira.test.com/browse/ABC-135|smart-link]
So the URL is in there twice and so needs to be parsed accordingly, such as using the Match to make it a list, and then returning only one entry.
Best regards,
Bill
How do you make a list from the match and then return just that value?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I can think of two ways to accomplish your goal:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.