Create a Query from Selected Work Items

If you select a set of work items from a query result list or from a links tab in Team Explorer, you can create a query that returns the IDs of all the selected work items. This functionality is useful when you want to perform an operation on a subset of work items in a list.

Required Permissions

To perform these procedures, you must be a member of the Readers group or have your View work items in this node permission set to Allow. To save a query as a team query, you must be a member of the Project Administrators group. For more information, see Team Foundation Server Permissions.

To generate a query from selected work items

  1. In Team Explorer, open a query or create one that lists the work items.

    For more information, see List Work Items (Default Flat List)

    You can also open a work item form, and then click the tab for managing links. The name of the tab might be Links, Other links, or Implementation. The name of the tab is determined by the work item definition

  2. Select the work items that you want the new query to find.

    To specify a continuous range of work items, press and hold the SHIFT key when you click the first and last work item in the range. To specify a discontinuous range, press and hold the CTRL key when you click each work item.

  3. Right-click the selection, and click Open in Query.

    A New Query [Results] window opens.

  4. Click Edit Query to open the work item query.

  5. Click Save Query, and save the query under My Queries. For more information, see Save, Copy, Rename, and Delete Work Item Queries.

See Also


Save, Copy, Rename, and Delete Work Item Queries


Finding Bugs, Tasks, and Other Work Items