Organize queries, add a query folder

VSTS | TFS 2018 | TFS 2017 | TFS 2015 | TFS 2013

Organize your personal or shared queries by adding a query folder. You can then add queries to or move existing queries into those folders.

Prerequisites

If you're not a member of the Project Administrators group, get added, or have your Edit project-level information permission set to Allow.

Open Queries

Note

Choose Previous navigation when you see a top-level blue bar. Choose New navigation if you see a vertical sidebar or if you enabled the New Navigation preview feature. The vertical sidebar, along with other navigational features, is enabled when the New Navigation preview feature has been enabled for the signed-in user or the VSTS organization. To learn how to use the web portal effectively, see Navigation Basics.

For on-premises TFS users, choose Previous Navigation for guidance.

From your web browser, (1) check that you have selected the right project, (2) choose Work>Queries, and then (3) choose All.

Open Work>Queries, vertical nav

If it is your first time opening Work, the page opens to Favorites which lists all queries you have favorited. Otherwise, you can choose All to view all queries you've defined and shared queries defined for the project.

Tip

Queries you or your team have favorited show up on the Favorites page. Queries you have favorited along with other objects also appear on your Project page. To learn more, see Set personal or team favorites.

New navigation isn't supported on TFS at this time. Choose Previous navigation for guidance.

Add a query folder, move items into a folder

You add query folders from the Work>Queries>All page.

  1. Choose All. Expand My Queries or Shared Queries depending on where you want to add a query folder.

  2. To add a folder, choose the actions icon for an existing folder or the top container folder, and choose New folder.

    Open Actions menu, choose New folder

  3. Enter the name for the folder in the New folder dialog. If you want to change the location of the folder, select it from the Folder drop down menu.

    Open Actions menu, choose New folder

  4. To move items into a folder, drag-and-drop a query onto the folder.

    Optionally, you can click the Actions icon for an existing query, choose Edit, and then choose Save As. In the Save query as dialog, choose the folder you want to save the query in.

    Save query as dialog

You add query folders from the Work>Queries page.

  1. To add a folder, choose the context menu for an existing folder or the top container folder and select New query folder.

    Enter the name for the folder in the New query folder dialog.

    New query folder link on queries context menu

  2. To move items into a folder, drag-and-drop a query onto the folder.

    Optionally, you can choose the context icon for an existing query and choose Rename. In the Reanme query dialog, select the folder you want to save the query in.

    Rename query dialog

Add a query to the dashboard or share it with your team

To add a query to the home page or a dashboard, open the actions (or context) menu for the query and add it to a specific dashboard or as a team favorite.

Share queries with your team by adding them to a folder under the Shared Queries container. To save a query to a Shared Queries folder, get added to the project administrators group or have your permissions set for a folder under Shared Queries.

You can only add shared queries to dashboards or as team favorites, and only if you have team administrator or project administrator permissions.

Q & A

Q: Can I change the owner of a query or folder?

A: No. You can only enable permissions for users and groups from the permissions window for the query or folder.

A: Yes. This is a supported feature from the query Security dialog.

Q: Can I add folders to team favorites?

A: No. You can only add folders under My Queries and under Shared Queries.

Q: Are the queries and folders I create from the web portal the same as in Team Explorer?

A: Yes. You might have to refresh your browser or client to see changes you make in another client.

Q: Can I move a query or a folder?

A: Yes. In the web portal, choose Rename from the context menu. In Visual Studio Team Explorer, simply drag the folder to the new location.

In Team Explorer for Eclipse, choose Move from the context menu and select the folder to which you want to move the item.