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

How to find all the child issues for a given parent ? Edited

Sample_Issue_Types_Returned.pngI am using the below REST URL to get issue details

https://jira2.xxx.com/rest/api/2/issue/SOARCLIN-35858?fields=*all

I am getting most of the issuelinks execpt "is a parent of" and "is a child of" . Other issuelinks are returned by server like

  1. "is blocked by"
  2. "was introduced by"
  3. "is a patch of"

This SOARCLIN-35858 ( JIRA Key)  has a child issue linked with it and it's showing in JIRA user interface but while I am hitting the REST URL , it's not giving me the "is a parent of" and "is a child of" linked issues.

What I need to do to get parent/child linked issue ?

Please find the attachment for better visualization. JIRAISSUE.png

1 answer

1 accepted

0 votes
Answer accepted
Andy Heinzer Atlassian Team Jan 15, 2020

Hi,

I understand that you are looking to find all the child or parent issues of a given issue in Jira.  However the way that your Jira site appears to be showing this relationship is rather different than what I expected here. 

Jira natively has the ability to create subtasks.  These are child issues to a parent.  They don't exactly appear in the issue links, instead they have their own section on the parent issue page.  In your case, it looks like either some person or some plugin in Jira has created these issue link types of 'is a parent of' and 'is a child of'.

I would be interested to first learn if these issue link types are defined in the admin panel of Jira.  If you are a system admin in Jira you can go to /secure/admin/ViewLinkTypes!default.jspa to see a list of all the link types in Jira.   Alternatively, a REST API get call to GET /rest/api/2/issueLinkType could tell us all the issuelinktypes as well.

If we don't see the linktype in either of those locations, then perhaps you have some plugin in Jira that is making this linkage in another manner and just displaying it here, but I'm not sure what plugin would do that.

Alternatively, you could use the linkedIssues() function to find all the issues with a specific linktype to that issue. 

In a case link yours you could use a JQL syntax of:

issue in issuelink("SOARCLIN-35858","is a parent of")

Which in turn should return all the issues that link to that specific issue with that directional link type.  You can make these kinds of JQL searches via the REST API endpoint GET /rest/api/2/search.

Try this out and let me know the results.

Cheers,

Andy

Hi Andy,

Thanks a lot for your help. It worked !!!!

Now I am using

https://jira.xxx.com/rest/api/2/search?jql=issuekey in parentIssuesOf("SOARCLIN-36003") and which is returning the parent child relationship.

Cheers,

Santanu

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Are you giving proper attention to your non-billable efforts?

  It happens all the time: when planning project activities managers and team leaders tend to give more attention to the billable efforts, those ones the customers will pay for. But we all know...

73 views 0 0
Read article

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