Click here to Skip to main content
15,883,709 members
Articles / All Topics

Searching in VSTS/TFS

Rate me:
Please Sign up or sign in to vote.
5.00/5 (3 votes)
6 Aug 2017MIT3 min read 6.6K   1   1
A cool feature of Chrome and how you can be more productive with VSTS search

This post is largely showing off a cool feature of Chrome but the core focus is how you can be more productive with VSTS search. Open-mouthed smile

Visual Studio Team Services lets you search across all your code and work items. What's really strange about this is how without this functionality, it was harder trying to find work items and code, but I used to say it would be nice if we had a better work item search and it would be nice to have a code search instead of having to pull all the code to my machine. I now find myself saying, why isn't it as easy as searching Google.

image

Well it is Open-mouthed smile, I don't often notice features like this search because I used to just type what I want in the address bar and hit enter, switching between search engines was a process of copy, navigate to other search engine and paste. One day, I saw a friend of mine Rory Bolle have a search bar like the image above and my life changed as he showed me this feature Smile. Part of getting through each day generally has a lot of how can I be more efficient with boring tasks, and although not really a task on its own browsing to where to search is boring and something you don't have to do Smile.

Searching VSTS Faster Using Chrome

Chrome supports custom search engines and that's what functionality we going to use now. Open Chrome settings:

image

Scroll down to the Search engine section and then click on Manage search engines:

image

under the Other search engines section, click ADD.

image

We are going to add 2 search engines here, first for code search (replace your account name in the URL).

Search engine: TFS Code Search

Keyword: tfsc

Url:

  • VSTS: https://<your account name>.visualstudio.com/_search?type=Code&lp=search-account&text=%s&_a=research
  • TFS: https://<server>:<port>/tfs/<team project collection>/_search?type=Code&lp=apps-account&text=%s&_a=contents

image

Repeat that process again, this time for work item search.

Search engine: TFS Work Item Search

Keyword: tfsw

Url:

  • VSTS: https://<your account name>.visualstudio.com/_search?type=Work%20item&lp=apps-account&text=%s&_a=search
  • TFS: https://<server>:<port>/tfs/<team project collection>/_search?type=Work%20item&lp=apps-account&text=%s&_a=research

You should now have these 'search engines' in your list and you can use this in your browser:

image

In the browser bar, type tfsw and then space bar and search for something like test.

image

And press enter:

image

This will go ahead and perform a work item search on your account for the phrase that you typed in. Try the same thing with the tfsc shortcut:

image

As you can see, this then obviously searches your code. Smile

image

Conclusion

Firstly, you don't need to do those extra navigations to get to a page where you can search, it's super easy to just use what your browser has built in.

Secondly, chrome's search engines functionality can be used for any site, basically just take a url and replace the 'search term' part of the url with %s. For example, in my list, I generally have the .NET Framework Reference Source (https://referencesource.microsoft.com/#q=%s) to easily find .NET source.

image

which conveniently brings up:

image

Cheers and have fun searching! Open-mouthed smile

This article was originally posted at http://beeming.net/Post/2017/8/searching-in-vststfs

License

This article, along with any associated source code and files, is licensed under The MIT License


Written By
Architect SSW
South Africa South Africa

Comments and Discussions

 
PraiseMy vote of 5 Pin
LanLa8-Aug-17 1:25
professionalLanLa8-Aug-17 1:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.