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

Requirements

Saving and Copying Work Item Queries

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

  1. In Team Web Access, choose your team project, and then choose the Work Items page.

  2. Choose the Context Menu Icon shortcut menu next to New, and then choose Add QueryNew query.

    Note

    You can also create a query by choosing the Context Menu Icon shortcut menu next to My Queries or Shared Queries and then choosing Add QueryNew query.

    The query editor displays with a Flat List of Work Items selected.

  3. Create or modify the query filter criteria.

    For more information, see Query Fields, Operators, Values, and Variables and Specify Query Filter Criteria.

  4. Choose the Save Save Query or Save New Query Save Query As link. In the Save Query As dialog box, under Name, type the name that you want for your query.

  5. 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 Shared Queries or in a folder under this node.

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

  6. Choose OK.

To save a new work item query by using Team Explorer

  1. On the Work Items page, choose New Query.

    A new Flat List (Default) query opens.

  2. Create or modify the query filter criteria.

    For more information, see Query Fields, Operators, Values, and Variables and Specify Query Filter Criteria.

  3. On the query toolbar, choose 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 to Team Foundation Server: 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 Shared Queries or in a 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. Choose 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 choose Save As. Follow the steps provided the earlier procedure for saving a new query.

    • In Team Explorer, open the shortcut menu for the query, and then choose Copy. Open the shortcut menu for the folder where you want to save the new query, and then choose Paste. To rename the query, open the shortcut menu for the query and then choose 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, choose the Work Items page.

  2. Choose the Context Menu Icon shortcut menu next to the query that you want to rename, and then choose Rename.

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

  4. Choose the OK button.

To rename a work item query by using Team Explorer

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

  2. On the Work Items page, expand My Queries.

  3. Open the shortcut menu of the query that you want to rename and choose 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. On the Work Items page, choose My Queries.

  3. Open the shortcut menu for the query that you want to delete and then choose Delete. You can also press the Delete key.

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

See Also

Tasks

Organize and Set Permissions on Work Item Queries

Concepts

Find Bugs, Tasks, and Other Work Items

Other Resources

Share Work Items and Queries with Team Members