Forums

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

Not all items in issue links section are the same

SJ
Contributor
March 1, 2022

I have an automation that creates a confluence page when an issue is assigned and creates  a Confluence URL link to that page in the Jira issue links section. like below.

2022-03-01 10_37_13-Window.jpg

The problem I'm having.  I can't find a method to access the confluence url after it is created.  All of the methods for linked issues cant see the confluence URL.  

Any help is appreciated

3 answers

1 accepted

0 votes
Answer accepted
David Fischer
Community Champion
March 2, 2022

Links to a Confluence page are not issue links but remote links. They are not accessed the same way.

JMWE offers a "simplified API" for accessing the remote links of an issue:

issue.getRemoteLinks("APPNAME")

In your case, the APPNAM is likely to be "confluence", so:

issue.getRemoteLinks("confluence") 

 Then, to get the first link's URL:

issue.getRemoteLinks("confluence")?.first().url
SJ
Contributor
March 3, 2022

That works! 

Thanks!  I've been working with Groovy for a week and this api for a few days so this is a big help! 

0 votes
SJ
Contributor
March 2, 2022

The link is accessed through the JMWE api with getOutwardIssueLinks()

The challenge now is to convert this result

[com.atlassian.jira.issue.link.IssueLinkImpl@5e225c23[id=15284,sourceId=21108,destinationId=21176,issueLinkType=10200]

Into a usable URL that I can assign to a text field.

0 votes
Will Balson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 1, 2022

Hi there,

I'm not sure whether you're on Jira Cloud or Server/DC, but it's possible that the API endpoint you're looking for is /issue/FAKE-123/remotelink

On Jira Server, that endpoint returns info about "Wiki page" (Confluence page) links that are on the desired issue. 

I'm not as familiar with Cloud, but if this endpoint isn't returning what you need, it's possible that Atlassian did not build an endpoint for Confluence links - https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-links/#api-rest-api-3-issuelink-linkid-get

SJ
Contributor
March 2, 2022

First, thanks for responding!

I am using Jira server and Jira data center

The stubborn link in question was created using AutoPage to create a confluence page on the issue event of being assigned to someone.

I have tried getting the wiki page url's for an issue and get null strings or empty lists in return. 

what's really odd is when I export the issue to XML or Word the "Confluence URL" link doesn't show up at all.

Suggest an answer

Log in or Sign up to answer