Custom TFS Work Item Fields

I was trying out some TFS 2010 customization. I have two separate project collections, one of which is for testing out TFS and the other is for production use. I created a few custom fields with the Process Editor for some Work Items on the test project collection and everything worked fine. So happily, I proceeded to create the custom fields (with more production-like names) but was thrown with this error on every Reporting page on my production TFS:

TF221161: There are conflicting definitions of the following work item fields in the warehouse: Custom.ActualHours<->ProjectManagement.ActualHours;. These conflicting definitions come from different project collections. Work items from project collection TFS2010Collection will not be updated until the conflict is resolved. You can resolve the conflict by making the definitions of the field the same in all project collections, or marking the field as non-reportable in the project collection TFS2010Collection.

Note: I lost the actual error message but it is something like the above.

Oh! No! I am gonna get @#$%! I just ruined my production TFS! 

Quickly I went to delete the fields on both project collection - didn't work. I went to reprocess the TFS warehouse - didn't work. I connect to the SSAS cube and manually process it myself - didn't work. 

Finally, I discovered that removing the fields from the Work Items alone is not enough. We need to delete the Work Item Field Type in the collection. To do that, we need to issue the trusty command:

C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE>witadmin deletefield /collection:http://mytfsserver:8080/tfs/tfs2010collection /n:Custom.ActualCost

More documentation on MSDN here.

Reprocess the cube and everything is back to normal now. Phewh!

No comments:

Post a Comment

Popular Post