Query for Top-Level Issues

Hi,

I would like to query for issues without parent issues. I checked the documentation (http://confluence.jetbrains.com/display/YTD5/Search+and+Command+Attributes) but could not find a way to express it. I expected something like "link: {}" or "parent for: none" but had no luck.

Does anyone know of a way to search for issues without parents (or without other forms of links)?

sven
0
9 comments
Hi Sven,

Here is the query which excludes issues with links:
has: -links

Here is the query which excludes parent tasks:
has: -{Parent for}
0
Avatar
Permanently deleted user
Hi Andrey,

thanks for your answer. Worked like a charm. And now that I know what to look for, I see the feature is documented (brief, but readable). See http://confluence.jetbrains.com/display/YTD5/Search+and+Command+Attributes#SearchandCommandAttributes-GeneralSearchAttributes first entry.

sven
0
Sven,

You are welcome. Glad to hear this.
Yes, it's documented, but sometimes it's better to provide an example =)

Thank you.
0

Is this still applicable to the current YouTrack (2025) version? Seems tricky to get it working and I either get all the tickets (for the first query) or none (for the second). 

Can you help me out with the new query here please. I want to build a query that will return the list of top level items (anything! either it be a bug, task, epic etc) for a given project. 

Documentation I found: https://www.jetbrains.com/help/youtrack/server/sample-search-queries.html#searching-multiple-attributes

Seem to talk about the child queries, but not much about the parent, and I'm quite new with YouTrack hence may take longer to figure this out I suppose.

0

Hello,

I'm Lena from the YouTrack Team. 

The has: attribute is still valid in v.2025.1. Here are the corresponding docs: has attribute. I just tested, and the has: {Parent for} search condition returns only the issue which has children. If this query works differently for you, please contact our support using this direct link: https://jb.gg/ytsup

 

0

Hello Lena Vostrikova

Seem to be valid, you're right in that. However,  a “Query for top level” Issues, mean that the issues resulting in a query should not have and links that say “not having sub-task-of links”. 

How is it possible to get that done?

Say, something like:

- ( has: {Subtask of} )


 perhaps…?

0

Hello,

I believe the has: -{Subtask of} search will work for this case. Please check it. 

0

Thank you, Lena Vostrikova . has: -{Subtask of} worked!

 

0

Please sign in to leave a comment.