Udostępnij za pośrednictwem


Search Work Items, Team System Addin

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.

Installing

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).

Downloads and Source Code are now avalible on the CodePlex project at:
https://www.codeplex.com/searchworkitems/

Vista Users: You have to run setup.exe in the .zip.

Using

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...)".

Feedback

To provide a suggestion or bug report, please simply leave a comment on this post.  Thanks!

Configuration

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).

Performance

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.

Thanks to Amit Ghosh, a Dev Lead on TFS, for this info.  Read Amit's full mail on The Cost of Contains.

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.

Improvement Ideas

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....

References

Here are the references I found helpful in creating this tool.

Conclusion

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.

Comments

  • Anonymous
    March 08, 2007
    It is popular request in WIT forums for a tool where keywords can be typed to search across all fields

  • Anonymous
    March 08, 2007
    Know-a-Code posts up a neat little VS add-in that lets you do a free-text search on your work items !

  • Anonymous
    March 08, 2007
    Finally a great Add In that provides keyword search to be searched across all fields in all workitems....

  • Anonymous
    March 09, 2007
    The comment has been removed

  • Anonymous
    March 09, 2007
    The comment has been removed

  • Anonymous
    March 11, 2007
    Does this work with SP1? I have just installed it on WinXP and when loading VS2005 it throws an exception and asks to remove the add in.

  • Anonymous
    March 12, 2007
    Tim Hibbard on TFS Work Item Management Outlook Addin. Noah Coad on Search Work Items, Team System...

  • Anonymous
    March 12, 2007
    Check Noah's post on http://blogs.msdn.com/noahc/archive/2007/03/08/sea... , which publishes an addin

  • Anonymous
    March 12, 2007
    My undertanding of the search of history is that it only searches for comments that where entered in that field (it will not search for contents of other fields, for example the description of the field.). So basically you would need to add more Or statement for Description and anything other common field Ideally a search of history would search all the contents.

  • Anonymous
    March 12, 2007
    Check out this blog post for a work item search tool http://blogs.msdn.com/noahc/archive/2007/03/08/search-work-items-team-system-addin.aspx

  • Anonymous
    March 12, 2007
    Referenced from http://blogs.msdn.com/teams_wit_tools/default.aspx Cool tool!

  • Anonymous
    March 15, 2007
    Many people ask for Work Item Queries to be interactive, to prompt the user for parameters. Noah Coad...

  • Anonymous
    March 16, 2007
    Great little tool my company is using it now.  Thanks a lot Noah.

  • Anonymous
    March 17, 2007
    I returned to work after Tuesday's MSDN Roadshow fired up and full of ideas, eager to try out ASP.NET

  • Anonymous
    March 19, 2007
    Would be great if it would treat each entered word as separate CONTAINS and honors phrases. ie: "build failure" copy type:bug would find the phrase "build failure" and the word "copy" only in items of WIT "Bug"

  • Anonymous
    March 20, 2007
    For those wanting to bundle this toolbar as part of another installer or do an unattended installation the command: msiexec.exe /qb /i SearchWorkItems.msi will suppress the installer launching a web browser to this page.

  • Anonymous
    March 28, 2007
    Just to summarize some great new cool things that are happening in the team system space. First of all

  • Anonymous
    March 28, 2007
    I tried your add-in. It installed without any problems, but I don't have the extra toolbar or the extra menuitems in the team menu. It also doesn't show up in the add-in manager. Any ideas? Btw, I'm running Windows XP, VS2005 SP1 agains a TFS SP1 server.

  • Anonymous
    April 18, 2007
    Some of the common challenges which seem to be plaguing eeryone in the magical world of TFS: Best Practices

  • Anonymous
    May 01, 2007
    In my quest to blog a little review of most of my favorite apps, I come to SnagIt by TechSmith. SnagIt

  • Anonymous
    May 24, 2007
    The comment has been removed

  • Anonymous
    May 25, 2007
    Has anyone else seen the textbox in this app's toolbar disappear?  I reinstalled and it's still an empty toolbar widget.

  • Anonymous
    May 27, 2007
    I recently posted about changing stored credentials used by Visual Studio 2005 Team Explorer. Removing

  • Anonymous
    June 05, 2007
    I have other fields besides the Work Item ID that are strictly number. These are mostly for integration with other systems. It would be nice to be able to search these fields as well instead of all numbers are automatically considered Work Item IDs.

  • Anonymous
    June 13, 2007
    Hi Noah, This feature is great.  Two issues:

  1. Can you add a 'run' button for the mouse?
  2. Doing a text search runs on ALL projects even when a specific project is selected. Thanks
  • Anonymous
    September 14, 2007
    Great little tool. Just works. Should be part of the product :-)

  • Anonymous
    September 18, 2007
    I really like the tool and want to use it also in the VS2008 beta but I can't seem to get the Orcas version running. After the installation finishes, it tries to download/run the setupSearchWorkItemsVS05.zip. I can see the entry in the Program Files Coadnet folder, but I can not find the toolbar in VS or see the entry in the Team menu Any idea what may be wrong or how to find out ? BTW: The installer spells "Oracs"

  • Anonymous
    September 20, 2007
    I used the --template command and it worked great, but now I want to tweak my template again and the --template command no longer works...Any suggestions?

  • Anonymous
    October 06, 2007
    The comment has been removed

  • Anonymous
    October 06, 2007
    After the installation finishes, it tries to download/run the setupSearchWorkItemsVS05.zip.

  • Anonymous
    October 09, 2007
    Looks like a great tool... however, after installing it in both VS 2005 and Orca, I am finding that it shows up in the Add-in Manager, but NOT "View Toolbars" or "Team". Any suggestions?

  • Anonymous
    October 22, 2007
    The Visual Studio Industry Partners conference is going on right at the Redmond Marriott hotel in Redmond,

  • Anonymous
    October 28, 2007
    This is really helpful tool for searching workitems, but there is problem while installed in visual studio 2005 - team edition for software developers. Actually, There is visual studio 2005 - team edition for software developers on my machine. I have installed search workitems utility, after installation it is showing toolbar for  Work Item Tracking - Search work Items, but it does not displayed in Team menu or on tool bar. Please help for the same. Thanks in advance.

  • Anonymous
    October 28, 2007
    FYI!  - It was running fine with the VS2005 - Professional edition. can anyone help for the same! Chital Panchal

  • Anonymous
    November 26, 2007
    I was very interested in this add-in However, when I start VS.Net I received the following message : the Add-in 'Search Work Item" failed to load or cause an exception. blablabla... ErrorMessage: <unknow error> Error number: 8013150a We are using VS.Net 2005 Enterprise, Team Edition for Developers  Version 8.0.50727.762  (SP.050727-7600) Microsoft Visual Studio 2005 Team Explorer - ENU Service Pack 1 (KB926601)   Team Foundation Server Power Tools   1.2 Any idea of the blocking issue ? I have this error in my EventVwr : aspnet_wp.exe could not be started. The error code for the failure is 80004005. This error can be caused when the worker process account has insufficient rights to read the .NET Framework files. Please ensure that the .NET Framework is correctly installed and that the ACLs on the installation directory allow access to the configured account. ? :/ Valery.

  • Anonymous
    November 26, 2007
    Sorry, I found a solution (but not sure of the reason). I have moved the addin from %VSMYDOCUMENTS%Addins to %APPDATA%MicrosoftMSEnvSharedAddins and it works now fine! %VSMYDOCUMENTS% is on a network drive and I suspect that the customer I am currently working for has added some restrictions on this folder... Valery.

  • Anonymous
    November 27, 2007
    For those who installed this without any errors but the addin never shows up, I figured out why- at least in my case... I had moved my "My Documents" directory from the default location in Documents and Settings to a different location at 1 point in time, and Search Work Items was installing Team System addins in that new location. However, Team System was looking in "C:Documents and Settings<user>My DocumentsVisual Studio 2005Addins" (I suspect this is the %VSMYDOCUMENTS%Addins path). You could fix this like I did by copying the addins directory to the original path the addin was expected in, or I suspect you could add the new path to the addins file path (Under Tools->Options->Environment->Add-in/Macros Security). Credit goes to this page, who mentioned where the add-ins get installed for Team System. http://www.developermania.com/newsgroups/category/4/189/microsoft_public_vsnet_ide.aspx

  • Anonymous
    November 27, 2007
    This link may be better since it jumps directly to the topic :) http://www.developermania.com/newsgroups/item/169967/Addins_not_being_listed_in_the_addin_manager_.aspx

  • Anonymous
    November 30, 2007
    Due to popular demand for community participation in further development, I've posted the Search Work

  • Anonymous
    December 05, 2007
    Cannot get this to work on Vista... Please help.

  • Anonymous
    December 06, 2007
    The comment has been removed

  • Anonymous
    April 21, 2008
    I still have the problem described on codeplex - I see the addin in the addin mgr but nothing appears to be loaded.  I have restarted several times.

  • Anonymous
    April 25, 2008
    IT doesnt work. Installed fine without any errors. I can even see it in the Add-In Manager but No tool bar is available in the list.

  • Anonymous
    April 29, 2008
    I had the problem where it didn't appear for me, and neither in the Add-Ins Manager. I'm running Windows XP SP2 and Visual Studio 2008 Release Version. I installed the VS90 (Orcas) version of this add-in. The Problem: It creates the folder: "..My DocumentsVisual Studio Codename OrcasAddins" and puts the necessary files there. However the release version of Orcas creates: "..My DocumentsVisual Studio 2008" folder. The installer for the tool was created during the beta releases of Orcas, so that makes sense. The Solution: Just move the Addins folder under "..My DocumentsVisual Studio Codename Orcas" ---> "..My DocumentsVisual Studio 2008". Restart Visual Studio and your addin will appear!

  • Anonymous
    April 30, 2008
    Note that you shouldn't move the Addins folder, but just copy it. VSTS 2008 loads the addin from the "Visual Studio 2008" folder, but the plugin looks for the query template in "Visual Studio Codename Orcas" folder.

  • Anonymous
    May 16, 2008
    Other potential enhancements:

  • Ability to edit the MRU (especially to remove mispelled search terms)

  • Ability to maintain multiple templates and select which one to use for the search. For example, the different templates could expand the fields that are searched (Title only, Title + History, etc.) or the scope of the search (current project vs. all projects)

  • Ability to enter a number as the search value and not get "The work item does not exist, or you do not have permission to access it."

  • Anonymous
    June 20, 2008
    Consider making this add-in a part of Team Foundation Power Tools - it would definitely be a worthwhile addition to TFPT!

  • Anonymous
    June 20, 2008
    Поиск рабочих элементов, содержащих заданный текст - задача, встречающаяся довольно часто. Однако же,

  • Anonymous
    June 30, 2008
    I've installed the VS2008 version and I'm abled to see it both as a toolbar and in the Team menu. But whenever I'm entering something and pressing [ENTER] nothing happens ...

  • Anonymous
    August 11, 2008
    New Updates!  VS 2008 Support + more Thanks to William Bartholomew, version 2.0 now supports Visual Studio 2008 as well as Visual Studio 2005, fixes the install problems, and contains a number of small updates. I've also moved documentation to the CodePlex wiki where we can make feature improvements and easily document them. http://www.codeplex.com/searchworkitems/Wiki/View.aspx?title=Documentation

  • Anonymous
    September 18, 2008
    The comment has been removed

  • Anonymous
    September 22, 2008
    Hey Jens, I like the idea and would love to have you implement it.  The project is open source on CodePlex and if you send me your CodePlex user ID I'll add you as a developer.

  • Anonymous
    March 30, 2009
    I was also struggling with no menu items and no toolbar showing up. In my case the Visual Studio 2008 SDK was missing. You can download that from msdn downloads. Devenv /log did report an exception produced by the addin, but the information there was not conclusive. So I downloaded the source code. As I loaded the project into my dev environment, the reason for the failure was obvious. :-) Minor change request: Is there a general way to lookup for missing namespaces? It would help if the installation process and the startup process would find and report missing namespaces.

  • Anonymous
    November 10, 2009
    Figured out the way for the menu to show up. Here's the sequence of installation that made it work for me -

  1. Uninstall the Search Work Items (if already installed)
  2. Uninstall Team Foundation Power Tools (if already installed)
  3. Install SetupSearchWorkItems.msi (old version - may not be required)
  4. Install SearchWorkItemsSetup-2.1.0.en-us.msi (new version)
  5. tfpt.msi (Team Foundation Power Tools March 2008 release)
  • Anonymous
    January 04, 2010
    The comment has been removed

  • Anonymous
    January 21, 2010
    I love this tool!  I have both VSTS2005 and 2008 installed and installed the latest version.  It shows up fine in VSTS2008 but does not appear in VSTS2005 at all. I can see it in the add-in list, but that is it.

  • Anonymous
    August 08, 2010
    The comment has been removed

  • Anonymous
    September 22, 2010
    This tool is fantastic, I use it all the time. Sadly I now have upgraded to VS9 and it no longer works. Any plans for upgrade?

  • Anonymous
    October 25, 2010
    Like Olga I found this tool fantastic.  However we have also upgraded to VS09 and it will no longer search on text, only on the work item number.  Trying to search on text gives the message "There is a problem on the server." Looking forward to an upgrade if you do it.

  • Anonymous
    December 07, 2010
    Wendy, you should rebuild full-text search index on your server.

  • Anonymous
    February 23, 2011
    @hsimah I had the same problem. I solved it by going to Tools > Customize and then on the Commands tab looking at the Addins category. In the Commands list there should be a Search Work Items option which you can then drag to a toolbar. Hope that helps.

  • Anonymous
    September 09, 2012
    I installed it and tried on VS 2010, it works. Now the issue is that i have both VS 2010 and 2008 installed on my system and when i enter "--template" in 2010, it tries to open VS 2008 and therefore i am not able to edit the default search template. Please help

  • Anonymous
    June 06, 2013
    I can't quite get this working in VS 2012. I updated the <SupportedPoducts> to version 11.0 but it is crashing my VS team explorer.  any ideas?  Thanks.