For a project I had to create some TFS Work Items programmatically using the TFS API. However saving the work item resulted in the following error message:
So what’s inside this arraylist? A quick sample:
This will give you all the information you need to know why this workitem cannot be saved.(In this case the field System.State has an InvalidListValue).
TF237124: Work Item is not ready to saveThis error message doesn’t expose any useful information. What’s important to know is that you can configure a lot of rules before a work item is valid. If one of these rules is invalid, saving the work item will result in the above error message. Therefore it’s important to validate the WorkItem prior to save. The validate() method will return an arraylist of invalid fields.
ArrayList result= wi.Validate();
So what’s inside this arraylist? A quick sample:
This will give you all the information you need to know why this workitem cannot be saved.(In this case the field System.State has an InvalidListValue).