To extend our ALM offering, we are building some custom tools that interact with TFS 2010 work item tracking via the client object model
I noticed one very strange thing while implementing some query features. When querying for links, we specify "FROM WorkItemLinks" in the WIQL and then use Query.RunLinkQuery() to get the results. The results consist of an array of WorkItemLinkInfo objects. These contain only the link type, and the source and target work item IDs. So specifying anything other than "SELECT [System.Id], [System.Links.LinkType]" has no effect.
But if we look at the built-in link based queries in VS2010 and examined their WIQL, there are always tons of fields in the SELECT clause even though they specify "WorkItemLinks" in their FROM clause. If I run one of those queries from the client object model those fields aren’t returned.
I’m speculating that Team Explorer does some of kind of parsing that converts the WorkItemLinks query to a combination of WorkItems and WorkItemLink queries.
Anyone who knows if I’m correct?