TFS

Opening Work items in Visual Studio “15” Preview

If you have used Visual Studio “15” Preview to connect to a Team Services instance, or you follow the Microsoft ALM blog you will have noticed that with the Visual Studio “15” Preview: Work items now open in the web from Visual Studio ’15’!

While the official post shows why that change was made and what advantages the web form brings, I wanted to quickly point out some small things that were done to make this behavior more usable.

You can follow along by downloading the Visual Studio “15” Preview and connecting to your Team Services or Team Foundation Server “15” RC1 instance.

Running Queries from Visual Studio

There is still the full work item query tree available in Visual Studio, including favorites:

team-explorer

You can also still create and run new or existing queries and look at the results:

query-1

If you look at the screenshot above, you can see that I have run the “My Bugs” query and that I have selected the second work item from the result, with id 62. When I open this work item now, it will launch in my browser and display the now familiar modern work item form:

Opened Work Item

And if you look closely, you can see that in the upper right hand corner of the work item form it displays “2 of 4” and some buttons:

query-3

When you open a work item from a query result in Visual Studio, we don’t want you lose the query context you were in. So, when opening the work item we pass some context information along, in this case this included the name of the query that you ran and the position of the work item inside of that query result. Then, in the web we can restore this context, show you the work item, and also give you the option to easily switch to the next/previous work item in the “My Bugs” query:

query-4

You can also just return to the full query result in the web:

query-5

Preserving the context this way works with all queries in Visual Studio, even new and unsaved ones.

New, unsaved query in Visual Studio

New, unsaved query in Visual Studio

Work item opened from query result in web

Work item opened from query result in web

Web query editor

Web query editor

Linking Work Items to Code Changes

With the Development section on the new work item form we have made it really easy to view code changes that contributed to work item, be it he implementation of a feature or a bugfix:

commit-dnd-result.png

To associate your code changes with your work items you can create a link after the fact from the work item form, or in Visual Studio when you commit or check in your code. For both Git and TFVC you can still run work item queries from the Changes or Pending Changes view and even drag and drop work items from the query result to the Related Work Items section. Adding a work item to a git commit:

Adding a related work item to a git commit

Adding a related work item to a git commit

Advertisements