2017-02-17 112 views
2

在TFS 2017中,我只是通過電動工具創建了一個新的工作物品類型;我這樣做:TFS 2017新作品物品類型配置

  1. n Visual Studio,爲您的工作項類型創建一個XML文件。爲此,請在文件菜單上,單擊新建,然後單擊文件。
  2. 在「新建文件」對話框的「類別」下,選擇「常規」,然後在「模板」下選擇「XML文件」。
  3. 介紹XML代碼。
  4. 本地保存爲XML文件。
  5. 用電動工具導入。

XML實例(這是目前只是Field「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」關聯到此類型的元素。

我正在閱讀不同的示例,但都是通過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. 

回答

2

你需要將工作項目添加到Process Configuration XML中的Requirement類別。關於這個問題有extensive documentation

基於UI的流程模板配置尚未在本地TFS中提供。

+0

您剛剛發送給我的頁面解釋了部分過程,我導出了過程配置文件,但我沒有關於新WIT的信息,它解釋瞭如果您編輯WIT並且您想添加新的字段:S –

+1

您希望將工作項類型配置爲需求。 https://www.visualstudio.com/en-us/docs/work/customize/add-wits-to-backlogs-and-boards –

+0

嗨丹尼爾,我遵循你給我的,但我有點問題編號3,因爲系統不讓我導入編輯好的WIP並在UI中收到錯誤消息 –