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

JQL query where tickets DO NOT match an issueLinkType in Jira Cloud

I was excited to see that the Jira Cloud now supports JQL queries with issueLinkType.

The following query gives me all Story tickets related to another ticket:

type = Story AND issueLinkType IN ("relates to")

However, I can't get the opposite, Story tickets that are not related to other tickets, when I use the following JQL

type = Story AND (issueLinkType NOT IN ("relates to") OR issueLinkType IS EMPTY)

Instead, the above gives me all story tickets. Any idea what I'm doing wrong?

3 answers

0 votes
Jack Community Leader Nov 14, 2019

Hi Kevin,

i too am glad to see this feature. I just ran a quick test and "seemed" to work for me.

this query - type = task and issueLinkType not in ("relates to") - returned 142 items

this query - type = task and issueLinkType in ("relates to") - returned 538

 

now I have not scrutinized the results and TBH would have expected many more than 142 in the first. the one big difference in your is that you are including empty which would i think return any issue w/o a link. is that what you were going for or do you want all issues w/ links that are not "relates to"?

It's odd, when I try the following I get no results back:

 type = Story AND issueLinkType not in ("relates to")

What I've actually done is created a new link type call "Tests" with "tests" and "is tested by" as directional links.

We use Zephyr to create test tickets in our Jira. In order to determine which user stories have test tickets associated I run the query:

type = Story AND issueLinkType in ("is tested by")

That query works great and we save it as a filter and use it on a Confluence page to report on Story tickets with tests.

But when I want to search for Story tickets that do not have tests attached, so informing the team we have a gap in test coverage, the following query does not bring me back any results:

type = Story AND issueLinkType not in ("is tested by")

Kevin, it looks like this same issue of !=/NOT IN not working with issueLinkType was raised in JRACLOUD-25640, but there haven't been any updates since Nov. 11th.

The not in / != bug seems to have been raised here: JRACLOUD-73640.

Go vote!

Suggest an answer

Log in or Sign up to answer
TAGS

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