Organize and Set Permissions on Work Item Queries

You can organize and share your queries and team queries by using folders and subfolders. You can set permissions on queries and folders that are created under Team Queries to enable or restrict access. You can set permissions for individual users, Windows groups, or Team Foundation Server groups.

Note

Only those users with appropriate permissions set can view, edit, delete, copy or manage the query folders and team queries. Permissions set at the folder level are propagated to subfolders created or moved to a folder.

In this topic

You can use the following table to determine which tasks can be performed based on the client that you are using:

Task

Team Explorer

Team Web Access

Creating a Query Folder or Subfolder

Yes

Yes

Moving a Query, Folder, or Subfolder

Yes

Yes

Copying a Query, Folder, or Subfolder

Yes

No

Setting or Changing Permissions on a Query or Query Folder

Yes

No

Adding Queries and Reports to Favorites or My Favorites

Yes

Yes

Required Permissions

You must have Full Control permissions set to add, delete, and move queries and folders under My Queries. By default, when you create a query or a folder, you are assigned as an owner of the query or folder and you have Full Control permissions set.

In the following table, query permissions are set through the query or query folder Security dialog box. To manage queries and folders under Team Queries, you must have the following permissions to perform the associated tasks:

Query permissions

Supports these tasks

Read

View and run a query or view a query folder and its contents

Contribute

View and edit a query or query folder and its contents

Delete

View, edit, and delete a query or query folder and its contents

Manage Permissions

Manage permissions for a query or query folder and its contents

Full Control

View, edit, delete, and manage permissions for a query or query folder and its contents

To create or copy a query folder, you must have your Read permission set for the query or folder that you want to copy and your Contribute permission set for the destination query folder.

Creating a Query Folder or Subfolder

To use Team Web Access to create a query folder

  1. In Team Web Access, open your team project, and click the Work Items page.

  2. Open either My Queries or Team Queries, and then on the toolbar, click New Folder.

    You can also open an existing folder or subfolder under My Queries or Team Queries, and then click New Folder.

  3. In the Create Folder dialog box, type the name of the folder that you want to create, and then click OK.

To use Team Explorer to create a query folder

  1. In Team Explorer, open the team project.

  2. Right-click My Queries or Team Queries, and then click New Folder.

    You can also right-click a folder or subfolder under My Queries or Team Queries, and then click New Folder.

  3. Rename the new folder.

Moving a Query, Folder, or Subfolder

To move a query, folder, or subfolder to a different folder

  • To move a query to a new folder:

    • In Team Web Access, click the arrow next to the query, and then click Move to Folder. In the Move to Folder dialog box, click the name of the new folder where you want to move it, and then click OK.

    • In Team Explorer, drag the query to its new folder or subfolder location.

  • To move a folder or subfolder:

    • In Team Explorer, drag the folder or subfolder to its new folder location.

      Note

      When a team query or folder is moved to another query folder, it will discard all permissions that were set on it and inherit permissions from its new parent folder. If the Inherit security settings is unchecked for the folder that is being moved, the folder will retain all the permissions that were set for it and its Inherit security settings check box is cleared after the move.

Copying a Query, Folder, or Subfolder

To copy a query, folder, or subfolder to a different location

  1. In Team Explorer, right-click the query, folder, or subfolder that you want to copy, and click Copy.

  2. Right click the My Queries or Team Queries node, or query folder or subfolder where you want to place the copied item, and click Paste.

    Note

    When a team query or folder is copied to another query folder, it will discard all permissions that were set for it and inherit permissions from its new parent folder. The inheritance of permissions of the parent folder occurs even when the Inherit security settings check box is cleared for the folder that you copied.

Setting or Changing Permissions on a Query or Query Folder

To set or change permissions on a query or query folder

  1. In Team Explorer, expand the Team Queries folder, and right-click the query or folder whose permissions you want to set.

    The Security dialog box opens.

  2. Perform one or more of the following procedures:

    • To change the owner, click Change.

      In the Select User dialog box, in Enter the object names to select, type the name of the user or user group to transfer ownership to, and then click Check Names. Click the group account, and then click OK twice.

    • To add users and groups, click either Team Foundation Server Group or Windows User or Group, and then click Add.

      In the Select Users, Computers, or Groups dialog box, in Enter the object names to select, type the name of the user group that you want to add, and then click Check Names. Click the group account, and then click OK twice.

    • To change the permissions for a user or group, select the user or group from the list, and then click the appropriate Allow or Deny permission check boxes.

    • To change the inheritance permissions for a folder, select or clear Inherit security settings. When the check box is cleared, the users, groups, and permissions that are inherited from the parent folder are implicitly copied and can be modified.

  3. Click OK.

Adding Queries and Reports to Favorites or My Favorites

To use Team Web Access to add a work item query to your Favorites

  1. In Team Web Access, open your team project, and click the Work Items page.

  2. Click the arrow next to a work item query that you want to add to your Favorites list, and then click Add to Favorites.

  3. (Optional) In the Add to Favorites dialog box, specify a new name for the query.

  4. Click the Favorites folder and then click Add.

    Note

    To organize queries into separate folders under Favorites perform the same procedures provided in Creating a Query Folder or Subfolder. For more information about managing favorites, see Access Frequently Used or Recently Viewed Work Items, Queries, and Reports.

To use Team Explorer to add a work item query to My Favorites

  1. In Team Explorer, expand My Queries, Team Queries, or the folder that contains the query that you want to add.

  2. Right-click the query and click Add to My Favorites.

    Note

    To organize queries into separate folders under My Favorites perform the same procedures provided in Creating a Query Folder or Subfolder.

See Also

Tasks

Save, Copy, Rename, and Delete Work Item Queries

Access Frequently Used or Recently Viewed Work Items, Queries, and Reports

Concepts

Team Queries (CMMI)

Working with Team Foundation Clients

Finding Bugs, Tasks, and Other Work Items

Other Resources

Team Queries (Agile)

Sharing Work Items and Queries with Team Members