Share via


Save, Copy, Rename, and Delete Work Item Queries

You can save, copy or rename a query for your own use or to share with others. When you save your query, you can access it later to run reports or delete it if the information is no longer needed.

In this topic

  • Saving and Copying Work Item Queries

  • Renaming Work Item Queries

  • Deleting 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 be a member of the Project Administrators group or you must have the required permissions set. For more information, see Organize and Set Permissions on Work Item Queries and Team Foundation Server Permissions.

Saving and Copying Work Item Queries

To save a new work item query by using Team Web Access

  1. In the Team Web Access quick launch area, click the arrow next to My Queries, and then click New Query.

    Note

    You can also create a public query by clicking the arrow next to Team Queries and then clicking New Team Query.

    A new browser window opens with Flat List Query selected.

  2. Create or modify the query filter criteria.

    For more information, see Specify Query Filter Criteria and Finding Bugs, Tasks, and Other Work Items.

  3. Click Save or click Save As. In the Save Query As dialog box, under Name, type the name that you want for your query.

  4. In the Query folder box, use the arrow to select the team project and folder or subfolder where you want to save your query.

    • If only you will use the query, save your query in My Queries or folder under this node.

    • If other team members will use the query, save your query in Team Queries or folder under this node.

      For more information, see Organize and Set Permissions on Work Item Queries.

  5. Click OK.

To save a new work item query by using Team Explorer

  1. On the Team menu, click Add Query.

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

  2. Create or modify the query filter criteria.

    For more information, see Specify Query Filter Criteria and Finding Bugs, Tasks, and Other Work Items.

  3. On the query toolbar, click Save Query, and type the name that you want for your query.

  4. Under Select the query type and save location, select one of the following options:

    • To save your query under the Work Items node: Select Server. In the Query folder box, select the team project and folder or subfolder where you want to save your query.

      If only you will use the query, save your query in My Queries or folder under this node.

      If other team members will use the query, save your query in Team Queries or folder under this node.

      For more information, see Organize and Set Permissions on Work Item Queries.

    • To save your query to a file that you can send in e-mail: Select File, and then enter the folder and file name where you want to save the file. Team Foundation saves the query with the .wiq file name extension.

      For more information, see Organize and Set Permissions on Work Item Queries.

  5. Click Save.

To copy or save an existing work item query with a new name or location

  • To copy a work item query:

    • In Team Web Access, open the work item query that you want and click Save As. Follow the steps provided the earlier procedure for saving a new query.

    • In Team Explorer, right-click the query, and then click Copy. Right-click the node or folder where you want to save the new query, and then click Paste. To rename the query, right-click the query and then click Rename. Type your new query name and click anywhere outside the box to save your changes. 

Renaming Work Item Queries

To rename a work item query by using Team Web Access

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

  2. Point to the query that you want to rename, click the arrow to the right and then click Rename.

  3. In the Query Name box, type the new name that you want for your query.

  4. Click OK.

To rename a work item query by using Team Explorer

  1. In Team Explorer, open an existing team project.

  2. Under Work Items, click My Queries.

  3. Right-click the query that you want and select Rename.

  4. Type your new query name and click anywhere outside the box to save your changes.

Deleting Work Item Queries

To delete work item queries

  1. Open an existing team project.

  2. Under Work Items, click My Queries.

  3. Right-click the query that you want to delete and then select Delete. You can also press the Delete key.

  4. On the dialog box that states that the work item will be deleted permanently, click OK.

See Also

Tasks

Specify Query Filter Criteria

Organize and Set Permissions on Work Item Queries

Concepts

Finding Bugs, Tasks, and Other Work Items

Other Resources

Sharing Work Items and Queries with Team Members