is there a way to retrieve possible state values for a workitem using .net api?
A:
Yes.
WorkItemStore wis = tfs.GetService<WorkItemStore>();
WorkItemType wit = wis.Projects[0].WorkItemTypes[0];
FieldDefinition fd = wit.FieldDefinitions[CoreField.State];
for (int i = 0; i < fd.AllowedValues.Count; i++)
{
listBox1.Items.Add(fd.AllowedValues[i]);
}
Robaticus
2010-05-25 17:29:21