Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
252 views
in Technique[技术] by (71.8m points)

TFS code review have Closed By field set automatically which prevents me to accessing the code review

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

question from:https://stackoverflow.com/questions/65617225/tfs-code-review-have-closed-by-field-set-automatically-which-prevents-me-to-acce

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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."

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...