How do I include a link to an issue in a Slack message from Automation for JIRA?

I have a rule that triggers when a due date is approaching for issues. At that point, I want to send a notification to the team's Slack channel, making everyone aware that we're closing in on the deadline.

I have managed to get the message to Slack without problems, with the following payload:

:{{issue.key}} ({{issue.fields.summary}}) has a deadline on {{issue.fields.duedate}}

So far so good... but I would rather have the {{issue.key}} replaced with a link to the actual issue, i.e. https://<our-url.com>/browse/<issue.key>, and ideally displayed as the issue key, but linked to the issue itself.

But I cant figure out how to do it... the URL won't be resolved when I use the Mustache notation in it, so... any suggestions on what I'm missing here?

1 answer

1 accepted

0 vote
Andreas Knecht Community Champion May 31, 2017

Hi Gustaf,

 

What you need is something like this:

<https://codebarrel.atlassian.net/browse/{{issue.key}}|{{issue.key}} - {{issue.fields.summary}}>

So this would render "TEST-1234 - Sample issue" as a link (where 'Sample issue' is the summary).  Obviously replace codebarrel.atlassian.net with your instance URL.

Slack's URL format is basically:

<https://YOUR URL/|Your Link label>

Hope this helps!

Cheers,
  Andreas

Hi Andreas. 

This is exactly what I did, and did not get it to work. Then I tried it again now, and hey presto! it worked... must have been a silly typo on my end that caused it :facepalm:

Thanks for the quick response, and THANK YOU for the plugin. What a Swiss army knife it turns out to be :D

Cheers,
/Gustaf

Andreas Knecht Community Champion Jun 01, 2017

Hey Gustaf,

Great to hear that worked and thanks for your kind words!

If you can spare another minute, we'd love it if you could give us a review on marketplace: https://marketplace.atlassian.com/plugins/com.codebarrel.addons.automation/server/reviews

They really help us stand out from the crowd there!

Cheers,

  Andreas

Andreas,

 

Do you know the URL format for a Stride message?

 

Thanks,

Rachael

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Tuesday in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

113 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you