It's all about the answers!

Ask a question

How to configure the query result to show a column with the


Jeremy Hughes (2164837) | asked Jan 16 '09, 8:58 a.m.
Hi,

I'm trying to add a column to the results of a query to show the parent
work item id if one exists. So I've created a query using the eclipse
UI. But, my query's result layout tab doesn't have 'parent' as a
possible column to show in the results. When I go to the web UI, I can
add the parent column in the result layout and the column appears in the
results when I run the query in the web UI.

When I re-open that same query in eclipse, and select the result layout
tab, parent is now listed in the set of columns to display, but when I
run the query in eclipse the parent column doesn't appear in the results.

Also, if I go to the web UI and run the query which I know will match
items that don't have parents, then all's well (each entry in the parent
column has a '-'). If I run a query which I know will match items which
do have parents, then I get a blank page with:

Error! (in large red font)
Gone (regular font)

The eclipse based client doesn't report an error whether the matches
have parents or not.

I also wonder what the possible values are for the column. When you add
a condition to select on the 'parent' then it is a flag saying whether a
parent exists or not. When selecting a condition in eclipse you get many
child properties of 'parent' to select on, you get all those in the web
UI too, but not when you want to add the property as a column (for that
you only get the option of adding 'parent (exists)'. Why can't you add
'parent->id' for example?

Another thing I noticed - when adding the parent exists condition (web
UI or eclipse) you can't say 'parent doesn't exist'.

In summary (and I'm happy to open defects / enhancements where necessary):

1. web UI is inconsistent with eclipse UI in terms of the fields that
can be added to the result layout of a query
2. error in the web UI when a query is run which has the 'parent' field
in its result layout *and* members of the result set have parents.
3. the 'parent' condition in a query matches work items that have a
parent. There seems to be no way of making the condition match work
items that don't have parents.
4. what I really wanted was a column in the result layout showing the id
of the parent, if there is one. There doesn't seem to be a way of doing
this in either UI.

Thanks,
Jeremy

One answer



permanent link
Patrick Streule (4.9k21) | answered Jan 19 '09, 5:58 a.m.
JAZZ DEVELOPER
1. web UI is inconsistent with eclipse UI in terms of the fields that
can be added to the result layout of a query

In the Eclipse UI, links are shown hierarchically: Open the Relationships
dialog and select the links that you are interested in.
Some alignment work in this area is planned.

2. error in the web UI when a query is run which has the 'parent' field
in its result layout *and* members of the result set have parents.

This is
https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/62878
and has been fixed for the 1.0.1 maintenance build

3. the 'parent' condition in a query matches work items that have a
parent. There seems to be no way of making the condition match work
items that don't have parents.

Please see the following work item for a description of this issue:
https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/59469

4. what I really wanted was a column in the result layout showing the id
of the parent, if there is one. There doesn't seem to be a way of doing
this in either UI.

The ID (as a link) is shown in the Web UI when you add the 'Parent' column
to the Result Layout (You need the latest maintenace build to avoid the
problem mentioned in 2.)

The parent is visible when you enable the 'Parent' link in the Eclipse
UI's Relationship dialog.

--
Regards,
Patrick
Jazz Work Item Team

Your answer


Register or 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.