TFS Work Item Customisation, and the TF26201 error
With the work I’ve been doing defining custom Work Item Types in TFS lately, I came across an interesting problem, to do with TFS’ TF26201 error, so I thought I’d mention it here, along with how I went about sorting it out.
So, having finished the first cut of the first work item type definition, I went to test it, and discovered that some when changing a test work item to certain states and attempting to save, Team Explorer would fail to save in the new state, with an error:
“TF26201: This work item has unsupported fields, or user does not have permissions”.
I googled the error (as you do) and didn’t have much joy. A couple of people found this problem when doing stuff with the W.I.T object model, but I couldn’t find anything about tracking down whats wrong when testing custom work items using Team Explorer. So, to figure out what was causing the problem, heres what I did:
- Edit the work item type definition file, commenting out all field rules in the “To” state, and upload back to server
- Try saving item to the new state, which should work now, as there are now no field restrictions in place for that state
- Uncomment all the field rules from the “To” state again, and again upload to server
- Open work item and try to save as-is, without changes
- Team Explorer will complain about specific fields, instead of the general error message
For the record, the reason I was receiving this error was because I had some fields in a couple of states with “<EMPTY />” rules, scoped to the STATE. Removing these fixed the issue, and I’m going to try scoping these to the a specific TRANSITION instead.