How to search for work items with children status new and planned for some iteration?

Hi,
I want to formulate a RTC query for work items having children satisfying two conditions: The child should be in status "new" and planned for a specific iteration.
At first glance this can easily be done using the query editor in the web UI: Create a condition for "children -> status" and another condition for "children -> planned for", and connect these two condition using "AND, all must match".
If you execute such a query you'll realize that the result does not match what you'd intuitively expect: It seems that the query is interpreted such that a work item is in the result set if there exists at least one "satisfying" child for each condition.
So here is my question:
How can a query be formulated such that each of the conditions of the form "children -> xyz" are tested against a single work item? (I.e. a work item should appear in the result set if there exists at leas one child which satisfies ALL conditions of the form "children -> xyz").
Thanks for your help!
Markus
I want to formulate a RTC query for work items having children satisfying two conditions: The child should be in status "new" and planned for a specific iteration.
At first glance this can easily be done using the query editor in the web UI: Create a condition for "children -> status" and another condition for "children -> planned for", and connect these two condition using "AND, all must match".
If you execute such a query you'll realize that the result does not match what you'd intuitively expect: It seems that the query is interpreted such that a work item is in the result set if there exists at least one "satisfying" child for each condition.
So here is my question:
How can a query be formulated such that each of the conditions of the form "children -> xyz" are tested against a single work item? (I.e. a work item should appear in the result set if there exists at leas one child which satisfies ALL conditions of the form "children -> xyz").
Thanks for your help!
Markus
2 answers

Hello Markus,
I would say that a query with the 2 above conditions :
a condition for "children -> status" and another condition for "children -> planned for", and connect these two condition using "AND, all must match"
should work.
Are you able to extract a sample use case that exhibits unexpected results?
If so, feel free to open a new defect.
Eric