xml - TFS 2017 新工作项类型配置

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

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

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

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. 我希望能够将“测试用例”或“用户故事”或“错误”与此类型的元素相关联。

我正在阅读不同的示例,但都是通过 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.

最佳答案

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

基于 UI 的流程模板配置在本地 TFS 中尚不可用。

关于xml - TFS 2017 新工作项类型配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42301071/

相关文章:

java - 如果我使用权重布局,那么我的Java文件无法通过id找到 View

windows - 安装了什么 Windows 工具包

typescript - VS 2015 中是否会有通用应用程序的 TypeScript 模板?

azure - 我们如何在Azure发布管道或测试计划中发布HTML报告(在代理计算机上生成)?

tfs - 为什么将 Visual Studio 解决方案添加到 TFS 时空文件夹会消失?

tfs - checkin 时 Visual Studio 崩溃

java - 如何从java中的编码中查找语言环境

xml - maven 和 xml 解析的 Hibernate 依赖问题

java - 如何在Ant build.xml中添加log4j.xml路径

gruntjs - Visual Studio 2015 : Destination wwwroot/css/site. 未编写 css,因为未找到源文件。