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 search only parent issues in JIRA?

Nikhil Bhasin Feb 19, 2013

Is there a way where we can only search parent issues and not sub-tasks in a project.

For example: If we have 1000 issues in a project out of which 100 are the parent issues and rest 900 are sub-tasks. SO is there a way to search only those 100 parent tasks in JIRA.

2 answers

5 votes
Nic Brough [Adaptavist] Community Leader Feb 19, 2013

Yes, select by issue type. Use "issuetype = A, B, C" where those three issue types are parent types.

JQL in later versions makes this more easy:

issuetype not in subtaskIssueTypes()
Nikhil Bhasin Feb 19, 2013

This is not helping me as I have 'Bug' issue type as a parent issue and 'Bug' as a subtask as well.

So its difficult to differentialte parent issues and subtasks on the basis of issue types :)

JamieA Feb 19, 2013

or "issuetype in standardIssueTypes()"

If you use the function it should not matter if you have Bug as subtask and parent type.

Nic Brough [Adaptavist] Community Leader Feb 19, 2013

Um.

>as I have 'Bug' issue type as a parent issue and 'Bug' as a subtask as well

No, you don't. Probably. Issue names *must* be unique in Jira. I suspect you've probably got something like "Bug" and "Bug." or " Bug" (note the whitespace). If you have really got two issue types with the same name, then you've hacked something and you really do need to rename them to be unique or you'll run into problems.

The JQL will work, but I'm not sure exactly which version that function arrived in.

Nic Brough [Adaptavist] Community Leader Feb 19, 2013

Oops, thanks Jamie - I've only ever used "in subtaskType". Should have realised there was a similar one for parent types.

0 votes
rafael.angel May 22, 2016

If you know the parent issue and the project you can use the following advanced search through JQL:

project = <project KEY> AND parent = <issue KEY>

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Next-gen

Introducing subtasks for breaking down work in next-gen projects

Teams break work down in order to help simplify complex tasks. This is often done iteratively, with tasks being broken down into smaller tasks and so on until the work is accurately captured in well-...

6,309 views 22 31
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