Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Fetch all child links of Feature Issue type

Jyoti Kumari
Contributor
March 28, 2025

Hello Everyone,

 

A 'feature' issue type named as 'A-123' issue is linked to 'epics' issues by 'Parent link' field, so one epic issue which is children of issue 'A-123' is now converted to task issue  type(B-567), so in issue from jira GUI  issue 'B-567' is not visible but from scripting code ,it is still returning as children.Kindly resolve how to fix these issue children should not return issue 'B-567'.Please find code snippet below-

 

-------------------------------------------------------
def getChildren(issueId, Logger logger, linkType,IssueLinkTypeManager issueLinkTypeManager,IssueLinkManager issueLinkManager) {
def childLinkTypes = issueLinkTypeManager.getIssueLinkTypesByName(linkType)
if (childLinkTypes) {
Long linktypeID = childLinkTypes[0].id
def linkedStories = issueLinkManager.getOutwardLinks(issueId).findAll { it.linkTypeId == linktypeID }*.destinationObject
return linkedStories
}

 

return null
}
--------------------------------------------------------------
call above method:-

children = getChildren(issue.id, logger, 'Parent-Child Link',issueLinkTypeManager,issueLinkManager,user,issueManager,issue)

 

Thanks and Regards,

Jyoti

1 answer

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 28, 2025

Hello @Jyoti Kumari 

I don't have an environment to test this, but this is my suggestion.

In the future if the Epic has child issues, remove those children before you change the Epic issue type. Then remove the Epic as a child of the feature. Then convert the Epic to the new issue type.

To fix the state you are in now, convert the issue back to an Epic. Then remove the Epic as a child of the feature. Then convert it again to a Task.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
9.12.19
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events