how to find all the Values of Field such as Done status,Workitemtype and state
Image attached.
workitem type fields with it's values
State field with all it's value's
Done status with it's value's
Yes, you could use client API to get allowedvalues by getting an instance of class FieldDefinition and referencing the AllowedValues property.
FieldDefinition.AllowedValues Property
A sample code for your reference.
var tfs = TeamFoundationServerFactory.GetServer("http://vstspioneer:8080/tfs/VSTSDF");
var workItemStore = (WorkItemStore)tfs.GetService(typeof(WorkItemStore));
var allowedValues = workItemStore.FieldDefinitions[xxx.xxx].AllowedValues;
foreach (String value in allowedValues)
{
Console.WriteLine(value);
}
Done status is not a build-in filed, should be a customize field.
More details please refer this blog: Get List of Allowed Values in TFS Work Item Field
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With