Jazz Register Log in
Jazz Forum Welcome to the Jazz Community Forum

Welcome to the Jazz Community Forum

Connect and collaborate with IBM Engineering experts and users

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

0 votes



3 answers

Permanent link
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:

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

0 votes


Permanent link
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

0 votes


Permanent link
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

0 votes

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: May 03 '12, 12:09 p.m.

Question was seen: 4,106 times

Last updated: May 03 '12, 12:09 p.m.

Confirmation Cancel Confirm