TFS Work Item Explorer Executive Summary
05/01/2009: TFS 2010 will obsolete this project!
The Visual Studio Team Explorer work item datasheet view is quite limited in functionality. The TFS Work Item Explorer tool allows developers to define their own custom drilldown tree of WIQL queries in an XML file (“template”), leveraging global values (e.g. server name, project name, etc.), field values (of parent queries of any generation) and user choices (a.k.a. parameters). Each TFS project can be associated with its own template via the application configuration file stored under the user's profile. Out of the “box”, TFS Work Item Explorer includes a Scrum for Team System template, which mimics the behavior of the now deprecated Scrum Explorer tool.
05/01/2009: TFS Work Item Explorer v1.2.0 'd' will be released as source code (VS 2008 SP1). NOT COMPLETE!
TFS Work Item Explorer How-to:
Application Configuration
By default, the application configuration file is stored at:
%userprofile%\local settings\application data\TFS Work Item Explorer\TfsConfiguration.xml
It is basically an XML serialized graph of objects which represent the TFS servers and projects you wish to use.
TFS Server and Project Setup
To get started, fire up TFS Work Item Explorer and click the 'Add Team Foundation Server' toolbar button. Enter the requested values and click the 'OK' button. You should now see a new tree node in the tree representing the TFS Server you just added.
Next, click to select the TFS Server tree node you created and click the 'Add Team Foundation Project' toolbar button. A list of TFS Projects to which you have access to and not have been previous added are shown. Choose one or more TFS projects to add and click the 'OK' button. You should now see one or more new tree nodes rooted under the TFS Server tree node.
Finally, select one of the TFS Project tree nodes you just added and click the 'TemplatePath' property in the property grid to edit the template file name. An open file dialog should appear. Select the query template XML file you wish to use. (You may also enter a file name manually in the property grid; file names must be absolute or relative to the application executable path.)
Creating Query Template XML Files
Out of the “box”, TFS Work Item Explorer includes a Scrum for Team System template, which mimics the behavior of the now deprecated Scrum Explorer tool. This template is located in the application executable folder, in a file named ScrumTemplate.xml. This file is an excellent example of how to create your own template files.
A query template XML file is very simple. You begin with a <Template> document element. You can assign a title attribute to describe the template. Any number of <Query> elements can appear as grandchild elements under an optional single <Queries> child element. to a <Template> element. <Query> elements can in turn have any number of <Query> elements as grandchild elements under an optional single <Queries> child element. (Think: N-level deep tree of queries) Any <Query> element can have a title attribute to describe the query and an execute attribute which contains the Work Item Query Language (WIQL) to execute with embeded TFS Work Item Explorer parameters.
The beautiful part of the TFS Work Item Explorer query engine is its ability to leverage three type of parameters in its query template XML files. TFS Work Item Explorer supports global parameters, field parameters, and user choice parameters.
There are three gloabl parameters defined: ${::servername} (get currrent server name of the current template), ${::projectname} (get currrent project name of the current template), and ${::username} (get currrent user display name of the credentials used to authenticate to the server of the current template).
Field parameters are used to refer to values of TFS Work Items at varying levels above the current query execution context. This allows for flexible drill-down queries. The format of a field parameter is: ${X::Y}; where X is an integer value from 1-255 specifying how many level above the current TFS Work Item and Y being the TFS Work Item Field name of interest.
User choice parameters allow the user to be prompted for a TFS Work Item field value. The format of a user choice parameter is: ${?::X}; where X is the TFS Work Item Field name of interest.
You can leverage global, field, and user choice parameters anywhere within a WIQL query. Within the title attribute of <Query> elements, you can embed global and field parameters only. NOTE: Repeated parameters are ignored.
Running Work Item Queries
(TODO)
Resyncing and Editing Work Items
(TODO)