Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to automate Jira to send multiple linked issue hyperlinks?

Ryan Belmont November 19, 2024

Hi all,

 

I'm trying to create automation that sends ticket information to a Slack channel when transitioned to a specific state. One of the components I'm trying to message is a list of linked issues (with hyperlinks to those issues).

Right now the logic I'm using is:

<https://domain.atlassian.net/browse/{{issue.issuelinks.outwardIssue.key}}|{{issue.issuelinks.outwardIssue.summary}}>

This works as expected when there's a single issue link - I get the linked ticket summary and it's appropriately hyperlinked. However, if there are multiple linked issues the hyperlinking part stops working. Any suggestions? I experimented with  {{issue.issuelinks.outwardIssue.url}} as well, but that doesn't hyperlink automatically in Slack sadly.

2 answers

1 accepted

1 vote
Answer accepted
Jehan Bhathena
Community Champion
November 19, 2024

Hi @Ryan Belmont 

You might have to create a Lookup table, and if there is more than 1 Link you'll have to loop thru all the values.

Reference: https://www.atlassian.com/software/jira/automation-template-library/rules#/rule/1363405/26550780

While the above template isn't a 1:1 replica bu you can see how the Lookup action's output is looped in the Send to Slack action.

1 vote
Ryan Belmont November 20, 2024

Thanks @Jehan Bhathena! I was able to make it work with these blocks:

issue in linkedIssues("{{issue.key}}", "is an approval for")

and then

*Approves Task(s)*: {{#lookupIssues}} <https://DOMAIN.atlassian.net/browse/{{key}}|{{summary}}>{{^last}}, {{/}}{{/}}

Creates a comma separated list and omits a comma for the last list item via the {{^last}} (not last) smart value.

Appreciate the help!

Suggest an answer

Log in or Sign up to answer