Share via


Organize and Set Permissions on Work Item Queries

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

Note

In Visual Studio Team Foundation Server 2012, you can no longer create folders under My Favorites. Also, you cannot move a query or query folder in Team Web Access. However, you can organize queries and folders in Team Explorer, refresh Team Web Access, and see the new organized folders and queries.

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

No

Copying a Query, Folder, or Subfolder

Yes

No

Setting or Changing Permissions on a Query or Query Folder

Yes

Yes

Adding Queries to Team Favorites or My Favorites

Yes

Yes

Required permissions

Note

Only those users with valid permissions can view, edit, delete, copy or manage the query folders and shared queries. Permissions set at the folder level are propagated to subfolders that were created under or moved into a folder.

By default, when you create a query or a folder under Shared Queries, you are assigned as its owner and your permissions are all set to inherit allow which provides you full control.

Query permissions are set through the query or query folder Permissions dialog box. To manage queries and folders under Shared Queries, you must have the permissions listed in the following table 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

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

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

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 choose the Work Items page.

  2. Choose the context icon next to My Queries, Shared Queries, or a folder defined within this area, and then choose New query folder.

  3. In the NEW QUERY FOLDER dialog box, type the name of the folder that you want to create, and then choose OK.

To use Team Explorer to create a query folder

  1. In Team Explorer, open the team project, and choose Work Items.

  2. Open the shortcut menu for My Queries, Shared Queries, or a folder and then choose New Folder.

  3. Rename the new folder.

Moving a Query, Folder, or Subfolder

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

    Note

    When a query or a 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 Inheritance is turned Off for the folder that is being moved, the folder will retain all the permissions that were set for it and its Inheritance is set to Off after the move.

Copying a Query, Folder, or Subfolder

  1. In Team Explorer, open the shortcut menu for the query, folder, or subfolder that you want to copy, and choose Copy.

  2. Open the shortcut menu for My Queries, Shared Queries, query folder, or subfolder where you want to place the copied item, and then choose Paste.

    Note

    When a query or a 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

  1. In Team Explorer, expand the Shared Queries folder, and open the shortcut menu for the query or the folder whose permissions you want to set.

    The Permissions dialog box opens.

  2. Perform one or more of the following procedures:

    • To change the owner, choose the change owner link and select or browse for the name of the new owner. This option will only appear if you have the required permissions.

    • To add users and groups, choose Add, and then choose either Add windows identity or Add TFS Group.

      In the Add a Windows User or Group dialog box, in Identity, type the name of the user or group that you want to add. Choose Save Changes.

    • To change the permissions for a user or group, select the user or group from the list, and then choose inherited allow, allow or deny until the permission that you want to set is displayed..

    • To change the inheritance permissions for a folder, choose Inheritance, and then choose On or Off. When inheritance is off, the users, groups, and permissions that are inherited from the parent folder are implicitly copied and can be modified.

  3. Choose Save Changes.

Adding Queries to My Favorites or Team Favorites

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

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

  2. Choose the Favorites star icon star next to a work item query that you want to add to your My Favorites list.

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

  1. In Team Explorer, open your team project, and choose Work Items.

  2. Expand Queries, and then My Queries, Shared Queries, or the folder that contains the query that you want to add.

  3. Open the shortcut menu for the query and choose Add to My Favorites.

See Also

Tasks

Save, Copy, Rename, and Delete Work Item Queries

Concepts

Shared Queries (CMMI)

Working with Team Foundation Clients

Find Bugs, Tasks, and Other Work Items

Other Resources

Shared Queries (Agile)

Share Work Items and Queries with Team Members