The ability to quickly and easily search for work items using a little search box seams to be a popular Team System wishlist feature. Teamprise has a Java Team Explorer client, which they say they make sales because of their search capabilities alone.
This plugin puts a little search box right into Visual Studio to make it easy to find work items. It is an addin for Team Foundation Client (Team Explorer) and is accessible from the Team menu when you’re connected to a Team Foundation Server and is also avalible from a VS Toolbar. You just type in some search text and it runs a work item query for you showing you results across the work item store.
To install, simple run the installer, then manually add the Work Item Tracking – Search Work Items toolbar to VS. Right-click the VS toolbar and select the toolbar (should be the last one listed).
Vista Users: You have to run setup.exe in the .zip.
After installing, just type what you want to search for, and results are shown across Team Projects and Work Item Types. To search for a keyword across the Title field and History (which contains info on most all other field changes, including Assigned To, etc), just type in your keyword (like widget) and hit [ENTER].
You can also pop up a specific work item by entering it’s ID
You can also search from the Team menu.
You need to be connected to a Team Foundation server first. The first time you search after loading VS it’ll take awhile to load the results because Team Explorer is loading the work item store, just like expanding your Team Project node takes awhile, like “Work Items (working…)”.
To provide a suggestion or bug report, please simply leave a comment on this post. Thanks!
There are a few config options…
You can configure the search SELECT criteria that’s used by editing the work item query template. Just use the command --template to bring up the template. Any occurrences of [search] are replaced with the user’s search criteria.
When a search is performed, the active Team Foundation Server is used. Using @Project in the template will cause the search to be run against the active project (even though it may not in the WIQ template).
I can imagine the most common configuration change would be to filter on the Current Project or Work Item Type and add or rearrange the fields returned (pictured above).
Since “search” is not a fully supported scenario in TFS yet, this tool simple creates a work item query with that uses a Contains condition on the Title and History fields since I’ve found these to be the most useful in a search. But what’s the cost of this on your server?
Long text fields like History and Description have Full Text indexed by default. So searches on these fields are relatively fast, but only match exact text like a search for “crash” would match crash, but not crashes, crashed, crashing. String fields, like Title, are not index so searches take about 3x as long but will match deviations, like crashes and crashed.
You can improve the performance of the searching query by modifying the template (see “Configuration” above) to do some preliminary filtering on the current project, a specific work item type, or remove searching Title.
Here are some of the ideas I’m already toying with for improving the tool. If there’s anything that stands out, let me know in a comment so I can better prioritize the work.
- Provide a GUI for setting configuration options
- Provide a button to “limit to current project”
- Add a drop-down to select the “work item type” to filter on
- Support more advanced searches, like “Title: *Widget*”
- Support using regular expressions in the search
- Support non-English installs of VS
- Consider creating a separate VS Tool Window for search results
- Bug: “Object reference not set to an instance of an object.” Error Sometimes After 1st Search
If the 1st search you do takes awhile, sometimes there is a “Null Reference Exception” error dialog. I haven’t tracked this down because it is intermittent, doesn’t seam to affect any operation, and the last call from my app is to run the query (nothing else) and the error occurs after the query results are shown. Hmmm, maybe a TFS thing?
Wish TFS didn’t lock up the VS UI when running a work item query….
Here are the references I found helpful in creating this tool.
- Visual Studio 2005 Tools for Office CommandBarButton FaceId Property [FaceID Icons]
- Visual Studio 2005 Automation Samples [Command Browse Add-in]
- Visual Studio 2005 SDK v3.0 [VS Addin Project Types]
- HOWTO: Adding buttons, commandbars and toolbars to Visual Studio .NET from an add-in
- Naren’s Blog on Extending VSTS Work Item Tracking UI: Accessing work item UI elements and responding to events
- Blog Post on How to get the active Team Foundation Server and Project from an Add-In
- There are more useful VSTS tools at Accentient’s Team System Widgets page
Hope you find it useful. If so, post a little comment… 🙂
Note: This is not an official Microsoft product or Power Toy. Search capabilities may be in the next version of the product, I don’t know yet.