Cameron Presley
Cameron Presley

Reputation: 87

How To Limit Who's Assigned A Work Item

When assigning work items, I can assign them to anyone in Team Services, however, we only want tickets to be assigned to someone who's part of the project. I've looked over the documentation and I found this, however, it seems to only be for TFS, not Team Services.

Any ideas?

Let's say that I have two projects in Team Services (A and B). How can I make it such that if a ticket is created for project A, I can't assign it to people in project B?

Upvotes: 1

Views: 1144

Answers (1)

Marina Liu
Marina Liu

Reputation: 38116

There is no such settings in VSTS dynamically judge which user is assigned WIT in a project and block to assigned in the other project.

But you can use REST API to get the list of work items for project A and find which user was assigned to work items in project A.

Then update or create work items by REST API in project B, before specify the user for assigned to field, you can compare with the user you found in project A. If the are same, leave the assigned to field as Unassigined and show message the user has already assigned to work items in project A.


Update:

The drop down list for Assigned To only list the members who have access for the project by default. So if the user1 only can access to project A, don’t worry user1 shows in project B WIT Assigned To field.

By default, the drop-down menu for the Assigned To field displays all users who have been granted access to the team project. This is the default valid users group. The exception to this rule is the list that appears in the web portal--the context menus that support assigning work items are limited to members of the team.

And You can also limit the user name for Assigned To filed by adding VALIDUSER to Assigned To field. Detail steps you can refer Limit the Assigned To field list of names.

Upvotes: 2

Related Questions