TFS 2017新工作项类型配置

时间:2017-02-17 15:02:15

标签: xml visual-studio-2015 tfs tfs-power-tools tfs2017

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

  1. n Visual Studio,为您的工作项类型创建XML文件。为此,请在“文件”菜单上单击“新建”,然后单击“文件”。
  2. 在“新建文件”对话框的“类别”下,选择“常规”,然后在“模板”下,选择“XML文件”。
  3. 介绍XML代码。
  4. 在本地保存为XML文件。
  5. 使用电动工具导入。
  6. XML示例(它只是字段“TITLE”,因为我之前想要测试它,但是会出现其他2个字段,“描述”和“案例编号”):

    <?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中看到新的工作项类型: CRM Case Work Item

    现在的问题是2:

    1. 我希望在待办事项中看到我的新工作项类型;
    2. 我希望能够将“测试用例”或“用户故事”或“bug”与此类元素相关联。
    3. 我正在阅读不同的示例,但都是通过TFS的UI制作的,但即使我是TFS管理员,我的TFS UI也没有相同的特性。

      当我尝试遵循本指南时: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.
      

1 个答案:

答案 0 :(得分:2)

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

基于UI的流程模板配置尚未在内部部署TFS中使用。