检索工作项和他们联系在一起的工作项目在一个查询中使用TFS的API工作、项目、API、TFS

2023-09-03 00:32:13 作者:突然狠想祢

有谁知道是否有可能利用他们的TFS API网络服务中检索从TFS一次旅行的工作项目和他们的联的工作项列表?

Does anyone know if it is possible to retrieve a list of work items and their linked work items in one trip from TFS using their TFS API web services?

目前,我们都不得不做出第二个电话为每一个第一次调用期间所做的工作项目,并引入服务表现的问题。

At the moment, we are having to make a second call for each of the work items made during the first call, and is introducing a performace issue.

如果这不是可能,是有办法偷看链接的工作项的类型不检取(例如看看是不是一个任务或问题)?

If that is not possibly, is there a way to peek at the type of the linked work item without retrieving them (e.g. See if it is a task or issue) ?

推荐答案

发现的关于这个问题的文章。

它可以让你用一棵树的查询,在那里你可以得到父项ID和它的链接项目的ID在一个查询。用这种方法,第二个查询可以被用来获取实际的具体工作项目的对象。两次查询解决问题。

It allows you to use a tree query, where you can get the parent item ids and it's linked items ids in one query. Using this, a second query can be used to get the actual detailed work item objects. Two queries to solve the issue.

编辑:我也写了的发布这个在我的博客。

I also wrote a post about this on my blog.