Is there a way to add Web link (Remotelink) using Automation for Jira

Joao Zampa August 10, 2020

My goal is to add to each story a link that developers can use as a resource.
I want to accomplish this by using automation for Jira App and I think my struggle is to find out what is going to be the JSON payload that I should use to make this happen.

Any idea?

Appreciate guys!

8 answers

1 accepted

1 vote
Answer accepted
Andreas Knecht
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 10, 2020

Hi Joao,

Unfortunately this isn't supported yet: https://codebarrel.atlassian.net/browse/AUT-176

It will probably be a while before we can get to implementing this.

Cheers,
Andreas

Joao Zampa August 11, 2020

Thanks anyways.

Danielle Dunn August 12, 2020

Up vote. It's not pretty but if the link is consistent you can drop it in the description.

Joao Zampa August 12, 2020

Yeap, that is what I will do as a workaround, but not what I was hoping :-) 

Appreciate the suggestion.

Albert Wang November 18, 2020

Need it also

Like # people like this
Nadiya Torous February 8, 2021

Need it also to automate the document links based on the Component of the ticket. This should be a resource document for the dev. Need to manage it with the automation rules, no way we go ad a document each time a  new ticket is created

etienne Borella February 20, 2021

We had the same need on our side. As a workaround, we covered it this way:

we created a label custom field "application" (11352 below), with the confluence page id appended after the label name itself. I can't remember why we didn't use the components field though 

We created a text field "Confluence page(s)" (11357 below)

we created an automation where each time the "application" field is edited, the "Confluence page(s)" is overwirtten by adding links to pages formed this way:

{ "fields": { "customfield_11357": "{{#issue.customfield_11352}} https://<confluence base url>/wiki/spaces/<documentation space key>/pages/{{value.right(9)}} \n {{/}}" }}

way from ideal, labels are cluttered with pages ids, custom confluence link instead of built-in links, and links are "raw" (not displaying the page title) ... just a workaround

Like # people like this
Nadiya Torous March 18, 2021

We used the solution proposed by Etienne Borella, it helps a lot, just as you said the link to the page is displayed as URL not an embedded Confluence link, still a good workaround

MrUpsidown August 12, 2022

One more customization I wanted to implement since I started with Jira only to find out ONCE AGAIN that this is not feasible. Every single time I am trying to do something that goes off the main road I find myself looking at aging feature requests and bug reports. And you say Jira is FLEXIBLE???

Like # people like this
6 votes
David Hoffman September 10, 2020

How can I upvote this to indicate our desire for Atlassian's JIRA development team to prioritize this feature?  Our team would like this implemented sooner rather than later?

3 votes
Dimitri Rupp June 7, 2021

This option in the Automation is needed because it allows connecting to knowledge resources such as Confluence directly while creating the new issue.

It is not only needed in Jira Service Management, but it is also needed in all Jira projects:

- add Link to Confluence page

- add Link to PDF File

- add Link to the online registration form

- and many others

Is there a chance to put this feature request back on the roadmap? :)

Thanks a lot. Dimitri

1 vote
John Yarborough September 22, 2022

I know this is old but it seems like it is still a common issue and I have developed a workaround using Jira automation to call out to Power Automate.  I think it could be possible within the Jira automation directly using web requests without needing Power Automate, but I'm not sure how clean it would be.

For my scenario, I wanted to generate documents in SharePoint that relate to the issue and then link the documents back to the Jira issue as remote links.

Here is the high level workflow I used:

1. Jira automation called "Generate Documents" that a user would run from the issue when they are ready.

2. The automation calls an HTTP request trigger in a Power Automate flow passing in the Jira issue.

3. The Power Automate flow does all the magic of getting more details from Jira through the API, creating a folder structure, creating documents, etc.

4. For each document that gets created, I use the API (Issue remote links) the check to see if there is already an existing remotelink with the same name to avoid creating duplicates, and if not, I create a remotelink to the document.

Like I said, if you don't care about checking for duplicates or have complexity around creating the documents, you could probably just use a step in the Jira automation itself to call the API and create the link.

I also saw mention of needing the JSON object format to create a remotelink.  To find it, I basically created a new remotelink, queried it with the API to get it as a JSON object, and then simplified it after some trial and error.  The API here does allow for some quirky behavior like if you format a link wrong, it still allows you to create it but it doesn't show up in the issue and can only be seen through the API call to get remotelinks.

Anyway, here is what seems to work for me.  Note you will want to replace the url and title values with your own and maybe play around with the icons.

{
"application": {},
"object": {
"url": "https://link.to/the/document",
"title": "Name of the Document",
"icon": {
"url16x16": ""
},
"status": {
"icon": {
}
}
}
}

Hope it helps!

1 vote
Nadiya Torous February 8, 2021

Need it also to automate the document links based on the Component of the ticket. This should be a resource document for the dev. Need to manage it with the automation rules, no way we go ad a document each time a  new ticket is created

0 votes
Stephen Coleman May 26, 2023

As a workaround, Jira automation can make an API calls to Jira's APIs using the "Send web request" automation to create a remote issue link.

API documentation here:
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-remote-links/#api-rest-api-3-issue-issueidorkey-remotelink-post

Wakefield Travers March 19, 2024

This is a good solution if you know the Service Portal URL. I have a use case where the automaton rule will need to link to a Service Portal issue of an issue that was created during the automation run. 

Stephen Coleman March 21, 2024

@Wakefield Travers 

This mirrors our use case. We use a branch rule after task creation aimed at the most recently created issue.

Then reference the smartvalues {{issue}} within the branch.

So for example, the endpoint for the call is "https://yourinstance.atlassian.net/rest/api/3/issue/{{issue.key}}/remotelink"

 

Like Wakefield Travers likes this
Wakefield Travers March 21, 2024

This is fantastic and worked perfectly. Thank you! 

0 votes
Asim K
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 29, 2021
0 votes
Grete Merlyn June 3, 2021

I would upvote too! And why is this solved?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events