In the Jira ticket there is a custom field which allows the user to add links to other reference Jira tickets. They come as clickable links in the custom field. They are not separated by any delimiter. Is there a way to automate linking all of the tickets in the custom field to the trigger ticket. They need to show up as linked issues.
Hi @Gaurav Parab
I am not sure I understand. How are the clickable links getting added to the custom field? What kind of custom field is it (short text, text, paragraph, etc.)?
Why not just create them as Linked issues and get rid of the custom field?
If you copy a ticket url into the custom field which is a text box, it will convert it to a clickable link assuming you set your rendering settings correctly for the text box. The ticket is coming over from Jira Service Desk and also entered by non technical folks. The ticket URLs are copied by them in the text box. That being said, i was able to figure out a solution for this using existing documentation.
This blogpost provides the solution i require. Although the blogpost describes it for the comments section. You can use the same regex for any field.
In the link issue action all you need to do is use a smart value {{issue.customfield_xxxxx.match("(PRJ-\d+)")}} for "relates to" and it will link all of tickets which have a key starting with PRJ
Glad to hear that you found a solution. That solution is pretty nifty but fragile as it will break should you change your project Keys and be difficult to maintain should you want to add additional project keys to the logic.
That being said, if this works for you, it works for you, right?
Another update: I was thinking about the same thing on how to make it less reliant on specific project keys format. Figured out a better regex. This should work for any project keys in the format "ABC-1234". {{issue.customfield_xxxxx.match("([A-Z]+-\\d+)")}}
It looks like you're new here. Sign in or register to get started.