How to access remote issue links by smart values?

Louis_Zhang February 19, 2020

I'm writing a rule to send Slack notifications with the 'Automation for Jira' add-on.

Unlike other issue fields, I can't get the remote links by smart values like '{{issue.key}}'.

Any walkaround to fix it without using a groovy script?  Thanks

 

1582101451801.jpg

 

1 answer

1 accepted

5 votes
Answer accepted
Daniel Eads
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 5, 2020

Hi Louis,

You can use the issuelinks information in Automation, although as you discovered it's not as straightforward as just calling other fields. The issuelinks object is fairly nested, so you'll need to summon values farther down using the dot notation on the object. Here's an example of a message I was able to send to Slack for an issue with 3 issue links:
image.png

You'll notice the links are on two separate lines - there's a reason for that! Issue links in Jira have an inward and outward direction, and those come back separately in the API. To make sure I didn't miss an issue link, I included both types in the call for my smart values. Here's the message source for my example:

Issue {{issue.key}} is now for your review!
Links:
{{issue.issuelinks.inwardIssue}}
{{issue.issuelinks.outwardIssue}}

Hopefully that helps clear things up! Adding .inwardIssue and .outwardIssue to the issue.issuelinks smartvalue should get what you're after.

Cheers,
Daniel

Louis_Zhang March 31, 2020

Wow, I'll try it out right now. Many thanks.

Like Corentin Musart likes this
Stephen Doyle June 4, 2020

@Daniel Eads That's really cool. Is there a way to pull additional data from the issue link?  

For example, the name and URL of a web link.

Like # people like this
Tom Williams
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 19, 2020

@Stephen Doyle  have you found a solution your question yet? 

Like Joe Sapinoso likes this
Joe Sapinoso September 2, 2020

Hi @Daniel Eads , I tried your suggestion above in order to copy a field into another, but this was the result:
 2020-08-28 12_52_33-[IT-23311] Update ADCM-Hotfix jira fields - Atlassian JIRA and 6 more pages - Wo (1).png

 

Is there an adjustment you can recommend wherein the highlighted just shows the Ticket Name as opposed to the URL?

Daniel Hostrup Eriksen
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 22, 2021

@JoeYou should be able to append the property to the string, like:

{{issue.issuelinks.inwardIssue.summary}}
Talha Aras January 12, 2024

And if u want it, you can reach url by {{issue.issuelinks.inwardIssue.url}}

Suggest an answer

Log in or Sign up to answer