Tuesday, December 2, 2014

TFS 2013.4, Team Fields, Test Plan Work Item Definition, and the quest for the missing backlog

At my current assignment we upgraded to TFS 2013.4 from TFS 2013.2 last night. Everything went swimmingly as expected with the install and the upgrade but when we went to look at the backlogs a configuration error showed up.

TF400917: The current configuration is not valid for this feature. This feature cannot be used until you correct the configuration.


Details about the validation error appear below:
  • The following element contains an error: TypeFields/TypeField[type='Team']. TF400517: The value of this element is set to: MyCompany.TeamField. You must set the value to a field that exists in all of the work item types that are defined in Microsoft.TestPlanCategory. The field does not exist in the following work item types: Test Plan.

For fun, I did follow the link it provided for additional detail but when looking at the error message it seemed fairly clear as I've dealt with something similar in the past regarding Team Fields.  

It is important to note that we have customized our process template (every time I say this, Angela's blood pressure goes up a little bit ;)) and as such that provides certain challenges when we upgrade. 

By default, the included process templates use the Area Path as the way to define teams and their associated backlogs.  However, if you are using the Area Path for another purpose in organization or work items, Microsoft did us a solid by allowing us to define another custom field for storing team association.  

One thing learned in the past is that in order for the Team Field to work correctly, it must exist in all work item definitions.  In the past (2013.2) it seemed to only affect the visibility of the items vs. causing an actual exception.  That has apparently changed in the most recent releases as seen with the error above.  

To solve the issue simple export the work item definition for a Test Plan work item type with something similar to.

witadmin exportwitd /collection:http://myservername:8080/tfs/DefaultCollection /p:MyProject /n:"Test Plan" /f:"TestPlan.xml"  

From here, make the same modifications you have in other work item types assuming you've already made these modifications to other work item definitions and not the Test Plan definition.  

<FIELD name="Team" refname="MyCompany.TeamField" reportable="dimension" type="String"></FIELD>

And the same for displaying that in the work item window.

<CONTROL emptytext="<None>" fieldname="MyCompany.TeamField" label="Team" labelposition="Left" type="FieldControl"></CONTROL>

Last step is to save and import the modified Test Plan work item definition.

witadmin importwitd /collection://http://myservername:8080/tfs/DefaultCollection /p:MyProject /f:"TestPlan.xml"

Refresh TWA and your backlog should be available again!

Note:, You may find that test plans are not listed in TWA under the Test navigation hub. This is likely because a known team is not assigned to the Test Plan.  To correct, simply find the test plan ID (which you can get from MTM), search this work item ID in TWA, and assign the appropriate team in the team field we just designated.  Refresh again, and your plans are available!



No comments:

Post a Comment