TFS: Work item type is not allowed to be added as

2019-03-03 21:05发布

问题:

I just finish to generate my custom WIT (work item type= CRM Case), I add the relative information in the categories s child of RequirementCategory:

<?xml version="1.0" encoding="utf-8"?>
<cat:CATEGORIES xmlns:cat="http://schemas.microsoft.com/VisualStudio/2008/workitemtracking/categories">
  <CATEGORY refname="Microsoft.FeatureCategory" name="Feature Category">
    <DEFAULTWORKITEMTYPE name="Feature" />
  </CATEGORY>
  <CATEGORY refname="Microsoft.RequirementCategory" name="Requirement Category">
    <DEFAULTWORKITEMTYPE name="User Story" />
    <WORKITEMTYPE name="CRM Case" />
  </CATEGORY>
  <CATEGORY refname="Microsoft.TestCaseCategory" name="Test Case Category">
    <DEFAULTWORKITEMTYPE name="Test Case" />
  </CATEGORY>

Then I add it in the Process Configuration to specify the new field used and the color:

My problem now is that I can associate the "CRM Case" as a general "User Story" Link but I can't associate as implementation, how can I do it? If you are asking why I want do it is because I want retrieve the test case associate to a User Story when I create a query.

What am I doing wrong or forgetting?

回答1:

You need to use the LinksControlOptions element to define the options for controlling what links can be added to a work item and the default columns that you want to appear for the list of links in a work item.

When you add a links control to a work item form, you can specify filters that restrict the types of links that users can be view and create and the types of work items to which users can create links.

For more details please refer LinksControlOptions XML elements (Web form), this topic applies to team project customization for Hosted XML and On-premises XML (TFS 2017 and later versions) process models.