Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Get Issues In Epic in Scripted Field

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?

1 comment

Ended up solving it myself:


import com.atlassian.jira.component.ComponentAccessor

IssueLinkTypeManager issueLinkTypeManager = ComponentAccessor.getComponent(IssueLinkTypeManager)
IssueLinkManager issueLinkManager = ComponentAccessor.issueLinkManager

def sb = new StringBuilder()

def linkType = issueLinkTypeManager.getIssueLinkTypes(false).find{ == 'Epic-Story Link' }
def issueLinkList = issueLinkManager.getOutwardLinks({ it.getLinkTypeId() == linkType.getId() }
for (issueLink in issueLinkList) {
def childIssue = issueLink.getDestinationObject()
sb <<= '<a href=\''
sb <<= childIssue.getKey()
sb <<= '\'>'
sb <<= childIssue.getKey()
sb <<= '</a> ('
sb <<= childIssue.getSummary()
sb <<= '), '
return sb
Like # people like this


Log in or Sign up to comment

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you