nkdAgility/azure-devops-migration-tools

[Bug]: Error that nodes are missing from Target org when iteration map is set

dipert opened this issue · 0 comments

Version

  • I confirm that I am using the latest version

Source Version

Team Foundation Server 2017

Target Version

Azure DevOps Service

Relevant configuration

{
  "Version": "14.3",
  "LogLevel": "debug",
  "workaroundForQuerySOAPBugEnabled": false,
  "Source": {
    "$type": "TfsTeamProjectConfig",
    "Collection": "SourceOrgURL",
    "Project": "sourceProject",
    "ReflectedWorkItemIDFieldName": "TfsMigrationTool.ReflectedWorkItemId",
    "AuthenticationMode": "Prompt",
    "AllowCrossProjectLinking": false,
    "LanguageMaps": {
      "AreaPath": "Area",
      "IterationPath": "Iteration"
    }
  },
  "Target": {
    "$type": "TfsTeamProjectConfig",
    "Collection": "TargetOrgURL",
    "Project": "TargetProject",
    "ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
    "AuthenticationMode": "Prompt",
    "AllowCrossProjectLinking": false,
    "LanguageMaps": {
      "AreaPath": "Area",
      "IterationPath": "Iteration"
    }
  },
  "FieldMaps": [
    {
      "$type": "TreeToTagMapConfig",
      "WorkItemTypeName": "*",
      "toSkip": 3,
      "timeTravel": 1
    }
  ],
  "WorkItemTypeDefinition": {
    "sourceWorkItemTypeName": "targetWorkItemTypeName"
  },
  "GitRepoMapping": null,
  "CommonEnrichersConfig": [
    {
      "$type": "TfsNodeStructureOptions",
      "PrefixProjectToNodes": false,
      "NodeBasePaths": [],
      "Enabled":true,
      "AreaMaps": {},
      "IterationMaps": {},
      "ShouldCreateMissingRevisionPaths": false
    }
  ],
 
  "Processors": [
    {
      "$type": "ExportUsersForMappingConfig",
      "Enabled": false,
      "LocalExportJsonFile": "c:\\temp\\ExportUsersForMappingConfig.json",
      "WIQLQuery": "SELECT [System.Id], [System.Tags] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan') AND [Id] IN (TestID) ORDER BY [System.ChangedDate] desc ",
      "IdentityFieldsToCheck": [
        "System.AssignedTo",
        "System.ChangedBy",
        "System.CreatedBy",
        "Microsoft.VSTS.Common.ActivatedBy",
        "Microsoft.VSTS.Common.ResolvedBy",
        "Microsoft.VSTS.Common.ClosedBy"
      ]
    },
    {
      "$type": "WorkItemMigrationConfig",
      "Enabled": true,
      "ReplayRevisions": true,
      "PrefixProjectToNodes": false,
      "UpdateCreatedDate": true,
      "UpdateCreatedBy": true,
      "WIQLQueryBit": "AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan') AND [Id] IN (TestID)",
      "WIQLOrderBit": "[System.ChangedDate] desc",
      "LinkMigration": true,
      "AttachmentMigration": true,
      "AttachmentWorkingPath": "c:\\temp\\WorkItemAttachmentWorkingFolder\\",
      "FixHtmlAttachmentLinks": false,
      "SkipToFinalRevisedWorkItemType": false,
      "WorkItemCreateRetryLimit": 5,
      "FilterWorkItemsThatAlreadyExistInTarget": false,
      "PauseAfterEachWorkItem": false,
      "AttachmentMaxSize": 480000000,
      "AttachRevisionHistory": false,
      "LinkMigrationSaveEachAsAdded": false,
      "GenerateMigrationComment": true,
      "WorkItemIDs": null,
      "MaxRevisions": 0,
      "NodeStructureEnricherEnabled": false,
      "UseCommonNodeStructureEnricherConfig": true,
      "ShouldCreateMissingRevisionPaths": false,
      "StopMigrationOnMissingAreaIterationNodes" : false,
      "NodeBasePaths": [],
      "IterationMaps": {
        "SourceProject\\Sprint 1": "Target Project\\Iteration 0",
        "SourceProject\\Sprint 2": "Target Project\\Iteration 0"
      },
      "AreaMaps": {
        "SourceProject": "Target Project"
      },
      "MaxGracefulFailures": 0

    } ]}

Relevant log output

[17:06:23 DBG] [v14.3.9] TfsNodeStructure:CheckForMissingPaths::IterationNodes::3
[17:06:23 DBG] [v14.3.9] TfsNodeStructure:CheckForMissingPaths:Checking::{"anchored": true, "sourcePath": "ACCDev\\Sprint 1", "targetPath": null, "systemPath": null, "nodeType": "Iteration", "workItems": null, "$type": "NodeStructureItem"}
[17:06:23 DBG] [v14.3.9] NodeStructureEnricher.GetNewNodeName(SourceProject\Sprint 1, Iteration)
[17:06:23 DBG] [v14.3.9] NodeStructureEnricher.GetNewNodeName::Mappers
[17:06:23 DBG] [v14.3.9] TfsNodeStructure:CheckForMissingPaths:GetNewNodeName::{"anchored": true, "sourcePath": "SourceProject\\Sprint 1", "targetPath": "Target Project\\Sprint 1", "systemPath": null, "nodeType": "Iteration", "workItems": null, "$type": "NodeStructureItem"}
[17:06:23 DBG] [v14.3.9] TfsNodeStructure:CheckForMissingPaths:CheckTarget::{"anchored": true, "sourcePath": "SourceProject\\Sprint 1", "targetPath": "Target Project\\Sprint 1", "systemPath": "\\Corporations Project\\Iteration\\Sprint 1", "nodeType": "Iteration", "workItems": null, "$type": "NodeStructureItem"}
[17:06:23 DBG] [v14.3.9] TfsNodeStructure:CheckForMissingPaths:CheckTarget::NOTFOUND::{"anchored": true, "sourcePath": "SourceProject\\Sprint 1", "targetPath": "Target Project\\Sprint 1", "systemPath": "\\Target Project\\Iteration\\Sprint 1", "nodeType": "Iteration", "workItems": null, "$type": "NodeStructureItem"}::NOTFOUND
[17:06:23 DBG] [v14.3.9] TfsNodeStructure:CheckForMissingPaths:CheckTarget::LOG-ONLY::{"anchored": true, "sourcePath": "SourceProject\\Sprint 1", "targetPath": "Target Project\\Sprint 1", "systemPath": "\\Target Project\\Iteration\\Sprint 1", "nodeType": "Iteration", "workItems": null, "$type": "NodeStructureItem"}
[17:06:23 DBG] [v14.3.9] TfsNodeStructure:CheckForMissingPaths:Checking::{"anchored": true, "sourcePath": "SourceProject", "targetPath": null, "systemPath": null, "nodeType": "Iteration", "workItems": null, "$type": "NodeStructureItem"}
[17:06:23 DBG] [v14.3.9] NodeStructureEnricher.GetNewNodeName(SourceProject, Iteration)
[17:06:23 DBG] [v14.3.9] NodeStructureEnricher.GetNewNodeName::Mappers
[17:06:23 DBG] [v14.3.9] TfsNodeStructure:CheckForMissingPaths:GetNewNodeName::{"anchored": true, "sourcePath": "SourceProject, "targetPath": "Target Project", "systemPath": null, "nodeType": "Iteration", "workItems": null, "$type": "NodeStructureItem"}
[17:06:23 DBG] [v14.3.9] TfsNodeStructure:CheckForMissingPaths:CheckTarget::{"anchored": true, "sourcePath": "SourceProject", "targetPath": "Target Project", "systemPath": "\\Corporations Project\\Iteration", "nodeType": "Iteration", "workItems": null, "$type": "NodeStructureItem"}
[17:06:23 DBG] [v14.3.9] TfsNodeStructure:CheckForMissingPaths:CheckTarget::FOUND::{"anchored": true, "sourcePath": "SourceProject", "targetPath": "Target Project", "systemPath": "\\Target Project\\Iteration", "nodeType": "Iteration", "workItems": null, "$type": "NodeStructureItem"}::FOUND
[17:06:23 DBG] [v14.3.9] TfsNodeStructure:CheckForMissingPaths:Checking::{"anchored": true, "sourcePath": "SourceProject\\Sprint 2", "targetPath": null, "systemPath": null, "nodeType": "Iteration", "workItems": null, "$type": "NodeStructureItem"}
[17:06:23 DBG] [v14.3.9] NodeStructureEnricher.GetNewNodeName(SourceProject\Sprint 2, Iteration)
[17:06:23 DBG] [v14.3.9] NodeStructureEnricher.GetNewNodeName::Mappers
[17:06:23 DBG] [v14.3.9] TfsNodeStructure:CheckForMissingPaths:GetNewNodeName::{"anchored": true, "sourcePath": "SourceProject\\Sprint 2", "targetPath": "Target Project\\Sprint 2", "systemPath": null, "nodeType": "Iteration", "workItems": null, "$type": "NodeStructureItem"}
[17:06:23 DBG] [v14.3.9] TfsNodeStructure:CheckForMissingPaths:CheckTarget::{"anchored": true, "sourcePath": "SourceProject\\Sprint 2", "targetPath": "Target Project\\Sprint 2", "systemPath": "\\Target Project\\Iteration\\Sprint 2", "nodeType": "Iteration", "workItems": null, "$type": "NodeStructureItem"}
[17:06:23 DBG] [v14.3.9] TfsNodeStructure:CheckForMissingPaths:CheckTarget::NOTFOUND::{"anchored": true, "sourcePath": "SourceProject\\Sprint 2", "targetPath": "Corporations Project\\Sprint 2", "systemPath": "\\Target Project\\Iteration\\Sprint 2", "nodeType": "Iteration", "workItems": null, "$type": "NodeStructureItem"}::NOTFOUND
[17:06:23 DBG] [v14.3.9] TfsNodeStructure:CheckForMissingPaths:CheckTarget::LOG-ONLY::{"anchored": true, "sourcePath": "SourceProject\\Sprint 2", "targetPath": "Target Project\\Sprint 2", "systemPath": "\\Target Project\\Iteration\\Sprint 2", "nodeType": "Iteration", "workItems": null, "$type": "NodeStructureItem"}
[17:06:23 WRN] [v14.3.9] !! There are MISSING Area or Iteration Paths
[17:06:23 WRN] [v14.3.9] !! There are 2 Nodes (Area or Iteration) found in the history of the Source that are missing from the Target! These MUST be added or mapped before we can continue using the instructions on https://nkdagility.com/learn/azure-devops-migration-tools/Reference/v1/Processors/WorkItemMigrationContext/#iteration-maps-and-area-maps
[17:06:23 WRN] [v14.3.9] MISSING Iteration: sourcePath=SourceProject\Sprint 1, targetPath=Target Project\Sprint 1, anchored=True, IDs=n/a
[17:06:23 WRN] [v14.3.9] MISSING Iteration: sourcePath=SourceProject\Sprint 2, targetPath=Target Project\Sprint 2, anchored=True, IDs=n/a
[17:06:23 INF] [v14.3.9] DONE in 00:00:02.9067974
[17:06:23 FTL] [v14.3.9] Error while running WorkItemMigration
System.Exception: Missing Iterations in Target preventing progress, check log for list. To continue you MUST configure IterationMaps or AreaMaps that matches the missing paths..
   at VstsSyncMigrator.Engine.WorkItemMigrationContext.InternalExecute() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 143
   at MigrationTools._EngineV1.Processors.MigrationProcessorBase.Execute() in D:\a\1\s\src\MigrationTools\_EngineV1\Processors\MigrationProcessorBase.cs:line 47
[17:06:23 ERR] [v14.3.9] WorkItemMigration The Processor MigrationEngine entered the failed state...stopping run
[17:06:23 INF] [v14.3.9] Application is shutting down...
[17:06:23 DBG] [v14.3.9] Hosting stopping
[17:06:23 DBG] [v14.3.9] Exiting with return code: 0
[17:06:23 INF] [v14.3.9] Application Ending
[17:06:23 INF] [v14.3.9] The application ran in 00:00:06.3227689 and finished at 12/20/2023 17:06:23
[17:06:23 DBG] [v14.3.9] Hosting stopped

What happened?

I keep getting this error that the iteration node does not exist, I am trying to map it to the name of the node in the target org in the iteration map but it does not seem to be working, I have tried several variations with the escape characters and such

Debug in Visual Studio

  • Visual Studio Debug