开发者

TFS state values

开发者 https://www.devze.com 2022-12-31 19:26 出处:网络
is there a way to retrieve possible state values开发者_C百科 for a workitem using .net api?Yes. WorkItemStore wis = tfs.GetService<WorkItemStore>();

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

精彩评论

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

关注公众号