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.
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.
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!
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.