Reputation: 563
Is it possible to query the workitems of 2 different projects in the DefaultCollection with a single call. If so, how?
Upvotes: 1
Views: 868
Reputation: 52798
You can do it be creating a WIQL query using the IN
operator and listing the Team Projects
you're interested in.
For example:
var wiql = @"SELECT *
FROM WorkItems
WHERE [System.TeamProject] IN ('Project1', 'Project2')";
using (var tfs = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(uri)
{
tfs.EnsureAuthenticated();
var store= tfs.GetService<WorkItemStore>();
var workItems = store.Query(wiql);
}
Upvotes: 3