Skip to content

[Bug]: EmbededImagesRepairEnricher: Unable to fix HTML field attachments for work item #2927

@dbru540

Description

@dbru540

Version

  • I confirm that I am using the latest version

Source Version

Azure DevOps Service

Target Version

Azure DevOps Service

Relevant configuration

{
  "Serilog": {
    "MinimumLevel": "Information"
  },
  "MigrationTools": {
    "Version": "16.2",
    "Endpoints": {
      "Source": {
        "EndpointType": "TfsTeamProjectEndpoint",
        "Collection": "https://dev.azure.com/aaa/",
        "Project": "Chris",
        "Authentication": {
          "AuthenticationMode": "AccessToken",
          "AccessToken": "***"
        },
        "ReflectedWorkItemIdField": "Custom.ReflectedWorkItemId",
        "LanguageMaps": {
          "AreaPath": "Area",
          "IterationPath": "Iteration"
        }
      },
      "Target": {
        "EndpointType": "TfsTeamProjectEndpoint",
        "Collection": "https://dev.azure.com/bbb/",
        "Project": "ERP program",
        "Authentication": {
          "AuthenticationMode": "AccessToken",
          "AccessToken": "***"
        },
        "ReflectedWorkItemIdField": "Custom.ReflectedWorkItemId",
        "LanguageMaps": {
          "AreaPath": "Area",
          "IterationPath": "Iteration"
        }
      }
    },
    "Processors": [
      {
        "ProcessorType": "TfsWorkItemMigrationProcessor",
        "Enabled": true,
        "UpdateCreatedDate": true,
        "UpdateCreatedBy": true,
        "WIQLQuery": "SELECT [System.Id] FROM WorkItems",
        "FixHtmlAttachmentLinks": true,
        "WorkItemCreateRetryLimit": 5,
        "FilterWorkItemsThatAlreadyExistInTarget": false,
        "GenerateMigrationComment": false,
        "SourceName": "Source",
        "TargetName": "Target"
      }
    ],
    "CommonTools": {
      "StringManipulatorTool": {
        "Enabled": false
      },       
      "TfsNodeStructureTool": {
        "Enabled": true,
        "Areas": {
          "Filters": null,
          "Mappings": null
        },
        "Iterations": {
          "Filters": null,
          "Mappings": null
        },        
        "ReplicateAllExistingNodes": true,
        "ShouldCreateMissingRevisionPaths": true
      },
      "TfsTeamSettingsTool": {
        "$type": "TfsTeamSettingsProcessorOptions",
        "Enabled": false,
        "MigrateTeamSettings": false,
        "UpdateTeamSettings": false,
        "PrefixProjectToNodes": false,
        "MigrateTeamCapacities": false,
        "Teams": null,
        "SourceName": null,
        "TargetName": null
      },
      "TfsAttachmentTool": {
        "Enabled": true,
        "ExportBasePath": "C:\\agent\\TEMP",
        "MaxAttachmentSize": "480000000",
        "RefName": "TfsAttachmentTool"
      },
      "TfsUserMappingTool": {
        "Enabled": false,
        "IdentityFieldsToCheck": [
          "System.AssignedTo",
          "System.ChangedBy",
          "System.CreatedBy",
          "Microsoft.VSTS.Common.ActivatedBy",
          "Microsoft.VSTS.Common.ResolvedBy",
          "Microsoft.VSTS.Common.ClosedBy"
        ],
        "UserMappingFile": "C:\\temp\\userExport.json"
      },
      "TfsRevisionManagerTool": {
        "Enabled": "True",
        "MaxRevisions": "200",
        "ReplayRevisions": "True"
      }      
    }
  }
}

Relevant log output

EmbededImagesRepairEnricher: Unable to fix HTML field attachments for work item 71356 from https://dev.azure.com/aaa/ to https://dev.azure.com/bbb/
System.Net.Http.HttpRequestException: The response status code does not indicate success : 302 (Found).
   à MigrationTools.Tools.TfsEmbededImagesTool.UploadedAndRetrieveAttachmentLinkUrl(String matchedSourceUri, String sourceFieldName, WorkItemData targetWorkItem, String sourcePersonalAccessToken) dans D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools.Clients.TfsObjectModel\Tools\TfsEmbededImagesTool.cs:ligne 167
   à MigrationTools.Tools.TfsEmbededImagesTool.FixEmbededImages(WorkItemData wi, String oldTfsurl, String newTfsurl, String sourcePersonalAccessToken) dans D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools.Clients.TfsObjectModel\Tools\TfsEmbededImagesTool.cs:ligne 97
Error logged to Elmah.io!

What happened?

A bug happened!

Debug in Visual Studio

  • Visual Studio Debug

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions