Using ScriptRunner for JIRA (Server), I want to create a custom field (HTML) that shows the ID and Summary fields of the child issues in the epic. How would I get that list of data using JIRA's API?
Ended up solving it myself:
import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.issue.link.IssueLinkManagerimport com.atlassian.jira.issue.link.IssueLinkTypeManagerIssueLinkTypeManager issueLinkTypeManager = ComponentAccessor.getComponent(IssueLinkTypeManager)IssueLinkManager issueLinkManager = ComponentAccessor.issueLinkManagerdef sb = new StringBuilder()def linkType = issueLinkTypeManager.getIssueLinkTypes(false).find{ it.name == 'Epic-Story Link' }def issueLinkList = issueLinkManager.getOutwardLinks(issue.id).findAll{ it.getLinkTypeId() == linkType.getId() }for (issueLink in issueLinkList) { def childIssue = issueLink.getDestinationObject() sb <<= '<a href=\'https://projects.jtafla.com/browse/' sb <<= childIssue.getKey() sb <<= '\'>' sb <<= childIssue.getKey() sb <<= '</a> (' sb <<= childIssue.getSummary() sb <<= '), '}return sb