Grandchildren tickets

I need to show the Grandchildren tickets which is a pain but necessary sometimes. I cam up with this script - I know it needs some polishing but here is my script

package com.onresolve.jira.groovy.test.scriptfields.scripts

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.Issue;

def issueLinkManager = ComponentAccessor.getIssueLinkManager()
def customFieldManager = ComponentAccessor.getCustomFieldManager()

def issuelist = []
assert issuelist.empty

// loop through linked tickets
issueLinkManager.getOutwardLinks( {issueLink ->    
    // get parent Object - not sure why but this works
    if ( == "Parent") {   
        // get child object                        
        def child = issueLink.destinationObject
        // loop through child links
        issueLinkManager.getOutwardLinks(  {cissuelink ->
            // get grandchildren links
            // my issue types are Control
            if ( == 'Control') {
                // add to list
// return grandchildren list
return issuelist

Hi jkocen,

Thank you for your script! I will ensure this is forwarded to the team.

Have a great day!


This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.