1

I'm using TFS 2018 Latest version. TFS is on premise version. Visual studio 2017. I have a problem when sending code review. Code Reviews have Closed By field set automatically which prevents me to accessing the code review. I can't use the code review at all because of this problem. See attached pic Thanks in advance

enter image description here

pent
  • 21
  • 2

5 Answers5

4

I faced the same and after many hours of investigation we have narrowed the issue to the Visual Studio Team Foundation cache.

Resolution:

  1. close all Visual Studio instances
  2. GO to ‘%LocalAppData%\Microsoft\Team Foundation\8.0\Cache’
  3. Clear cache folder

We’ve been able to use the Code Review workflow once again.

Shubham
  • 41
  • 3
1

For anyone still experiencing this issue, I fixed it by following these steps:

  1. Close visual studio.
  2. Open the run window
  3. Go to "%LocalAppData%\Microsoft\Azure DevOps\8.0"
  4. Delete or rename the "Cache" folder
  5. Re-open visual studio
Ben
  • 335
  • 3
  • 12
  • No need to remove the entire folder. Just remove/delete the folder ending in "_v2", e.g. 39ba8117-6f29-465e-b114-59659adb38c7_v2. If you remove the entire folder, you may lose some settings/layouts which you will have to recreate. – dashrader Jul 14 '23 at 19:25
0

It seems that you are using a customized process template and changed the process template.

You need to check if you have set some rules which may affect the code review, we could refer to this doc to check the work item type code review rules.

Another possibility is that you changed the process file (such as add work item type or add field).

As a workaround, we could create a copy of the process and move the project to the new process, it should work.

Update1

We could refer to this ticket to know which process template have been used in this project.

1. Open process page and export the process, contain default processes(Such as Agile, Scrum or CMMI ) and target process(current process).

enter image description here

2. Extract the target process and open the file ProcessTemplate.xml->copy the field name and version type

enter image description here

3. Extract the default process and open the file ProcessTemplate.xml, then replace the field name and version type.

4. Zip the process folder->Open process page and upload the process to replace the issue process template.

enter image description here

Update2

Param(

   [string]$collectionurl = "http://172.17.16.163:8080/tfs/DefaultCollection",

   [string]$projectname = "GXJGitTest",

   [string]$user = "xxx",

   [string]$token = "xxxxx"

)



# Base64-encodes the Personal Access Token (PAT) appropriately

$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{​​​​​​​​0}​​​​​​​​:{​​​​​​​​1}​​​​​​​​" -f $user,$token)))



#Get project ID

$ProjectsUrl = "$collectionurl/_apis/projects"                        

$ProjectsResponse = Invoke-RestMethod -Uri $ProjectsUrl -Method Get -UseDefaultCredential -Headers @{​​​​​​​​Authorization=("Basic {​​​​​​​​0}​​​​​​​​" -f $base64AuthInfo)}​​​​​​​​



$projectid = ($ProjectsResponse.value | where {​​​​​​​​$_.name -eq $projectname}​​​​​​​​).id



#Get system.template



$PTurl = "$collectionurl/_apis/projects/$projectid/properties"                        

$response = Invoke-RestMethod -Uri $PTurl -Method Get -UseDefaultCredential -Headers @{​​​​​​​​Authorization=("Basic {​​​​​​​​0}​​​​​​​​" -f $base64AuthInfo)}​​​​​​​​

$ProcressTemplate = ($response.value | where {​​​​​​​​$_.name -eq 'System.Process Template'}​​​​​​​​).value 



Clear-host

Write-Host "The project $projectname is using the $ProcressTemplate Process Template."
Vito Liu
  • 7,525
  • 1
  • 8
  • 17
  • Thanks for your reply. can you please advice how should I do your suggested workaround. how should I create a copy of the process and move the project to the new process? it seems to me as the best course of action. – pent Jan 10 '21 at 08:52
  • Hi @pent, I have updated the answer, please check the update1 and then kindly share the result here. Thanks – Vito Liu Jan 11 '21 at 08:53
  • Hi @pent, How about the issue? Does the answer below resolved your question? If not, would you please let me know the latest information about this issue? – Vito Liu Jan 13 '21 at 09:37
  • Hi @Vito Liu-MSFT. Sorry of the late response.. it seems we are using a complete customized template process. I ran the powershell script from the link you sent above (to find out which process is used in our project) and it returned empty results so we are not using any of these: 1.Agile - User story 2.Scrum - Product Backlog Item 3.CMMI - Requirement.. also i check on TFS db on these tables: [dbo].[tbl_ProcessTemplateUsage] and [tbl_ProjectConfigurationProperties] - no records there. so what we can do if we are NOT using any template process (agile/scrum/cmmi)? Thanks! – pent Jan 17 '21 at 13:05
  • Could you try the update2 script and this [doc](https://learn.microsoft.com/en-us/azure/devops/boards/work-items/guidance/choose-process?view=azure-devops&tabs=basic-process) to check the process template? – Vito Liu Jan 18 '21 at 07:45
  • Hi @Vito Liu-MSFT. I tried your PS script and it returned the same results: The project xxx is using the Process Template.(empty) I checked also attached doc and it seems we dont have any of these: Basic, Agile, Scrum, CMMI. Thanks – pent Jan 18 '21 at 10:02
  • Hi @Vito Liu-MSFT any advise on this matter? Thanks – pent Jan 19 '21 at 14:53
  • Hi @pent, 1. Create a new project and run the power shell script to check the process template name. 2. Open the issue project->Work. Then kindly share the screenshot of the result here. Thanks. – Vito Liu Jan 20 '21 at 06:44
  • Hi @Vito Liu-MSFT . I added new project. and still got empty results with the PS script .see attached pics – pent Jan 20 '21 at 10:26
0

MSFT - please see attached pics enter image description here

pent
  • 21
  • 2
  • Hi @pent, could you click the button new and share a screenshot of the work item type here? In addition, you could edit your question and share the screenshot in the issue description – Vito Liu Jan 22 '21 at 06:16
0

I don't think the process template theory works, VS 2017 shows the code review as Closed by () but VS 2019 shows it as active as expected. If this was an issue with the template VS 2019 would have the same behavior. For me the underlying Code review work item is still active.