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 (Tree Query), you can focus on different parts of the tree by expanding or collapsing leaf nodes. In addition, by using Team Explorer, you can indent (Indent), outdent (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 (Link is 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

  1. In Team Web Access, click the Home or Work Items tab, and then click Add Query New Query.

    A new browser window opens with Flat List of Work Items selected.

  2. Select the Type of Query, click Tree of Work Items.

  3. Specify the filter criteria for the top tier of work items:

    1. 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.

    2. Click Click to add a new clause, and specify the values for Field, Operator, and Value.

    3. 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.

    4. On the query toolbar, click Run Query 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.

    5. Repeat steps 3c and 3d until you get the set of work items that you want.

  4. (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.

  5. On the query toolbar, click Run Query Run, and confirm that your query returned the results that you expected.

  6. (Optional) Click Column Options Column Options to modify which columns appear in the query results. For more information, see Add, Remove, Reorder, and Sort Columns.

  7. (Optional) Click Save Save or Save As. For more information, see Save, Copy, Rename, and Delete Work Item Queries.

  8. (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

  1. In Team Explorer, expand your team project, expand the Work Items node, and then select Team Queries or My Queries.

  2. On the Team menu, click Add Query Add Query.

  3. For the Type of Query, click Tree of Work Items.

  4. Specify the filter criteria for the top tier of work items:

    1. 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.

    2. Click Click here to add a new clause, and specify the values for Field, Operator, and Value.

    3. 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.

    4. On the query toolbar, click Run Query 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.

    5. Repeat steps 4c and 4d until you get the set of work items that you want.

  5. (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.

  6. (Optional) Click Column Options Column Options to modify which columns appear in the query results. For more information, see Add, Remove, Reorder, and Sort Columns.

  7. (Optional) Click Save Save Query. For more information, see Save, Copy, Rename, and Delete Work Item Queries.

  8. (Optional) Click Collapse upper panel 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

  1. In Team Web Access, click the Work Items tab.

  2. Expand either My Queries or Team Queries.

  3. Click the arrow next to the query that you want to modify and then click Edit.

  4. Click Tree of Work Items to select the Type of Query.

  5. (Optional) Click Column Options Column Options to modify which columns appear in the query results

  6. Click Save Save or Save as.

To change a query to a tree query by using Team Explorer

  1. In Team Explorer, expand your team project, expand the Work Items node, and then select Team Queries or My Queries.

  2. Right-click the query that you want to modify, and click Edit Query.

  3. Click Tree of Work Items to select the Type of Query.

  4. (Optional) Modify your query filter criteria as needed.

  5. Click Save 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 Collapse.

    • To expand a node, click Expand.

  • In Team Explorer:

    • To collapse all nodes, click Collapse all (Collapse All).

    • To collapse a single node, click Collapse.

    • To expand all nodes, click Expand all (Expand All).

    • To expand a single node, click Expand.

Back to top

  1. In Team Explorer, open a tree view query.

  2. Modify the query to generate the list of work items that you want.

  3. 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 (Indent).

    • To remove a target work item from a source work item, click the source work item, and then click Outdent (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.

  4. Save or discard the changes:

    • To save the modifications, click Save 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 query 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 query 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

Other Resources

Work Items and Workflow (Agile)

Work Items and Workflow (CMMI)