Geeks With Blogs

News
Mike Parks Code.Where(c => c.IsTechnicalDebt).Refactor();

A few months ago I was constantly using Visual Studio 2008 with Team Foundation Server 2008. Searching for work items with queries inside Visual Studio became a pain until I found an add in that simplified it into one little search box in the IDE.  It allowed me to enter some text in, hit the enter key, and it would bring back a list (aka open a .wiq file) of work items that matched the text entered. I became a huge fan of Noah Coad's Search Work Item Add In. He wrote a pretty good blog on how to use it as well.

Of course when we upgraded to Visual Studio 2010 and Team Foundation Server 2010, the 2008 add in no longer worked. I didn't see any updates for it on codeplex to be 2010 compatible. Cory Cissell and I have published a few Visual Studio Extensions already so I figured I'd take a shot at making this tool 2010 compatible by turning it into an extension. Sure enough, it worked. We used it locally for a while and recently decided to publish it to the Visual Studio Gallery.

If you are currently looking for an easy way to search work items in Visual Studio 2010, this is worth checking out. Big thanks goes out to Noah for originally creating this on codeplex.

The extension we created can be downloaded here: http://visualstudiogallery.msdn.microsoft.com/en-us/3f31bfff-5ecb-4e05-8356-04815851b8e7

 

 

 * Additional note: The default search fields are Title, History, and Description. If you want to modify which work item fields are searchable, type in "--template" (no quotes) into the search box and hit enter. This will open the search template. Just add another "Or" statement, pick the field name, select an operator, type "[search]" (no quotes) in the value field, and hit ctrl + s to save. The next time you run a search it will use the modified search template.

That's all for now. Thanks!

- Mike

Posted on Thursday, May 20, 2010 11:43 PM | Back to top


Comments on this post: Search Work Items for TFS 2010 - New Extension

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
Wow.
This seems like a useful extension.
Does it work with Team Explorer 2010?
Left by johan on May 26, 2010 4:23 PM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
Thanks Johan, and if you're referring to the stand alone version of Team Explorer 2010 then it is not compatible. The user must have Visual Studio 2010 installed to run this since the vsix installer is only made to be installed using the built in Visual Studio 2010 Extension Manager.
Left by Mike Parks on May 27, 2010 2:34 PM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
Too bad.
I really wish wiql had a prompt parameter.
Our testers and project managers use Team Explorer, so they'll won't be able use this extension, but our devs will get alot of use of this.
Really apriciate your effort!
Left by Johan on May 27, 2010 2:59 PM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
No problem, thanks for your feedback.

If you have TFS 2010 installed, you might want to let them know they can use the Team System Web Access to search through work items. In the upper left hand corner, there is a text box that says "Enter Search Text". You should be able to search work items from there. I'm not sure exactly what fields it searches off of though. I'm thinking just Title and Description, I'd have to look it up though.
Left by Mike Parks on May 27, 2010 3:24 PM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
You might consider adding the "Steps to Reproduce" field from the Bug WIT to the default list of what gets searched. It's a new field in MSF Agile, MSF CMMI, and Scrum templates for TFS 2010.
Left by Ed Blankenship on Jun 25, 2010 9:07 AM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
Thanks for the tip Ed. I haven't updated it in a while, I'll have to go back and add that in when I get a chance. Should be a quick update.
Left by Mike Parks on Jul 06, 2010 1:55 PM

# Works for TFS2008 as well
Requesting Gravatar...
Well done,

It works for VS2010 with TFS 2008 as well, maybe the name should be Search Work Items for VS 2010 and any TFS

RM
Left by RM on Jul 12, 2010 6:17 AM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
Thanks RM, yeah I actually just named it that way since Noah Coad already named his Search Work Items. So I didn't want to mix the two up. I was aiming to let everyone know this was the newer version.
Left by Mike Parks on Jul 13, 2010 2:32 PM

# re: Search Work Items for TFS 2010 - Express edition
Requesting Gravatar...
I have TFS 2010 Express edition (some of the modules) installed, icluding the Extension Manager.
When I try installing 'Search Work Items for TFS 2010' I get the message 'This extension is not installable on any currently installed products.'
Which express editions do I need to install Search Work Items for TFS 2010?
Left by Amron on Aug 03, 2010 4:34 AM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
Visual Studio 2010 Express editions don't support TFS or Team Explorer (from what I've read, haven't tried it out). But since we need those TFS GAC DLL's to run the extension it can't be installed on the Express editions.
Left by Mike Parks on Aug 03, 2010 3:20 PM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
Amron, I pushed out an update to the Search Work Item extension just a few minutes ago. I allowed access for the Visual Studio Shell to install this extension. Team Explorer must be installed in order for this to work. The Visual Studio Shell + Team Explorer version can be downloaded here:

http://www.microsoft.com/downloads/details.aspx?familyid=FE4F9904-0480-4C9D-A264-02FEDD78AB38&displaylang=en

I had a friend test this out and we got it working. The express editions still will not work but the Shell version with Team Explorer will now. Thanks

- Mike
Left by Mike Parks on Aug 04, 2010 3:16 PM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
Any chance it can be tweaked so that it doesn't forcibly re-display the toolbar every time I launch VS2010?

I've customized the command into my menu-bar (as I do with everything... I like to minimize the vertical space being used) and closed the toolbar. But it always comes back. :(
Left by Ian Prest on Dec 08, 2010 5:05 PM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
Thanks for the update Mike! I'm glad you've found it helpful and appreciate how the community has kept it alive.
Left by Noah Coad on Jan 19, 2011 10:03 AM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
Sorry about that Ian, I think that was something I added in along the way since I always wanted it to show up. It's been a while since I've worked in it. We've been really busy lately but if I get some time I'll try and go back and take a look at it.
Left by MikeParks on Jan 21, 2011 10:35 AM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
Hey Noah, thanks for the response. I was actually wondering if you'd ever see the extension out there :) Thanks for publishing it on CodePlex, huge help. I wish they would have just built the feature in Visual Studio 2010..lol

- Mike
Left by Mike Parks on Jan 21, 2011 10:52 AM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
Which version of Visual Studio are you using? Is it an Express Edition? If you are using an Express Edition of Visual Studio, Microsoft has set limitations on these products and TFS integration is not supported.
Left by Mike Parks on Mar 03, 2011 7:56 AM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
How can I make the plugin search for a specific team project? I tried to add an and clause in the search config (search for "--template") but it doesn't seem to work?
Left by Daniel S on May 06, 2011 3:49 AM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
Nevermind, saving the same query two more times did it.
Left by Daniel S on May 06, 2011 3:51 AM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
I continue to get a TF23761 "Server operation timed out" message each time I search.
Left by Paul Ansley on Jul 05, 2011 2:52 PM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
Try to type in "--template" (without the quotes) inside the search box and see if you can run that query without it timing out. If you have a large amount of work items you may need to modify the template to narrow down your search so it doesn't time out.
Left by Mike Parks on Jul 05, 2011 3:50 PM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
It would be very nice if there is an option (ComboBox) to define the Query to Search in. So you can change easily to another source, eg. to search only in the open Items.
Left by Magges on Aug 12, 2011 8:03 AM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
Thanks for the feedback Magges. Something like that is def a possibility. It keeps getting harder and harder for me to find more time in my day to come back to updating these extensions. If I get some free time in the future I'll see what I can come up with. I like the idea though. :)
Left by Mike Parks on Aug 12, 2011 8:46 AM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
Does this tool allow you to query Custom fields in TFS 2010? I've updated to my custom field in the --template interface, but upon search always receive the message "TF26198: The work item does not exist, or you do not have permission to access it."

Thank you for a great addition to TFS
Left by Ken Sparks on Aug 17, 2011 3:57 PM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
What kind of custom field is it? Do you mean a custom control like the drop down check box custom control? Or just standard visual studio control added to the work item definition?

I haven't tested it using any custom controls but I have tested it using an additional field I added to the definition and it worked ok. All I did was add " AND MyField Contains [search]" to the --template query and it worked ok. In my case, MyField was a drop down list. I'm not sure why the permission error is coming up. I published the code on codeplex a while ago so if you wanted to debug and step into it, feel free. :) I'm not sure if I'll have time to look at it anytime soon. I'll let you know if I find something though.
Left by Mike Parks on Aug 17, 2011 4:18 PM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
I created a new field named Custom.CardNum from the Work Item Type edit screen using the TFS Process Editor. The friendly name of this field is "Card #" so I suspect that the # or the space or both are causing a problem with the search. I appreciate your help on this issue.
Left by Ken Sparks on Aug 18, 2011 8:32 AM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
Ok, so I've determined the true issue. If I search for a character string, it works fine. However, because my field is Custom.CardNum, when I try to search for a card number such as 12345, I receive the error. It doesn't appear this tool currently supports searching for numbers.
Left by Ken Sparks on Aug 18, 2011 8:50 AM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
It seems that this tool does not allow one to search on numbers. I think that is the issue regarding searching custom fields.
Left by Ken Sparks on Aug 31, 2011 3:18 PM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
Disregard my last question. I now see that you can quote numbers and it searches just fine. Great tool! Thank you very much.
Left by Ken Sparks on Aug 31, 2011 4:01 PM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
Great and useful tool. I am having trouble adding a search field though. It seems like it can't handle a field that is an integer. I know it already searches for the TFS ID, but we have another field where we track our customer's ID as well. When I add a row in the query definition for that field, I get errors when I search. Any idea if this is possible currently?

Thanks
Left by Tony Roberts on Nov 03, 2011 4:56 PM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
Hmm, not sure what the issue is there Tony. I actually haven't tried to search another integer field besides the ID. Always just had string fields. Seems like TFS is validating the WIQ so I don't think there is a way around that one.
Left by Mike Parks on Nov 07, 2011 9:31 PM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
This is one of my favorite tools, Mike. Thanks for creating it.
Left by Kareen Kircher on Oct 12, 2012 8:03 PM

# re: Search Work Items for TFS 2010 - New Extension
Requesting Gravatar...
I really like this search tool. Is there a plan to make it work in VS2012? Many thanks.
Left by John Jefferies on Nov 14, 2012 1:10 PM

Your comment:
 (will show your gravatar)


Copyright © MikeParks | Powered by: GeeksWithBlogs.net