How to change TFS query result default columns?

1.8k Views Asked by At

I'm using the Visual Studio Team Foundation Server 2013 web interface and have created and saved many queries with custom columns, sort orders etc.

However, when creating a new query or doing a "search" (i.e. the "Search work items" control in top right of Queries page) the default columns are always: ID, Work Item Type, Title, State, Assigned To and Tags.

TFS New query columns highlighted in red

How do I change the default columns so that all new queries will default to my preferred columns?

Thanks

2

There are 2 best solutions below

2
Max Mansfield On

From an MSDN forum post:

And for these work items which are shipped with TFS Server, the information is stored in the team project template. For example, if you are working with a Agile team project, go to MSF for Agile Software Development v5.0\WorkItem Tracking\Queries, select the query you would like to custom the displayed columns and make changes.

For Visual Studio the change is different. This setting is changed via the registry at this location:

Computer\HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\<versionNumber>\WorkItemTracking\QuerySettings\ColumnSetting

I haven't found a consistent Name for the key that affects this default between versions so the item you need to change depends on your version. A little trial and error should narrow down which key to change.

MSDN forum source

0
Vicky - MSFT On

You have to add your desired columns for every single work item query via editing columns in the Column Options page. I can't figure out you one way to save default column options to use for new created work item queries.

For example, to add other columns in the Search query, you need to click Column Options function in the Editor page to choose columns you want.