azure-devops-migration-tools: TF201077 Error - Work Item type not found! (Previous Solutions Didn't Work)
Hello,
I’m trying to migrate a project to another one and they’re using the same process. Meaning all the work item types are the same and are coming from one source. So all the work item types should exist in both project. When I run the migration tool I get this error regarding one of the work items.:
Error while running WorkItemMigration
Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemTypeDeniedOrNotExistException: TF201077: The work item type Task cannot be found. It may have been renamed or destroyed.
at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemTypeCollection.get_Item(String typeName)
at MigrationTools.ProcessorEnrichers.TfsValidateRequiredField.ValidatingRequiredField(String fieldToFind, List`1 sourceWorkItems) in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.ObjectModel\ProcessorEnrichers\TfsValidateRequiredField.cs:line 44
at VstsSyncMigrator.Engine.WorkItemMigrationContext.InternalExecute() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 186
at MigrationTools._EngineV1.Processors.MigrationProcessorBase.Execute() in D:\a\1\s\src\MigrationTools\_EngineV1\Processors\MigrationProcessorBase.cs:line 47
[16:27:00 ERR] WorkItemMigration The Processor MigrationEngine entered the failed state...stopping run
I tried all the previous solutions regarding this issue but none of them have worked. I’m not using Visual Studio or anything. Just the ADO Migration Tool.
And this is my config file - I changed some names for security reasons of course:
{
"ChangeSetMappingFile": null,
"Source": {
"$type": "TfsTeamProjectConfig",
"Collection": "https://dev.azure.com/someorg",
"Project": "SourceProject",
"ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
"AllowCrossProjectLinking": false,
"AuthenticationMode": "Prompt",
"PersonalAccessToken": "",
"PersonalAccessTokenVariableName": "",
"LanguageMaps": {
"AreaPath": "Area",
"IterationPath": "Iteration"
}
},
"Target": {
"$type": "TfsTeamProjectConfig",
"Collection": "https://dev.azure.com/someorg",
"Project": "TargetProject",
"ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
"AllowCrossProjectLinking": false,
"AuthenticationMode": "Prompt",
"PersonalAccessToken": "",
"PersonalAccessTokenVariableName": "",
"LanguageMaps": {
"AreaPath": "Area\\TargetProject",
"IterationPath": "Iteration\\TargetProject"
}
},
"FieldMaps": [
{
"$type": "MultiValueConditionalMapConfig",
"WorkItemTypeName": "*",
"sourceFieldsAndValues": {
"Field1": "Value1",
"Field2": "Value2"
},
"targetFieldsAndValues": {
"Field1": "Value1",
"Field2": "Value2"
}
},
{
"$type": "FieldBlankMapConfig",
"WorkItemTypeName": "*",
"targetField": "Custom.ReflectedWorkItemId"
},
{
"$type": "FieldValueMapConfig",
"WorkItemTypeName": "*",
"sourceField": "System.State",
"targetField": "System.State",
"defaultValue": "New",
"valueMapping": {
"Approved": "New",
"New": "New",
"Committed": "Active",
"In Progress": "Active",
"To Do": "New",
"Done": "Closed",
"Removed": "Removed"
}
},
{
"$type": "FieldtoFieldMapConfig",
"WorkItemTypeName": "*",
"sourceField": "Microsoft.VSTS.Common.BacklogPriority",
"targetField": "Microsoft.VSTS.Common.StackRank",
"defaultValue": null
},
{
"$type": "FieldtoFieldMultiMapConfig",
"WorkItemTypeName": "*",
"SourceToTargetMappings": {
"SourceField1": "TargetField1",
"SourceField2": "TargetField2"
}
},
{
"$type": "FieldtoTagMapConfig",
"WorkItemTypeName": "*",
"sourceField": "System.State",
"formatExpression": "ScrumState:{0}"
},
{
"$type": "FieldMergeMapConfig",
"WorkItemTypeName": "*",
"sourceField1": "System.Description",
"sourceField2": "Microsoft.VSTS.Common.AcceptanceCriteria",
"sourceField3": null,
"targetField": "System.Description",
"formatExpression": "{0} <br/><br/><h3>Acceptance Criteria</h3>{1}",
"doneMatch": "##DONE##"
},
{
"$type": "RegexFieldMapConfig",
"WorkItemTypeName": "*",
"sourceField": "COMPANY.PRODUCT.Release",
"targetField": "COMPANY.DEVISION.MinorReleaseVersion",
"pattern": "PRODUCT \\d{4}.(\\d{1})",
"replacement": "$1"
},
{
"$type": "FieldValuetoTagMapConfig",
"WorkItemTypeName": "*",
"sourceField": "Microsoft.VSTS.CMMI.Blocked",
"pattern": "Yes",
"formatExpression": "{0}"
},
{
"$type": "TreeToTagMapConfig",
"WorkItemTypeName": "*",
"toSkip": 3,
"timeTravel": 1
}
],
"GitRepoMapping": null,
"LogLevel": "Information",
"CommonEnrichersConfig": null,
"Processors": [
{
"$type": "WorkItemMigrationConfig",
"Enabled": true,
"ReplayRevisions": true,
"PrefixProjectToNodes": false,
"UpdateCreatedDate": true,
"UpdateCreatedBy": true,
"WIQLQueryBit": "AND [Microsoft.VSTS.Common.ClosedDate] = ''",
"WIQLOrderBit": "[System.ChangedDate] desc",
"LinkMigration": true,
"AttachmentMigration": true,
"AttachmentWorkingPath": "c:\\temp\\WorkItemAttachmentWorkingFolder\\",
"FixHtmlAttachmentLinks": false,
"SkipToFinalRevisedWorkItemType": true,
"WorkItemCreateRetryLimit": 5,
"FilterWorkItemsThatAlreadyExistInTarget": true,
"PauseAfterEachWorkItem": false,
"AttachmentMaxSize": 480000000,
"AttachRevisionHistory": false,
"LinkMigrationSaveEachAsAdded": false,
"GenerateMigrationComment": true,
"WorkItemIDs": null,
"MaxRevisions": 0,
"NodeStructureEnricherEnabled": null,
"UseCommonNodeStructureEnricherConfig": false,
"StopMigrationOnMissingAreaIterationNodes": true,
"NodeBasePaths": [
""
],
"AreaMaps": {},
"IterationMaps": {},
"MaxGracefulFailures": 0,
"SkipRevisionWithInvalidIterationPath": false
}
],
"Version": "12.0",
"workaroundForQuerySOAPBugEnabled": false,
"WorkItemTypeDefinition": {
"sourceWorkItemTypeName": "targetWorkItemTypeName"
},
"Endpoints": {
"InMemoryWorkItemEndpoints": [
{
"Name": "Source",
"EndpointEnrichers": null
},
{
"Name": "Target",
"EndpointEnrichers": null
}
]
}
}
After I run the ADO Migraiton tool, it creates all the iterations and paths and areas, but only when it reaches to that specific work item it stops working. I would appreciate your answers and solutions regarding this issue.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 18 (8 by maintainers)
Hi Martin, I’m working the same issue. It appears to be an issue within the Microsoft.TeamFoundationServer.ExtendedClient package. What appears to be happening is the following:
The NkdAgility tool utilizes the Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore from the old SOAP OM libraries to interface with the ADO organizations.
To check work item types, the NkdAgility tool looks a Project within the workItemStore.Projects (Microsoft.TeamFoundation.WorkItemTracking.Client.ProjectCollection), finds the appropriate Project (Microsoft.TeamFoundation.WorkItemTracking.Client.Project) and then calls WorkItemTypes (Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemTypes).
That is workItemStore.Projects.First(expression).WorkItemTypes
Across all projects, the first project for which we call WorkItemTypes successfully returns the full list of work item types (55 in our case). Subsequent calls WorkItemTypes fail to retrieve any work item types (0 are returned). Within the debugger, I can consistently get this to occur for all of our 255+ projects.
So this seems to be an error internal to the deprecated Microsoft.TeamFoundationServer.ExtendedClient related to some pretty deep threading issues. Any ideas on where to go from there?
Appendix
With a breakpoint on \azure-devops-migration-tools\src\MigrationTools.Clients.AzureDevops.ObjectModel_EngineV1\Clients\TfsWorkItemMigrationClient.cs:line 95 I can use the line
in the immeidate window to get:
Within quickwatch, I can generate this error:
Microsoft Visual Studio
To prevent an unsafe abort when evaluating the function ‘Microsoft.TeamFoundation.WorkItemTracking.Client.Project.QueryHierarchy.get’ all threads were allowed to run. This may have changed the state of the process and any breakpoints encountered have been skipped.
OK Help