Adding a state to a Work Item workflow in TFS 2013

家住魔仙堡 提交于 2021-02-10 15:54:00

问题


My team recently migrated from TFS 2008 to TFS 2013. We are using the Agile template.

I noticed that for items that are Bugs, there isn't a way to specify that the item is "In Progress" or that "Work has started", it simply goes from the Active state to the Resolved state. I'm not sure what the logic is by not having an "In Progress" state between "Active" and "Resolved".

Anyways, I would like to add a new "In Progress" state but can't figure out how. Do any of you have any examples? I'm opening the Work Item Type Template in the Process Editor in Visual Studio. Do I need to manually edit the XML to add the state and try it until I get it right? Any examples?


回答1:


Firstly, the following code shows you the workflow for Bug work item in Agile template. As the image shows, the states for Bug in Agile are Active, Resolved and Closed.

For your requirement to customize bug work item to change the workflow, you basically have two options: 1). Work with the work item type definition XML file as you mentioned above; 2). Work with Process Editor.

The details:

1). if you work with work item type definition XML file, you need to replace TRANSITIONS part with the followings (also assign appropriate actions & reasons you want):

<TRANSITIONS>
   <TRANSITION from="" to="Active">
      <REASONS>
         <REASON value="Build Failure" />
          <DEFAULTREASON value="New" />
      </REASONS>
      <FIELDS> . . . </FIELDS>
   </TRANSITION>
   <TRANSITION from="Active" to="In Progress">
    <ACTIONS> . . . </ACTIONS>
    <REASONS> . . . </REASONS>
   </TRANSITION>
   <TRANSITION from="In Progress" to="Resolved">
    <ACTIONS> . . . </ACTIONS>
    <REASONS> . . . </REASONS>
   </TRANSITION>
   <TRANSITION from="Resolved" to="In Progress">
      <REASONS> . . . </REASONS>
   </TRANSITION>
   <TRANSITION from="Resolved" to="Closed">
      <REASONS>
         <DEFAULTREASON value="Verified" />
      </REASONS>
    <FIELDS> . . . </FIELDS>
   </TRANSITION>
   <TRANSITION from="Closed" to="Active">
      <REASONS>
         <REASON value="Reactivated" />
         <DEFAULTREASON value="Regression" />
      </REASONS>
    <FIELDS> . . . </FIELDS>
   </TRANSITION>
</TRANSITIONS>

2). If you want to work with Process Editor, you can add State on the Workflow tab. You can drag to add one State in WITDesigner pane from the Toolbox; and use Validate to check whether there is any error. See:




回答2:


In one of the TFS 2013 Updates (I believe it is Update 4), we have updated the Agile template to include the New state to the Bug work item type to address this issue.

To add the state to your work item type, you can take two approaches:

  1. Use witadmin or the power tools to manually add the New state
  2. Download the latest Agile process template, and replace the Bug work item type on your TFS instance with the item from the downloaded template. You can get the latest copy of the Agile process template by creating an account on Visual Studio Online


来源:https://stackoverflow.com/questions/32362412/adding-a-state-to-a-work-item-workflow-in-tfs-2013

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!