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.
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
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.