Charmander
Charmander

Reputation: 276

Get a list (and count) of bugs raised per Iteration in TFS 2015

I'd like to be able to get a list with the bugs raised during a Sprint against any of the PBIs in that Sprint. Is there a way to achieve that? We are currently using TFS 2015 with its Scrum template.

So far I've managed to run a custom query in which I retrieve all the work items with the following criteria:

However, this approach is far from ideal, given that I need to hardcode the dates, and if I want to compare how we've been doing Iteration after Iteration in terms of bugs raised, I need to create several queries and manually update them.

Can you think of a better approach?

Thanks!

Upvotes: 1

Views: 1038

Answers (1)

PatrickLu-MSFT
PatrickLu-MSFT

Reputation: 51093

It's not able to do this based on a single query, try to do this through API. You can query for bugs, tasks, other types of work items, and links between work items by using one of the WorkItemStore.Query methods or a Query object.

You could use WIQL to do this. According to this tutorial msdn, use the Under comparison operator in your query. A sample to pull all work items in an Iteration,

select [System.Id], [System.WorkItemType], [System.Title], [System.AssignedTo], [System.State]
from WorkItems
where
  [System.TeamProject] = 'VieroSAT'
  and [System.State] = 'Dev'
  and [System.IterationPath] Under 'Iteration1'
order by [System.Id]

You could also import all bugs /PBIs for each iteration including the created data info to a Excel List. With the help of powerful Excel tool to filter and generate chart or tables you need.

Upvotes: 1

Related Questions