The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Retrieve Confluence links in scripted field in the Issue

Avinash Prasad
July 16, 2018

Hi,

 

How to retrieve the Confluence links in an issue to scripted field ?

Thanks

 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

2 votes
Thanos Batagiannis _Adaptavist_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
July 16, 2018

Hi Avinash.

If this is a ScriptRunner scripted field then you can access the remote links and find those where the application name is Confluence, something like 

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.link.RemoteIssueLinkManager

ComponentAccessor.getComponent(RemoteIssueLinkManager).getRemoteIssueLinksForIssue(issue)?.findAll {
it.applicationName == "Confluence"
}

Please let me know if this does the trick, 

Regards, Thanos

Avinash Prasad
July 16, 2018

Hi @Thanos Batagiannis _Adaptavist_,

Thank you for the reply.

How to print the title of the page (hyperlinked) as the output of the scripted field  ? 

TAGS
AUG Leaders

Atlassian Community Events