How to query same property on workitems and on linked workitems within a query expression?
We are using parent/child relationships to break down your work from plan items (e.g. Theme) down to Epics and Stories.
I now like to have a query where I find all children which are not planned for same Iteration than it's parent. I try to setup the following query:
Is this a defect?
I now like to have a query where I find all children which are not planned for same Iteration than it's parent. I try to setup the following query:
Type = Epic AND PlannedFor=MP2 AND Children.Type=Theme AND Children.PlannedFor=MP1.1
BUT: what happens is, as soon as I select Childern.PlannedFor the selected field in the expression of the parent is also changing to Children.PlannedFor automatically so I get following nonsens:
Type = Epic AND Children.PlannedFor=MP2 AND Children.Type=Theme AND Children.PlannedFor=MP1.1
Is this a defect?
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Jan 10 '13, 10:46 a.m.Hi Guido,
today, the query designer of RTC (and most other products I know of) don't support creating queries that are that kind of nested, trying to evaluate for (work item condition ) And (for all children(nested condition)) or (work item condition ) And (if exist all children(nested condition)). There are a couple of work items that request that kind of capability though.
Guido Schneider
Jan 10 '13, 10:58 a.m.CQ is able to do.
The silly thing is, you can add the children property in the expression editor, get the select box for the iteration but as soon as you click in the this box it change the setting in the header of the box of the parent.
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Jan 10 '13, 11:03 a.m.I have been told you would have to use SQL in CQ to do that kind of stuff, but I don't claim to be an expert. I tried some of the obvious queries that fall into these categories and I have found, I think I remember, that RTC can follow the link and always returns the parent if one qualified child exists.
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Jan 10 '13, 11:05 a.m.Here is an interesting article: https://jazz.net/library/article/1007
Christian Imfeld
Jan 11 '13, 7:41 a.m.It seems the problem raises only after I save the query. As long as I'm in unsaved mode the query works
Christian Imfeld
Jan 12 '13, 10:07 a.m.Hello
Here are my final investigations ...
(A) The query works within the query builder, incl. one-level relationships (to Parent or Child). I didn't try two or more levels (even not sure if this is possible). The query works (within the query builder) as long you never save the query. Also the displayed content within the query builder is correct, e.g. the box with the parent-relationship shows "Parent->Type".
(B) The query still works if you save the query once within the query builder; even if the displayed content isn't correct anymore. The box with the parent-relationship doesn't show anymore the relation, e.g. "Parent->Type" wll display only "Type". BUT the query is working as expected and can be used within dashboards etc.
(C) As soon as you hit the save button again, the query doesn't work anymore as expected. It still shows the same wrong content in the query builder as described in section (B), but now the query doesn't work anymore as expected.
Christian Imfeld
Jan 12 '13, 10:08 a.m.Workaround: If you want to modify/change a query, execute your changes, press the save button; setup the correct query again (by selecting the relationships, etc.) and press the save button once again (and only once :-)
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Jan 12 '13, 10:52 a.m.I would suggest to create a PMR or defect then. It does not seem to make sense a query works in the query builder and not if you save it.