Warm tip: This article is reproduced from stackoverflow.com, please click
azure-devops tfs tfsbuild tfs-2015

How to set transitions to project level groups in TFS 2017

发布于 2020-04-18 10:10:52

We have a TFS configuration where we defined Transitions. These transitions are at global level but now we want to move those to Project level. Ex, our TFS structure is ProjectCollection\Project1. Currently our transitions are defined in process template as -

  <TRANSITION from="New" to="Approved" for="[global]\Analysts">
      <REASONS>
        <DEFAULTREASON value="Ready to implement" />
      </REASONS>
       </TRANSITION>

Now so that we have removed this "Analyst" group from "ProjectCollection" and created at "Project1" level so our transition would be

 <TRANSITION from="New" to="Approved" for="[Project1]\Analysts">
      <REASONS>
        <DEFAULTREASON value="Ready to implement" />
      </REASONS>
       </TRANSITION>

But it is not supporting and giving error while importing the template. Error is - "Error importing work item type definition: TF26171: User/group '[Project1]\Analysts' is not found. TF26204: The account you entered is not recognized. Contact your Team Foundation Server administrator to add your account."

Questioner
Oxygen
Viewed
50
Andy Li-MSFT 2020-02-05 18:48

Firstly please make sure the group Analyst is existing under the project1.

Secondly please note that on the for attribute the [project] is not a placeholder for the project’s name, it just meant as a literal.

So, please try this:

 <TRANSITION from="New" to="Approved" for="[project]\Analysts">
      <REASONS>
        <DEFAULTREASON value="Ready to implement" />
      </REASONS>
       </TRANSITION>

Reference this example : https://docs.microsoft.com/en-us/previous-versions/ms194954(v=vs.80)?redirectedfrom=MSDN#example