Forums

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

JQL to find issues that don't have links of a specific type

Kelly Arrey
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 14, 2021

We've defined a Link Type called "contains <-> belongs to" so that we could build an issue hierarchy where Initiatives "contain" Features, and Features "belong to" Initiatives. I want to query for all Features that don't belong to an Initiative.  What I would like to write is something like:

type = Feature AND (issueLinkType != "belongs to" OR issueLink is EMPTY)

 but that's not valid JQL.

Any thoughts? What am I missing? Is there a Marketplace app that will support these semantics (not necessarily this syntax)? Thanks for any ideas you can offer.

3 answers

3 accepted

2 votes
Answer accepted
John Funk
Community Champion
July 14, 2021

Hi Kelly,

Try this: type = Feature AND (issueLinkType != "belongs to" OR issueLinkType is empty)

Kelly Arrey
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 14, 2021

Doh! Thanks John.

Interestingly, the documentation says the IS operator is not supported for issueLinkType. That'll teach me to believe the docs :-(

Like John Funk likes this
Dave Bosman [Realdolmen]
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 14, 2021

@Kelly Arrey 

For server and datacenter it really is not supported. That is why i used '=' in my reply. 

Kelly Arrey
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 14, 2021

Good one!  Thanks again.

1 vote
Answer accepted
Dave Bosman [Realdolmen]
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 14, 2021

Hi @Kelly Arrey 

First of all you should always get an error that says what you are doing wrong. 

Out of the top of my head i would think the query you are looking for is  

type = Feature AND (issueLinkType != "belongs to" OR issueLinkType = EMPTY)

Regards

Dave

Kelly Arrey
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 14, 2021

Thanks Dave.

0 votes
Answer accepted
Kelly Arrey
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.
November 12, 2021

Update: The reason I couldn't get this work is because of JRACLOUD-73640.

Fortunately, there is a workaround:

  • define the following filter: `issueLinkType = "belongs to"`
  • I saved it under the name `has belongs to link`

Then, the filter I was originally trying to write can be expressed as:

type = Feature AND (filter != "has belongs to link" OR issueLink is EMPTY)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events