Reputation: 1477
In TFS 2017 I just create a new work item type via power tool; I did in this way:
XML Example (it's present just the Field "TITLE" because I wanted test it before but will be present other 2 fields, "Description" and "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="&Title:" LabelPosition="Left" />
</Column>
</Group>
</Layout>
</FORM>
</WORKITEMTYPE>
</witd:WITD>
Once that I upload the file I could see the new work item type in TFS:
The problem now are 2:
I was reading different examples but are all made via UI of TFS but really my TFS UI doesn't have the same characteristics even if I'm the TFS admin.
When I try to follow this guide: https://www.visualstudio.com/en-us/docs/work/customize/add-wits-to-backlogs-and-boards when I try to import the process configuration file I receive an error message and in the TFS UI I can see this error:
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.
Upvotes: 2
Views: 2123
Reputation: 58980
You'll need to add your work item to the Requirement category in the Process Configuration XML. There is extensive documentation on the subject.
The UI-based process template configuration is not yet available in on-premise TFS.
Upvotes: 2