无法以编程方式从TFS检索工作项的严重性 [英] Unable to retrive Severity of a workitem from TFS programatically
本文介绍了无法以编程方式从TFS检索工作项的严重性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正尝试从TFS检索工作项的详细信息,如下所示
I''m trying to retrieve details of work items from TFS as below
tpc = new TfsTeamProjectCollection(new Uri(tfsCollection));
string query = @"Select [State], [Title],[Severity] From WorkItems Where [Work Item Type] = 'Bug' AND [Area Path] = '" + areaPath + "' AND [Iteration Path] = '" + iterationPath + "' AND [Team Project]='" + projectName + "'";
workItemStore = (WorkItemStore)tpc.GetService(typeof(WorkItemStore));
我可以检索工作项的状态和标题,但不能检索严重性.
WorkItemCollection中的严重性"没有属性.
I''m able to retrieve State and Title of the workitem but not Severity.
There is no property for Severity in WorkItemCollection.
WorkItemData workItemData = new WorkItemData();
workItemData.WorkItemTitle = queryResults[i].Title;
workItemData.WorkItemState = queryResults[i].State;
如何以编程方式从TFS检索工作项的严重性和优先级?
How can we retrieve Severity and Priority of the workitem from TFS programmatically?
It would be great if you can help me out..
推荐答案
您可以获取以下任何字段值,
queryResults [i] .Fields ["Severity"].Value;
You can get any field value as below,
queryResults[i].Fields["Severity"].Value;
这篇关于无法以编程方式从TFS检索工作项的严重性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文