Use Followed work Item in a new Query TFS 2017

1.4k views Asked by At

I want to create a query with my followed works items in TFS 2017, but I didn't find the field name for the followed state.

I want to create that query in order to add a new widget in home dashboard.

Is it possible to make a query with your followed items in TFS2017?

4

There are 4 answers

0
starian chen-MSFT On BEST ANSWER

No, there isn’t the feature to create a query with followed work items in TFS or VSTS and pin to dashboard. You just can check followed work items from Work>Queries.

I submit a user voice here (Query for followed workitem and pin to dashboard), you can vote it.

0
pkass On

What I found out is, that the query works well in the web interface, but cannot be run nor created or edited in Visual Studio. I did not even find a way to "follow" a workitem in VS, this seems to be available only in the web interface as well.

0
tom2 On

As proposed by Lauren, in TFS 2017, you can build an ad-hoc query "ID In @follows" (Field=ID / Operator=In / Value=@follows). The results will be similar to the Default Query "Followed work items" under Work>Queries.

However, I was never able to save this query: trying to save always got me an error "TF212023: You cannot compare fields with different data types in the WHERE clause of a work item query. The error is caused by «[System.Id] in (@follows)»."

0
Lauren Brose On

You can achieve this scenario by creating a custom Followed work items query (System.ID In @Follows) and saving it to Shared Queries. Then, simply pin the query to your dashboard as a Query Results Widget and anyone who views it will see their followed work items (similarly you can pin an Assigned to me query using the @me macro and users will see items assigned to them).

The @Follows macro has been around in VSTS for awhile and was introduced in TFS 2017. Check out our documentation on queries macros for more information.