I use TFS client-side libraries like Microsoft.TeamFoundation. * assemblysies ... Given that I have an iteration name, how do I get all the work items that belong to it?
I tried the following with a Query object:
var uri = new Uri(ConfigurationManager.AppSettings["TfsUri"]); var tfs = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(uri); var wiStore = tfs.GetService<WorkItemStore>(); var queryText = "select [System.Id], [System.WorkItemType], [System.Title], [System.AssignedTo], [System.State] from WorkItems where [System.TeamProject] = 'VieroSAT' and [System.State] = 'Dev' order by [System.Id]"; var query = new Query(wiStore, queryText);
but I can't figure out how to limit the results to an Iterative name. And I would rather return these values ββusing TFS assemblies, but I cannot find a suitable method.
So my questions are ...
- How to return a list of all work items in an iteration using only TFS assemblies (for example, without queries).
- If # 1 is impossible, how to do it, but using a Query object.
source share