Jira Issue Links in Slack : All Issue URLs Re-Direct to start.atlassian.net

Evan Nixon March 23, 2022

Hello everyone!

I've got another frustrating new and exciting issue which has cropped up with an automation I've created which sends me a Slack message with issues based on a JQL filter.

Everything works perfectly as expected, right up until the point that I click on the links in Slack. 

Screenshot 2022-03-23 103706.png

The URL that is displayed above is correct, and right clicking "Copy Link" on the URL, then pasting that into my browser (Edge Chromium) works just fine. However if I click on said link, instead of going to that URL, I instead end up on start.atlassian.net.


Watching the URL bar in my browser, it very quickly cycles from :

Screenshot 2022-03-23 104249.png

to : 

Screenshot 2022-03-23 104424.png

then finally : 

Screenshot 2022-03-23 104701.png

 

The strange thing is, if I send a link to a filter (ie : "https://*.atlassian.net/issues/?filter=10328") I land on the correct page, it's only with links to issues that I've run in to this problem. I also don't have this issue with Slack links sent via integrations/webhooks/etc in any other circumstance other than linking to specific tasks. Has anyone ever run into this before?

3 answers

0 votes
Leandro Chagas November 3, 2022

Hi @Evan Nixon

I was facing this issue with an automation and I figure out that the problem was the blank space between the URL and the pipe character:

{{#lookupIssues}} 
<https://*.atlassian.net/browse/{{key}}| {{summary}} {{key}}>
{{/}}

I just remove this blank space and it worked like magic! 

Maybe it helps someone else who also has this problem since I believe that after so long you have already solved it.

See ya!

0 votes
Daniel Eads
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 23, 2022

Hi @Evan Nixon !

I see you've already switched to using the url smart value in your Automation lookup, which was going to be my first suggestion based on your question.

About the second - generating unfurls. The Slack app won't trigger unfurls for messages from apps like Automation for Jira. We've documented this ask in API-103 on our public Jira instance but the short of it is - this isn't supported by Slack's API, so we can't do it with the Jira Cloud app.

As a workaround, we generally see folks using the smart values in their lookups to generate the details they want (summary, assignee, etc) in the Automation message. The downside is that you can't Watch or take the More actions options as the Jira Cloud app generates.

Here's a snippet to use in your lookup that gives you a short unfurl (key and summary as a link, plus description):

<{{issue.toUrl}}|*{{issue.key}}*  {{issue.summary}}>
{{issue.description}}

Cheers,
Daniel 

Evan Nixon March 29, 2022

Hi Daniel! 

Unfortunately doing exactly what you've suggested was the first thing I tried, and appears to be the source of this problem. 

If I format a link with display text it then experiences the behaviour I detailed in my original post which forwards me to start.atlassian.net, whereas if I format it as http://JustTheURL.com/ it works as expected. More examples below. 


<<URL>>

Jira Automation : Slack Message

Screenshot 2022-03-29 101228.png

 Slack : Received Message 

Received Message.jpg

Link Destination : 

Screenshot 2022-03-29 110041.png

 



<{{url}} |{{key}}-{{summary}}>

Jira Automation : Slack Message
Screenshot 2022-03-29 101135.png

Slack : Received Link Format
Received Message 2.jpg

Slack Link : Destination 
Screenshot 2022-03-29 112642.png

 

 

 

So yeah, this is the whole issue. 

0 votes
Evan Nixon March 23, 2022

Alright - we're on from one unexpected behaviour to the next then. 

Previously my message was formatted as : 

{{#lookupIssues}} 
<https://*.atlassian.net/browse/{{key}} | {{summary}} {{key}}>
{{/}}


Which formatted the links as in my original post - hyperlinks with display text. 
Switching over to just using the URL for my message body as below does now create links that actually work when clicked on.....but they aren't parsed by the Jira Slack app to display the rich content block.  

Screenshot 2022-03-23 111857.png

Screenshot 2022-03-23 112226.png

Typing /jira preview in my personal chat does show that messages sent to this channel are turned on, so I'd expect that the links should be getting parsed by the Jira Slack app, correct? I'm hoping for an end result where the cards show up as they do below, instead of just the plain URLs that I'm currently getting. 

Screenshot 2022-03-23 112950.png

Suggest an answer

Log in or Sign up to answer