View and Modify Work Items in a Tree View
You can find and modify work items that are related with parent-child links or custom link types whose topology is tree by using the tree view query. Within the tree query or tree view (), you can focus on different parts of the tree by expanding or collapsing leaf nodes. In addition, by using Team Explorer, you can indent (), outdent (), and use the drag and drop operation to move and copy work items and modify the hierarchy. You can also quickly create or remove tree links.
A tree view of work items is particularly useful when you want to perform the following tasks:
View the hierarchy that you have created.
Change the tree hierarchy by adding, copying, or moving the link relationships of the work items.
Export the tree view to Office Excel for either bulk updates to column fields or to augment or modify the tree hierarchy.
Note
You cannot modify the parent-child links that are locked (). These links are controlled by another process, such as Project Server. For more information, see Review the Work Breakdown.
You can use the tree view only to list work items that are related using tree topology type of links. To view two-tiered relationships among work items that are related based on any type of link, you can use the Work Items and Direct Links query as described in View and Modify Work Items in a Direct Links View.
In this topic
To view and modify work items in a tree view, complete one of the following procedures:
Task |
Team Explorer |
Team Web Access |
---|---|---|
Listing work items that are related with types of links whose topology is tree |
Yes |
Yes |
Changing a query to a tree view query |
Yes |
Yes |
Expanding and collapsing leaf nodes |
Yes |
Yes |
Changing link relationships |
Yes |
No |
After your query is defined, you can save it to reuse it or share it later with other team members. For more information, see Organize and Set Permissions on Work Item Queries.
Required Permissions
To list and view work items, you must be a member of the Readers group or your View work items in this node permission must be set to Allow. To modify link relationships, you must be a member of the Contributors group or have your View work items in this node, and Edit work items in this node permissions set to Allow. To save a query as a team query, you must have the required permissions set. For more information, see Organize and Set Permissions on Work Item Queries and Team Foundation Server Permissions.
Listing Work Items in a Tree View
To use Team Web Access to create a tree view query
In Team Web Access, click the Home or Work Items tab, and then click New Query.
A new browser window opens with Flat List of Work Items selected.
Select the Type of Query, click Tree of Work Items.
Specify the filter criteria for the top tier of work items:
Click each column in the query clause to fill in the clause. If a column has a list of accepted values, click the arrow and select one from the list. For a description of the available columns, see Query Fields, Operators, Values, and Variables.
Click Click to add a new clause, and specify the values for Field, Operator, and Value.
Repeat step 3b to add the filter criteria that will return the list of work items that you want. Group or ungroup clauses as needed. For more information, see Specify Query Filter Criteria.
On the query toolbar, click Run, and confirm that the query returned the results that you expected.
The top tier of work items should be displayed in a tree hierarchy that contains all work items that are related by tree links. For more information about these link types, see Working with Link Types.
Repeat steps 3c and 3d until you get the set of work items that you want.
(Optional) Click the Type of tree drop-down arrow and then click the type of tree link whose work items you want to find. Only those link types with the topology of tree are listed in the menu.
On the query toolbar, click Run, and confirm that your query returned the results that you expected.
(Optional) Click Column Options to modify which columns appear in the query results. For more information, see Add, Remove, Reorder, and Sort Columns.
(Optional) Click Save or Save As. For more information, see Save, Copy, Rename, and Delete Work Item Queries.
(Optional) Click Close Editor to close the query editor and focus on the list of work items.
To use Team Explorer to create a tree view query
In Team Explorer, expand your team project, expand the Work Items node, and then select Team Queries or My Queries.
On the Team menu, click Add Query.
For the Type of Query, click Tree of Work Items.
Specify the filter criteria for the top tier of work items:
Click each column in the query clause to fill in the clause. If a column has a list of accepted values, click the arrow and select one from the list. For a description of the available columns, see Query Fields, Operators, Values, and Variables.
Click Click here to add a new clause, and specify the values for Field, Operator, and Value.
Repeat step 4b to add all of the filter criteria that will return the list of work items that you want. Group or ungroup clauses as needed. For more information, see Specify Query Filter Criteria.
On the query toolbar, click Run, and confirm that the query returned the results that you expected.
The top tier of work items should be displayed in a tree hierarchy that contains all work items that are related with parent-child links. For more information about these link types, see Working with Link Types.
Repeat steps 4c and 4d until you get the set of work items that you want.
(Optional) If you have added custom link types that specify the tree topology, you can change the value of the Link Type to one that matches your custom link type.
(Optional) Click Column Options to modify which columns appear in the query results. For more information, see Add, Remove, Reorder, and Sort Columns.
(Optional) Click Save Query. For more information, see Save, Copy, Rename, and Delete Work Item Queries.
(Optional) Click Collapse Top Panel to close the query editor and focus on the list of work items.
Back to top
Changing a Query to a Tree View Query
To change a query to a tree view query by using Team Web Access
In Team Web Access, click the Work Items tab.
Expand either My Queries or Team Queries.
Click the arrow next to the query that you want to modify and then click Edit.
Click Tree of Work Items to select the Type of Query.
(Optional) Click Column Options to modify which columns appear in the query results
Click Save or Save as.
To change a query to a tree query by using Team Explorer
In Team Explorer, expand your team project, expand the Work Items node, and then select Team Queries or My Queries.
Right-click the query that you want to modify, and click Edit Query.
Click Tree of Work Items to select the Type of Query.
(Optional) Modify your query filter criteria as needed.
Click Save Query.
Back to top
Expanding and Collapsing Leaf Nodes
To expand and collapse leaf nodes in a tree view query
In Team Web Access:
To collapse a node, click .
To expand a node, click .
In Team Explorer:
To collapse all nodes, click (Collapse All).
To collapse a single node, click .
To expand all nodes, click (Expand All).
To expand a single node, click .
Back to top
Changing Link Relationships of Work Items
To change link relationships of work items by using Team Explorer
In Team Explorer, open a tree view query.
Modify the query to generate the list of work items that you want.
Change the link relationships of work items, by following one of the listed procedures:
To move a work item, click a source work item and drag it to a new target work item.
If a source work item is already directly under its target, click the work item, and then click (Indent).
To remove a target work item from a source work item, click the source work item, and then click (Outdent).
To add a link relationship, click a source work item, press the CTRL or Shift key, and drag it to a new target work item.
To delete a linked relationship, open the target work item, click the Links tab, and delete the source work item. For more information, see Create or Delete Relationships Between Work Items.
Work items whose links have been changed are highlighted in bold, which indicate that they have been modified.
Save or discard the changes:
To save the modifications, click Save Results.
Note
If one or more work items does not save, then open each parent work item individually and click Save Work Item.
To discard the changes, click Refresh. In the dialog box that opens, click No.
Tip
To discard changes to a work item, open the work item form, and then click Refresh. In the dialog box that opens, click No.
Back to top
See Also
Tasks
Add, Remove, Reorder, and Sort Columns
Save, Copy, Rename, and Delete Work Item Queries
Concepts
Working with Team Foundation Clients
Choosing Link Types to Effectively Track Your Project
Query Fields, Operators, Values, and Variables
Finding Bugs, Tasks, and Other Work Items