microsoft / vsts-work-item-migrator

WiMigrator is a command line tool for migrating work items between VSTS/TFS projects
MIT License
148 stars 69 forks source link

Unexpected error, critical error, on work item linking #50

Closed jkc-NC closed 5 years ago

jkc-NC commented 5 years ago

This problem was described in a closed issue but was determined as an error due to version of TFS, but I get the same error using Azure Devops. After migration phase 1 creates the new work items, it attempts to link them and fails with a rather cryptic TF401349 error. Brief search on the TFS error code turned up very little of value. Here are some of the error lines from the log output:

[Error   @10.09.43.847] Exception during batch 45: TF401349: An unexpected error has occurred, please verify your request and try again.
[Error   @10.09.43.848] Exception during batch 46: TF401349: An unexpected error has occurred, please verify your request and try again.
[Error   @10.09.43.848] Exception during batch 47: TF401349: An unexpected error has occurred, please verify your request and try again.
[Error   @10.09.43.848] 9497 total work item(s) failed.
[Error   @10.09.43.848]    9497 work item(s) failed for this reason: CriticalError.

Here is the first batch request for updating work item child-parent linkage as output in the log file:

WIT BATCH REQUEST 1:

METHOD: PATCH
URI: /_apis/wit/workItems/49774?bypassRules=True&suppressNotifications=True&api-version=4.0

BODY:
[{"op":1,"Path":"/relations/0","From":null,"Value":null},{"op":0,"Path":"/relations/-","From":null,"Value":{"Rel":"AttachedFile","Url":"https://dev.azure.com/FKDayli/_apis/wit/attachments/6b044504-9e97-4477-ae5c-b6c534a1a886","Attributes":{"name":"WorkItemHistory-112880-0.json","resourceSize":10681,"comment":"Update range from 0 to 6"}}},{"op":0,"Path":"/relations/-","From":null,"Value":{"rel":"System.LinkTypes.Hierarchy-Reverse","url":"https://dev.azure.com/FKDayli/_apis/wit/workItems/49623","attributes":{"comment":""}}},{"op":0,"Path":"/relations/-","From":null,"Value":{"rel":"Hyperlink","url":"https://pentia.visualstudio.com/_apis/wit/workItems/112880","attributes":{"id":1758869,"comment":"6;attachments;git commit links;revision history attachments;work item links"}}}]
jkc-NC commented 5 years ago

I found that the error was most likely caused by the fact that while I had created the right Area Paths and Iteration Paths in the target project. I had not created the teams. I tried recreating all the teams and rerunning the migration and i got down to only 2 work items getting a CriticalError.

I assume that the problem was the teams and i'm closing this issue.