Monday, June 27, 2016

TFS Work Item Customization using TFS Power Tool: Part 5

How to restrict the user or group from creating or updating a specific work item type.

 

Hi All,

In this post we will see how to stop a user or group from creating or updating a particular work item type in TFS team project.

In TFS team project we can either give read/write permission to all work item type or none of them, but it is not possible to restrict the user or group from creating or editing a specific work item type like bug or task.

In this post I’m going to provide a work around to achieve the requirement- where a user or group should be able to create or update all work item types except Bug, let us see how to do this.

    1.      Open bug work item template using process tab.

    Open Visual Studio, and Click on TOOLS -> Process Editor-> Work Item Types-> Open WIT from server, to open the template online.

       

      https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6aY-PWA-6JDK8_dsu3Viqlf38S9hPbzKwwxtS1yczhd0mVud780Xf_yZPiqAHP-YZdbOUSwRxbYK1dPm4c7lCSzE8AfCwKUB6gVVD_TWenuifbDAnvXCz-khxenP3jbXoIXCZnD3mGXoB/s1600/OpenTaskOnline.png

      2.      Now connect to the TFS and then to the Team Project under the Team Project Collection. Select work item type Bug.

       

      3.      Look for field Changed by and double click on it to edit.

       

      4.      When Field Definition window opens, click on Rules tab to add a new rule READONLY by clicking New button.

      5.      In the Select a rule type window select rule named READONLY, then click OK.

      6.      Now time to use this rule to achieve our requirement, identify the group to which this bug work item type should not be editable. Here in my example I want make bug work item type non editable for members of the Team Project Default group Contributors.

      Pass the value [project]\Contributors in the field For, find below screenshot for your reference.

      Then click OK.

      7.      Now you will see the new rule added to the list. Click OK. Then Save changes to server by clicking Save button of Visual Studio or using key board shortcut , Ctrl+s

       

      8.      Now connect to Team Project then open Team Project Administer Sever Page by clicking on  Administer Server gear button.

       

      9.      In Team Project Administer Sever Page open Security Tab. Under Security Tab look for group Contributors and add a windows user by clicking Add button under Members tab.

       

       

      Search for the member. Then click on Save changes button.

       

      Now a new member (Brian Keller) is added to the group Contributors.

      10.   Now login as one contributor member and connect to Team Project, here it is Awesome Team Project.

      11.   Click on Create new, dropdown list and select Bug work item type.

      12.   Enter the details and then click on Save button.

      13.   On Clicking save this user will be prompted with message as shown in below screenshot. By this way can restrict user from creating and updating Bug work item type.

       

      Hope you enjoyed this blog.

      Happy blogging J

       

No comments:
Write comments