How do I find bugs with no links?

I'm using the Greenhopper Scrum board to group sprint items into swimlanes by story (using JQL queries to group them), on AOD.

I want to group all the bugs that are not linked to stories within my sprint into a Bugs swimlane so they aren't under the 'Everything Else' swimlane - there are other items in that such as tasks and improvements not currently related to stories.

Is this possible via JQL? I don't seem to be able to do a catch-all JQL query for issues that have no links - along the lines of "issuelinks is empty" or "issuelinks is null"

Being able to say "issuetype=bug and ISSUE is not linked" would be nice. Is there some way to do this on AOD at the moment?

3 answers

If you have groovy script runner it has few really usefull JQL functions. hasLinks is one of them :)

Unfortunately you can pass only one link type to this function so the JQL for this would be:

issuetype = Bug and issueFunction not in hasLinkType("Blocks") and issueFunction not in hasLinkType("Cloners") and issueFunction not in hasLinkType("Relates") and issueFunction not in hasLinkType("Duplicate") and issueFunction not in hasLinkType("Epic-Story Link")

Of course if you have more link types you will have to add them to the query to make sure the issue doesn't have ANY of the link types.

The question is about JIRA Ondemand. So you can't use groovy script runner.

Indeed, my bad. I haven't noticed the tag.

Thanks for the mention Blazej. But yes, afaik this is not possible in AOD.

Hi Sandy,

I just found in the Advanced Search Documention following solution

issuetype =Bug and issuekey not in linkissues()

I haven't tried it yet, but it should work.


I tried it now and it is not working. The function linkissues() requires an issue key as parameter.

So I have to change my answer into: No, there is no way to achieve this in Ondemand.


Cheers, Udo

... or

issuetype = bug and issuetype in standardIssueTypes()

to avoid subTaskIssueTypes()

... not tested.

Hmm, I doubt this function "standardIssueTypes()" exists in standard JQL.

But even if it would exists:

If bug is a standard issuetype your query would give you all bugs with or without linked issues.

If bug is a subtask issue type your query would show nothing.

Agree in your conclusion:-) Sorry!

... but the "standardIssueTypes()" exist.

Try typing "issuetype in "

Ah, you are right, but I could not find it in the documentation.

Still searching for a solution to this, if anyone has any other suggestions. Thanks for the efforts so far everyone!

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 16, 2018 in Jira

Looking for anyone who made the switch to Data Center

The Jira Marketing team is putting together an ebook on migrating to Data Center. We're looking for pro tips on how you staffed your project team and organized your Proof of Concept. Share yo...

1,266 views 17 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you