Query for "Leaf" Stories
I'm trying to build a query to find all "leaf" stories in a sprint -- those stories that have no child stories. I started with:
Planned For > Name contains <Sprint> AND Type is Story AND Status is Unresolved I want to add: AND (Children do not exist OR Child > Type is not Story) First, does this sound like the right logic? Second, I'm not sure how to build this parenthetical OR block using the query editor. Thoughts? Thanks, Chris |
3 answers
Geoffrey Clemm (30.1k●3●30●35)
| answered May 03 '12, 2:02 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Adding a block is easy. In the Eclipse query editor, click on the triangle, and select the choice that says "add AND/OR group".
Adding a children constraint is also easy ... in the Eclipse query editor, when you click on the + sign icon, it will show the Add_Contributor wizard, and select the "Show Relations" radio button. But unfortunately, the Relations condition is a "there exists" condition, not a "for all" condition. so what you will get is "there exists a child whose state is not story" ... which isn't what you want. So I don't think you can use the query editor to build this query. Cheers, Geoff I'm trying to build a query to find all "leaf" stories in a sprint -- those stories that have no child stories. I started with: |
I must be missing something, Geoff. I don't see these things you mention (we are on RTC 3.0.1.3). If I click +, I get the Add Conditions dialog, not a wizard. If I click the down pointing triangle, I can select Add Conditions, or any of several groups. I don't see Show Relations.
The query editor does have the conditions I want: Children do not exist Child > Type is not Story Hmmm...Maybe I can break up the logic. If I add a second AND group, what is the relationship between the two? Is it Group A OR Group B? If so, I could do: Planned For > Name contains <Sprint> AND Type is Story AND Status is Unresolved AND Children do not exist OR Planned For > Name contains <Sprint> AND Type is Story AND Status is Unresolved AND Child > Type is not Story Chris |
I think I got it. I noticed a nesting relationship in the query editor, so I created an outer OR group with two inner AND groups to create the logic I listed in my previous posts.
Chris |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.