Trying to find issues with no child links

Donald Jones April 4, 2013

I am trying to write a query that finds all issues in a project which have no 'is parent of' links to a child issue.

The only JQL function that I have found which lets me query links for an issue is linkedIssues(key), or linkedIssues(key,type).

However I cannot make this work.

It seems that I need a Query function which works as:

getLinkQty()

or getLinkQty(type)

In both cases it would return the number of links of type that an issue has.

This would let me build a query such as:

project = LFEAT AND issuetype = HLR and getLinkQty('is parent of')!=0

Is there such a function available, or is there an alternate way to build a query in JQL which can satisfy this?

Curently using JIRA 4.1, but upgrading to JIRA 5.0 soon.

2 answers

1 accepted

3 votes
Answer accepted
Danielle Zhu
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 4, 2013

JQL Tricks plugin should do the trick. It's a paid plugin though. It looks like Search Linked Issues for JIRA will also work for you:

issue in/not in linkedIssuesFromQuery("JQL query", "relation name","direction of relation") - finds all issues which are linked by w specified relation with those found by specified query

Donald Jones April 9, 2013

I went with the Search Linked Issues for JIRA solution and after a bit of head scratching managed to get it to work.

Thanks for the quick answer.

Danielle Zhu
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 9, 2013

Glad it worked!

0 votes
Pete Singleton
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 30, 2020

Strange that this thread says "Solved" but there is no solution posted!!

Suggest an answer

Log in or Sign up to answer