Recently my client upgraded from TFS 2017 (on-premise) to AzureDevOps Server. Besides the new UI everything seemed to work fine. Just as I wanted to complete a pull request, I faced the following error message:
By googling I found a proper question on StackOverflow with a helpful answer and a supplementing comment on the implementation.
To make things easier, these are the full steps to overcome this issue. All credit goes to the authors of the question, the answer and the comment.
witadmin exportwitd /collection:https://tfs.mycompany.com/DefaultCollection /p:MyProject /n:"Product Backlog Item" /f:"C:\Temp\pbi.xml"
witadmin exportwitd /collection:https://tfs.mycompany.com/DefaultCollection /p:MyProject /n:"Bug" /f:"C:\Temp\bug.xml"
Each invocation should end with this message:
Operation complete.
The easiest way to get a handle to that tool is to run it from a Visual Studio Developer Command Prompt.
Remark: Although on the Microsoft Docs-Page regard the witadmin cli tool it is mentioned that the version of the tool has to match the version of TFS or AzureDevOps Server, it worked for me using the witadmin.exe from Visual Studio 2015 (path C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\witadmin.exe
) in conjunction with AzureDevOps Server 2019.
/witd:WITD/WORKITEMTYPE/WORKFLOW/TRANSITIONS/TRANSITION[@to="Done"]
):Add an action to the transition:
witadmin importwitd /collection:https://tfs.mycompany.com/DefaultCollection /p:MyProject /f:"C:\Temp\pbi.xml"
witadmin importwitd /collection:https://tfs.mycompany.com/DefaultCollection /p:MyProject /f:"C:\Temp\bug.xml"
Each invocation should conclude with
The work item type import has completed.
Done: