Udostępnij za pośrednictwem


List Work Items (Default Flat List)

You can generate a list of work items and generate reports when you create a Flat List of Work Items query. A flat list of work items (Flat Query) is especially useful when you want to perform any of the following tasks:

  • Find a work item with an unknown ID.

  • Check the status or other column fields of several related work items.

  • Find work items that you want to link to other work items.

  • Export work items to Office Excel and Office Project for bulk updates to column fields.

  • Generate a report about a set of work items.

  • Perform bulk updates to column fields by using Team Web Access.

You can convert a flat list (Flat Query) query to either a Work Items and Direct Links (Direct Links Query) query or a Tree of Work Items (Tree Query) query. To view two-tiered relationships among work items that are related based on any type of link, use the Work Items and Direct Links query as described in View and Modify Work Items in a Direct Links View. To view multiple levels of hierarchical relationships among work items, use the Tree of Work Items query. The tree view query requires that all links that associate the work items are parent-child links. For more information, see View and Modify Work Items in a Tree View.

In this topic

  • Listing Work Items Using Team Web Access

  • Listing Work Items Using Team Explorer

After your query is defined, you can save it to reuse later or share it with other team members. For more information, see Organize and Set Permissions on Work Item Queries.

Required Permissions

To perform these procedures, you must be a member of the Readers group or your View work items in this node permission must be set to Allow. To save a query as a team query, you must have the appropriate permissions set. For more information, see Organize and Set Permissions on Work Item Queries and Team Foundation Server Permissions.

Listing Work Items Using Team Web Access

To create and run a work item query in Team Web Access

  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. Click each column in the query clause to fill in the clause. If a column has a list of accepted values, click the arrow to select one from the list. For a description of the available columns, see Query Fields, Operators, Values, and Variables.

  3. To add another clause to the query, click Click to add a new clause, and specify the values for Field, Operator, and Value.

  4. Repeat steps 2 and 3 to add all the filter criteria that will focus your search. Group or ungroup clauses as needed. For more information, see Specify Query Filter Criteria.

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

  6. Repeat steps 4 and 5 until you get the results that you want.

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

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

  9. (Optional) Click Close Editor to close the query editor and focus on the list of work items.

Listing Work Items Using Team Explorer

To create and run a work item query in Team Explorer

  1. In Team Explorer, open 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.

    A new Flat List of Work Items (Default) query opens.

  3. Select Click here to add a clause to add a new clause to your query.

  4. Click each column in the query clause to fill in the clause. If a column has a list of accepted values, click the arrow to select one from the list. For a description of the available columns, see Query Fields, Operators, Values, and Variables.

  5. On the query toolbar, click Run Query Run. Confirm that the query returned the results that you expected and change the query as needed.

  6. Repeat steps 3 and 4 until you get the results that you want. Group or ungroup clauses as needed. For more information, see Specify Query Filter Criteria.

  7. (Optional) Click Column Options Column Options to modify which columns appear in the query results or how the results are sorted.

    You might want to sort the query results to make it easier to find your data. For more information, see Add, Remove, Reorder, and Sort Columns.

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

  9. (Optional) Click Collapse upper panel Collapse Top Panel to close the query editor and focus on the list of work items.

See Also

Tasks

Add, Remove, Reorder, and Sort Columns

Save, Copy, Rename, and Delete Work Item Queries

Concepts

Working with Team Foundation Clients

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)