Share via


Writing Queries for Custom Work Items and Work Item Categories

I talked about customizing work items and how this can be used with categories to get the best out of MTM before, now I will expand on that topic and show you how to compose queries to include this extra level of information.

If you go to the Queries activity in MTM (under the Tracking menu) and select the out of the box query Team Queries->My Bugs, you will see that these queries are constructed with the clause Work Item Type = Bug.

mybugsquery1 

This will only show work items of the specific type Bug, and we want to show all of the different work items which are part of the Bugs Category. To do this, you need to modify your query to change the clause “Work Item Type = Bug” to use “Work Item Type In Group Bug Category”.

mybugsquery2Notice how the different bug work item types show up in the results.

 

Thanks,
Guillermo Serrato