Manage Security Permission for change work Item State

By default the security is allowed for changing states in any work item, if you have a requirement to change it, you need to do small changes in work item template.
In this post i will show you how to control permissions between states.

Export Task work item using below command

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>witadmin exportwitd /collection:http://[TFSserverName]:8080/tfs/[TFSCollectionName] /p:[Team Projec] /n:Task /f:c:\temp\task.xml
  • Open XML file.
  • Search for workflow element, there are both states and transitions elements.
  • To prevent user creating a Task work item, use below code
    <TRANSITIONS>
            <TRANSITION from="" to="Active"  for="[project]\Creators">
  • Creators‘ is a group in team project, so you can add as much user as required to have permission.
  • So using FOR command attribute in any transition or any state you can control permission.
  • And you can use NOT attribute to do the opposite of FOR.

Enjoy 🙂

3 thoughts on “Manage Security Permission for change work Item State

  1. I tried setting this with the power tools and the process template editor in VS2012.
    But I get error during saving:
    “The account you entered is not recognized…”

    I tried in the VS2012 Demo Image from Brian Keller and want to use a team group.

    Thx

Leave a Reply

Your email address will not be published. Required fields are marked *