azure-devopsazure-devops-migration-toolsvsts-sync-migrator

How do I Migrate In-Line Links to Other Work Items That Point to New Project Work Items


I've got the Azure DevOps Migration Tools setup to where it looks like everything is coming over correctly, with one exception. When in-line links to work items are brought over the link still references the old project instead of the new one. I'm assuming that I'm missing some attribute that is telling the tool to still reference the source project but I can't for the life of me find said attribute.

Example: There are 2 projects,: "Test Source Project" and "Test Target Project" When "Test Source Project" gets migrated to "Test Target Project" the links in "Test Target Project" still reference the original task in "Test Source Project." Below is a screenshot of what I'm referencing.

I'm expecting the link to be: https://dev.azure.com/Company/Test%20Target%20Project/_workitems/edit/75

But I'm getting https://dev.azure.com/Company/Test%20Source%20Project/_workitems/edit/75

Screenshot of In-Line Link


The version I am on is 8.9 and here's my config:

{
  "Version": "8.9",
  "TelemetryEnableTrace": false,
  "workaroundForQuerySOAPBugEnabled": false,
  "Source": {
    "Collection": "https://dev.azure.com/Company/",
    "Project": "Test Source Project",
    "ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
    "AllowCrossProjectLinking": false,
    "PersonalAccessToken": ""
  },
  "Target": {
    "Collection": "https://dev.azure.com/grda365/",
    "Project": "Test Target Project",
    "ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
    "AllowCrossProjectLinking": false,
    "PersonalAccessToken": ""
  },
  "FieldMaps": [],
  "WorkItemTypeDefinition": {
    "sourceWorkItemTypeName": "targetWorkItemTypeName"
  },
  "GitRepoMapping": null,
  "Processors": [
    {
      "ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.NodeStructuresMigrationConfig",
      "PrefixProjectToNodes": false,
      "Enabled": true,
      "BasePaths": []
    },
    {
      "ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.WorkItemMigrationConfig",
      "ReplayRevisions": true,
      "PrefixProjectToNodes": false,
      "UpdateCreatedDate": true,
      "UpdateCreatedBy": true,
      "UpdateSourceReflectedId": false,
      "BuildFieldTable": false,
      "AppendMigrationToolSignatureFooter": false,
      "QueryBit": "AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan')",
      "OrderBit": "[System.ChangedDate] desc",
      "Enabled": true,
      "LinkMigration": true,
      "AttachmentMigration": true,
      "AttachmentWorkingPath": "c:\\temp\\WorkItemAttachmentWorkingFolder\\",
      "FixHtmlAttachmentLinks": false,
      "SkipToFinalRevisedWorkItemType": false,
      "WorkItemCreateRetryLimit": 5,
      "FilterWorkItemsThatAlreadyExistInTarget": false,
      "PauseAfterEachWorkItem": false,
      "AttachmentMazSize": 480000000,
      "CollapseRevisions": false
    },
    {
      "ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.WorkItemQueryMigrationConfig",
      "Enabled": true
    }
  ]
}

 

Solution

  • The tool does not update inline links.

    This is an implementation issue as we migrate by iterating through all of the existing work items. For integrated links we can just add links to work items that exist in the target, and it will add from both ends once the other item is added.

    For example if we are migrating 1, 2, 3 and 1, 2 reference 3 then:

    1. #1 is migrated and no links are added as #3 does not exist
    2. #2 is migrated and no links are added as #3 does not exist
    3. #3 is migrated and links are added to #1 and #2

    At the point of adding #3 and creating the links there is no way to know which work items have inline links to any other work items.


    Ideas for fixing

    OK, so that's how the tool currently works, so I am imagining a fix. Ther could be an option "RefactorInlineLinks" that parsed any description that it encountered and fixed the link if it was in scope for the migration.

    However this would only work as a second pass after the migration was completed and all of the work items that will exist do exist.