Search code examples
azure-devopstfs-workitemazure-devops-migration-tools

Not able to migrate using nkdAgility, getting group name already exists in scope error


I am migrating my project from one organization to another, while migrating, getting below error as the group already exists in the scope - enter image description here

Please let me know if you need more information.

I tried reading the documentation of the tool but still not able to solve it.


Solution

  • As per the error message, the group (XXX team) already exists in target, which is not mapped.

    Below is my configuration.json, it synced teams and validate user mapping for TfsWorkItemMigrationProcessor, which is working on my side.

    Please follow TfsTeamSettingsTool and Processors block for a check.

    {
      "Serilog": {
        "MinimumLevel": "Information"
      },
      "MigrationTools": {
        "Version": "16.0",
        "Endpoints": {
          "Source": {
            "EndpointType": "TfsTeamProjectEndpoint",
            "Collection": "https://dev.azure.com/sourceorg/",
            "Project": "wadetest16",
            "AllowCrossProjectLinking": false,
            "ReflectedWorkItemIdField": "Custom.ReflectedWorkItemId",
            "Authentication": {
              "AuthenticationMode": "AccessToken",
              "AccessToken": "PAT"
            },
            "LanguageMaps": {
              "AreaPath": "Area",
              "IterationPath": "Iteration"
            }
          },
          "Target": {
            "EndpointType": "TfsTeamProjectEndpoint",
            "Collection": "https://dev.azure.com/targetorg/",
            "Project": "wadetest17",
            "TfsVersion": "AzureDevOps",
            "Authentication": {
              "AuthenticationMode": "AccessToken",
              "AccessToken": "PAT"
            },
            "ReflectedWorkItemIdField": "Custom.ReflectedWorkItemId",
            "AllowCrossProjectLinking": false,
            "LanguageMaps": {
              "AreaPath": "Area",
              "IterationPath": "Iteration"
            }
          }
        },
        "CommonTools": {
          "TfsGitRepositoryTool": {
            "Enabled": true,
            "Mappings": {
              "test1": "test1"
            }
          },
          "TfsRevisionManagerTool": {
            "Enabled": true,
            "ReplayRevisions": true,
            "MaxRevisions": 0
          },
          "TfsTeamSettingsTool": {
            "Enabled": true,
            "MigrateTeamSettings": true,
            "UpdateTeamSettings": true,
            "MigrateTeamCapacities": true,
            "Teams": [ "wadetest16 Team", "Team2" ]
          }
        },
        "Processors": [
          {
            "ProcessorType": "TfsWorkItemMigrationProcessor",
            "Enabled": true,
            "UpdateCreatedDate": true,
            "UpdateCreatedBy": true,
            "WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc",
            "FixHtmlAttachmentLinks": false,
            "WorkItemCreateRetryLimit": 5,
            "FilterWorkItemsThatAlreadyExistInTarget": false,
            "PauseAfterEachWorkItem": false,
            "AttachRevisionHistory": false,
            "GenerateMigrationComment": true,
            "SourceName": "Source",
            "TargetName": "Target",
            "MaxGracefulFailures": 0,
            "SkipRevisionWithInvalidIterationPath": false,
            "SkipRevisionWithInvalidAreaPath": false
          }
        ]
      }
    }
    

    enter image description here