Tip: Embedding Queries Within Your Work Items
I stumbled on a way to incorporate work item queries within a work item. In order to do this you must first modify a .wiq file. To obtain a .wiq file, download a process template from the Team Portal using the Process Template Manager (Team > Team Foundation Server Settings > Process Template Manager). Once it has been downloaded, your queries can be found in the MSF for \WorkItem Tracking\Queries directory. Here is a sample of the standard "All Work Items" query (found in AllWorkItems.wiq):
<?xml version="1.0" encoding="utf-8"?>
<WorkItemQuery Version="1">
<Wiql>SELECT [System.Id], [System.WorkItemType], [System.State], [System.AssignedTo], [System.Title] FROM WorkItems
WHERE [System.TeamProject] = @Project
ORDER BY [System.WorkItemType], [System.Id]
</Wiql>
</WorkItemQuery>
Simply change @Project to the name of the Team Project associated to the work item. For example:
WHERE [System.TeamProject] = "MyTeamProject"
Save your query file, go into work item tracking, select a work item, click on the File Attachments tab and then attach the .wiq file. The limitation is that if you don't rename @Project to a valid Team Project on your Team Foundation Server you will get an error. To launch the query, open up the work item and double-click on the .wiq file.
One of the uses of this technique is to quickly get to your tasks by scenario. Feel free to post if you have any questions about the technique or any comments.