I need to filter through the external links for selected jira issues and where the Page title has the right prefix then display this link in a custom field.
I have the following scripted field running but I cannot get the page title returned when I call getTitle(), it just returns 'page'. The url returns the page ID. How do I get the page title of the Confluence page to return so I can check it contains the string i am looking for?
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.link.RemoteIssueLinkManager
def sWrite
def issueLinkManager = ComponentAccessor.getIssueLinkManager()
ComponentAccessor.getComponent(RemoteIssueLinkManager).getRemoteIssueLinksForIssue(issue)?.find {
if(it.applicationName.contains("Confluence")){
sWrite = "<a href='" + it.url.toString() + "' target=_blank>"+ it.getTitle() + "</a>"
} else
return null
}
return sWrite
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.