I'm attempting to pull only the linked issues and not subtasks into a custom email using scriptrunner.
Found this script from a different post:
<ul>
<%
def outwardlinks = com.atlassian.jira.component.ComponentAccessor.getIssueLinkManager().getOutwardLinks(issue.getId())
def oCounter=0
def iCounter=0
// Check for Outward Links...
if (outwardlinks)
for (id in outwardlinks) {
def linkedissueKey = com.atlassian.jira.component.ComponentAccessor.getIssueManager().getIssueObject(outwardlinks[oCounter].destinationId).key
def linkedissueSummary = com.atlassian.jira.component.ComponentAccessor.getIssueManager().getIssueObject(outwardlinks[oCounter].destinationId).summary
def linkedissueStatus = com.atlassian.jira.component.ComponentAccessor.getIssueManager().getIssueObject(outwardlinks[oCounter].destinationId).status.name
out << "<li><a href='https://jira.domain.com/browse/"+linkedissueKey+"'>"+linkedissueKey+"</a> "
out << "("+linkedissueStatus+"):"
out << linkedissueSummary+"</li><br>"
oCounter ++
%>
</ul>
...it works, but it is still pulling ALL "linked" issues...subtasks as well as linked tickets from other projects.
How can this be tweaked to only pull linked issues?
Thanks