TFS 2017 新工作项类型配置

TFS 2017 New Work Item Type Configuration

在 TFS 2017 中,我只是通过电动工具创建了一个新的工作项类型;我是这样做的:

  1. n Visual Studio,为您的工作项类型创建一个 XML 文件。为此,请在“文件”菜单上单击“新建”,然后单击“文件”。
  2. 在“新建文件”对话框中,在类别下,select 常规,然后在模板下,select XML 文件。
  3. 引入XML代码。
  4. 在本地保存为 XML 文件。
  5. 使用电动工具导入。

XML 示例(它只存在字段 "TITLE" 因为我之前想测试它但会出现其他 2 个字段,"Description" 和 "Case Number"):

<?xml version="1.0" encoding="utf-8"?>
<witd:WITD application="Work item type editor" version="1.0" xmlns:witd="http://schemas.microsoft.com/VisualStudio/2008/workitemtracking/typedef">
<WORKITEMTYPE name="CRM Case">
<DESCRIPTION>A description of your new work item type.</DESCRIPTION>
<GLOBALLISTS>
</GLOBALLISTS>
<FIELDS>
      <FIELD name="Title" refname="System.Title" type="String" reportable="dimension">
        <REQUIRED />
      </FIELD>
</FIELDS>
<WORKFLOW>
      <STATES>
        <STATE value="Active">
        </STATE>
      </STATES>
      <TRANSITIONS>
        <TRANSITION from="" to="Active">
          <REASONS>
            <DEFAULTREASON value="New" />
            <REASON value="Build Failure" />
          </REASONS>
        </TRANSITION>
       </TRANSITIONS>
</WORKFLOW>
<FORM>
      <Layout>
        <Group>
          <Column PercentWidth="100">
            <Control Type="FieldControl" FieldName="System.Title" Label="&amp;Title:" LabelPosition="Left" />
          </Column>
        </Group>
      </Layout>
</FORM>
</WORKITEMTYPE>
</witd:WITD>

上传文件后,我可以在 TFS 中看到新的工作项类型:

现在的问题是2:

  1. 我想在积压工作中看到我的新工作项类型;
  2. 我希望能够将 "test case" 或 "user story" 或 "bug" 关联到此类元素。

我正在阅读不同的示例,但都是通过 UI 的 TFS 创建的,但实际上我的 TFS UI 没有相同的特征,即使我是 TFS 管理员。

当我尝试遵循此指南时:https://www.visualstudio.com/en-us/docs/work/customize/add-wits-to-backlogs-and-boards 当我尝试导入进程配置文件时,我收到一条错误消息,在 TFS 中 UI 我可以看到此错误:

TF400917: The current configuration is not valid for this feature. This feature cannot be used until you correct the configuration. 

Learn about how to correct your configuration 

Details about the validation error appear below:
•The following element contains an error: RequirementBacklog. TF400517: The value of this element is set to: Microsoft.VSTS.Scheduling.StoryPoints. You must set the value to a field that exists in all of the work item types that are defined in RequirementBacklog. The field does not exist in the following work item types: CRM Case.
•The following element contains an error: TypeFields/TypeField[type='Order']. TF400517: The value of this element is set to: Microsoft.VSTS.Common.StackRank. You must set the value to a field that exists in all of the work item types that are defined in Microsoft.RequirementCategory. The field does not exist in the following work item types: CRM Case.
•The following element contains an error: RequirementBacklog/States. TF401098: This element defines the states for work items that appear on your backlog. The state configuration is incorrect. Each work item on this backlog must have one state with the type 'Complete'. The following work item type does not have any state with the type 'Complete': CRM Case.

您需要将您的工作项添加到流程配置中的需求类别 XML。该主题有extensive documentation

UI-based 进程模板配置在 on-premise TFS 中尚不可用。