Search query does not return expected result

Hi, let's say we have query like

Subtask of: (Type: Bug )  

When the issue is subtask of another one (with defined type)  but from different project - it won't be shown in results. Is it expected?

0
11 comments

Hello,

I'm Lena from the YouTrack Team. 

Could you please ensure that you don't use this filter in the context of any project, e.g. as in the screenshot attached?

0

Actually I do. I want to find all issues in Project1 which are subtasks of other issues of Type: Bug, including ones from different projects.

0

Hi,

The thing is that if you have a project filter, it is applied to the result. You will see the issues only from the specified project. For your case, please use the following filter:

Use your project name instead of the "Demo project". 

0

it seems we have a misunderstanding here...

let me explain with more details. Consider we have projects like p1, p2 and a bunch of issues like p1.i1, p1.i2, p1.i3, p2.i4. Relationships are as follow:

p1.i2 subtask of p1.i1

p1.i3 subtask of p2.i4

p1.i1 and p2.i4 has the same type, let it be 'global'.

Now I need to find all issues in p1 which are subtasks of any other issues with type 'global'.

When I use search query (Subtask of: (Type: Global ) ) in p1, I get only p1.i2 issue in the results, but where is p1.i3? 

0

Hi.

To give you an example, this is the expected result you are describing.

P1-2 is a subtask of P1-1, which has the Global type. P1-3 is a subtask of P2-4, which also has that type. Meaning that the previous search returned subtasks of parent tasks from 2 different projects.

And in the situation where issue relations are exactly as you described, it shouldn’t make any difference if you set Everything or Project 1 in the search context:

 

So this search (Subtask of: (Type: Global)) should work for your purpose here. If it doesn’t, can you please send us a screenshot of your search query and the results it returns?

0

Hi, so here is query:

as you can see 182 issues were found, but this one is missing in results:

and pmo issue is like this

 

0

Hi,

Please note the search context you are currently using: <screenshot>

It works as a filter for the results of the search query. Only issues from the Awesome Team project are returned. The issue you are referring to (PMO-291) belongs to a different project and hence is filtered out. I suggest setting the search context to Everything (or to a saved search that includes that project).

0

I don't need PMO-291 in results, I need AWT-283 which is subtask of PMO-291. Actually even with Everywhere context it won't show up. I've tried.

0

I see. Thank you for the clarification.

AWT-283 is a subtask of PMO-291. Meaning that [Type]: Epic and [Status]: In Progress should match PMO-291—only then can the query return AWT-283.

I can see from your screenshot that there are no fields with these names in PMO-291. It could be due to the localized field names, but I suggest you check if these are the exact fields ([Type] and [Status] from your query) that are used in this project (PMO). In case the fields do not match, you can expand the query to include the field name and value from PMO. Custom fields can be checked in Administration > Custom Fields > Fields List, or project-specifically in Edit Project > Fields.

Just to be on the safe page, can you see the issue (PMO-291) when you search for it independently, without any queries and search contexts? This is to ensure that the issue is visible to you individually. (You did provide the screenshot of that issue view, so most likely it is, so this is just to double-check and cross out this possibility.)

0

I can see PMO-291, in search results and in project, so this is not the permission issue.

Just checked custom fields - yes, for some reasons in AWT project fields named in English, and in PMO - in Russian,  but values are identical...

I changed query to 'Подзадача для: (([Type]: Epic и [Status]: {In Progress} ) or тип: Epic) [Status]: -Closed -{On Pause}   сортировать: [Priority] по убыв. ' and now I can see AWT-283 in results.

Thanks.

0

Glad to help. Have a great week!

0

Please sign in to leave a comment.