开发者

TFS state values

is there a way to retrieve possible state values开发者_C百科 for a workitem using .net api?


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]);
    }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜