Search for the linked issuetype ( no matter what type of link it has)
Pull the result content : Issue id and summary
Current code an give only the number specific of linked issues, but cannot write the issue id
import com.atlassian.jira.component.ComponentAccessor
def issueLinkManager = ComponentAccessor.getIssueLinkManager()
def issueLinks = issueLinkManager.getInwardLinks(issue.getId())
def issueLinks1 = issueLinkManager.getOutwardLinks(issue.getId())
def subElements = issueLinks.findAll { it.issueLinkType.name =='UseCase_Link'}
def subElements1 = issueLinks1.findAll { it.issueLinkType.name =='UseCase_Link'}
log.error(subElements)
return subElements.size()+subElements1.size() as Double