Organize queries, add a query folder

Azure Boards | Azure DevOps Server 2019 | 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

By default, all project members and users with Stakeholder access can view and run all shared queries. You can change the permissions set for a shared query folder or shared query. For details, see Set query permissions.

  • You must connect to a project. If you don't have a project yet, create one.
  • To view, run, or email a query, you must be granted Stakeholder access or higher. For details, see About access levels.
  • To add and save a query under Shared queries, you must be granted Basic access or higher. Also, you must have your Contribute permission set to Allow for the folder you want to add the query to. By default, the Contributors group doesn't have this permission.

Note

Users with Stakeholder access for a public project have full access to query features just like users with Basic access. For details, see About access levels.

  • You must connect to a project. If you don't have a project yet, create one.
  • To view, run, or email a query, you must be granted Stakeholder access or higher. For details, see .
  • To add and save a query under Shared queries, you must be granted Basic access or higher. Also, you must have your Contribute permission set to Allow for the folder you want to add the query to. By default, the Contributors group doesn't have this permission.

Open Queries

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

Open Boards>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.

From your web browser, open Boards>Queries.

Web portal, choose Boards>Queries

Add a query folder, move items into a folder

You add query folders from the Boards>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 Boards>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 Rename 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 icon (or  context icon) 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.