Search code examples
.netc#-4.0tfs-sdk

Retrieving work items and their linked work items in a single query using the TFS APIs


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) ?


Solution

  • Found an article regarding this issue.

    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.

    Edit: I also wrote a post about this on my blog.