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
1 回答
3
是的,您可以使用客户端 API 通过获取类 FieldDefinition 的实例并引用AllowedValues属性来获取允许的值。
FieldDefinition.AllowedValues 属性
一个示例代码供您参考。
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);
}
完成状态不是内置字段,应该是自定义字段。
更多详细信息请参阅此博客: 获取 TFS 工作项字段中的允许值列表
于 2018-03-05T10:07:14.993 回答