How to find all code reviews in projects and collections in TFS?

We have 4 Team Project collections with dozens of Team projects each. We started using the integrated code review system and requested feedback in these collections and projects.

Is there an easy way to find all the code reviews you participate in in collections, or at least on projects in a collection? . I would prefer that this can be done in Team Explorer inside Visual Studio, but also have access to the web portal. I would already be happy if I could search the collection, if it is impossible to do through them.

I carefully looked at the "My Work" section in Team Explorer, and also closed sln to try to associate the explorer context with the entire collection. No dice: the heading "My work" still shows the actual project in the drop-down menu.

I tried to create a custom “query”, but I don’t know how to do it. In the query that is generated, there is a condition for filtering on Team Project = @Project , but I deleted it, leaving me mostly with this query:

 Work Item Type = Code Review Request 

I lost State <> Closed for testing purposes, and I would create a separate request (I think) for the type of work item Code Review Response , but before I go there: the above request seems to only give reviews for the currently selected Team Project time. In addition, when saving, I get a dialog that wants me to save the request inside a specific project, and suggested that it still depends on the project.

I use TFS 2013, but we try to update it every time it is useful, therefore, if there are new features in a newer version that allow this, I will be glad to hear about them.

Bottom line: how to get an overview of all your code reviews on your TFS server?

+8
source share
4 answers

Unfortunately, I do not think there is a good way to do what you ask. Of course not in Team Explorer. The code reviews, as you know, are stored as work items, and there is a strong border between projects in the team that, among other things, cannot overlap. Note for the future, depending on how your business works, you can consider 1 Team Project Collection, 1 Team Project and separate your work by teams and areas. http://nakedalm.com/one-team-project/ , this, of course, will not help you.

I am sure that you will not be able to create a request using TFS to return the elements you need (note that if you need to, you will need to request the Response of the work item that is assigned to you To = @Me , and not the Work Item Request . A request is a person making a request to verify a code, and the response is reviewer (s).

Do you have tfs reports? If so, as ds19 suggests, you can directly request df tfs_Warehouse.

Another solution might be the TFS API , but for this you will need TFS 2015 (which, by the way, is full of many features) (Even though the link talks about it for Visual Studio Online, it also works for On-Prem.)

I know this does not answer your question, but hopefully this gives you something to think about.

+2
source

In VS 2015, go to the "Explorer" section Home> Click "Work Items" ...> Select "New Request"> Select "Revised" in the "Field" column and add the associated username in the "Value" field and run the request. You will see all the code views you have been to.

+5
source

You can query the Tfs_Warehouse database:

 SELECT count(*), dwi.[TeamProjectCollectionSK] FROM [Tfs_Warehouse].[dbo].[DimWorkItem] dwi where dwi.System_WorkItemType = 'Code Review Request' group by dwi.[TeamProjectCollectionSK] 
0
source

Can you double check that your query does not return any code reviews from other Team projects by clicking on “Column Options” in the “Results” sections and adding the “Team Project” field? [And verifying that you have a code verification request in another Team Project]. [Don’t worry if there is a filter for the Team Project option selected for your Team project in the Column Options window).
You can also verify this by adding a different value for the Team Project proposal.

0
source

Source: https://habr.com/ru/post/1234679/


All Articles