azureazure-devopsazure-devops-migration-tools

Unable to migrate link where Link of type System.LinkTypes.Hierarchy-Forward


I used Azure DevOps Migration Tools to migrate all types of a work items from two azure projects in the same organization

I search a lot and went through all documents but I not getting a robust solution on how to migrate parent-child link items to the destination project. I make the LinkMigrationSaveEachAsAdded flag true/false but it did not work.

My configuration file,

{
  "Version": "12.0",
  "LogLevel": "Verbose",
  "workaroundForQuerySOAPBugEnabled": false,
  "Source": {
    "$type": "TfsTeamProjectConfig",
    "Collection": "https://dev.azure.com/MyNameOrg/",
    "Project": "SourceProject",
    "ReflectedWorkItemIDFieldName": "TfsMigrationTool.ReflectedWorkItemId",
    "AuthenticationMode": "AccessToken",
    "AllowCrossProjectLinking": false,
    "PersonalAccessToken": "MyTokenHidden",
    "LanguageMaps": {
      "AreaPath": "Area",
      "IterationPath": "Iteration"
    }
  },
  "Target": {
    "$type": "TfsTeamProjectConfig",
    "Collection": "https://dev.azure.com/MyNameOrg/",
    "Project": "DestinationProject",
    "ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
    "AuthenticationMode": "AccessToken",
    "AllowCrossProjectLinking": false,
    "PersonalAccessToken": "MyTokenHidden",
    "LanguageMaps": {
      "AreaPath": "Area",
      "IterationPath": "Iteration"
    }
  },
  "FieldMaps": [
    {
      "$type": "TreeToTagMapConfig",
      "WorkItemTypeName": "*",
      "toSkip": 3,
      "timeTravel": 1
    }
  ],
  "WorkItemTypeDefinition": {
    "sourceWorkItemTypeName": "targetWorkItemTypeName"
  },
  "GitRepoMapping": null,
  "Processors": [
    {
      "$type": "WorkItemMigrationConfig",
      "Enabled": true,
      "ReplayRevisions": true,
      "PrefixProjectToNodes": false,
      "UpdateCreatedDate": true,
      "UpdateCreatedBy": true,
      "WIQLQueryBit": " AND [Custom.ReqID] contains 'CR' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan')",
      "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": true,
      "GenerateMigrationComment": false,
      "WorkItemIDs": null,
      "MaxRevisions": 0,
      "NodeStructureEnricherEnabled": true,
      "UseCommonNodeStructureEnricherConfig": false,
      "NodeBasePaths": [],
      "AreaMaps": {},
      "IterationMaps": {},
      "MaxGracefulFailures": 0
    }

  ]
}

[SKIP] Unable to migrate link where Link of type System.LinkTypes.Hierarchy-Forward where wiSourceL=182, wiSourceR=222, wiTargetL=189, wiTargetR=222 as target WI has not been migrated #1335

Solution

  • Given the configuration file in question, it works for all types of migration such as parent to child, attachments such as pdf, images, docs, xls, etc. The problem in the above file is on line

    "WIQLQueryBit": " AND [Custom.ReqID] contains 'CR' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan')",
    

    Custom.ReqID field should be required in every epic, feature, user story, bug, and task and the field value should start with the words CR.