nkdAgility / azure-devops-migration-tools

Azure DevOps Migration Tools allow you to migrate Teams, Backlogs, Tasks, Test Cases, and Plans & Suits from one Project to another in Azure DevOps / TFS both within the same Organisation, and between Organisations.
https://nkdagility.com/learn/azure-devops-migration-tools/
MIT License
491 stars 326 forks source link

[Bug]: System.Web.Services.Protocols.SoapException: VS403417: ChangedBy value cannot be empty when BypassRules is specified #2348

Closed Danlewis3 closed 1 week ago

Danlewis3 commented 1 week ago

Version

Source Version

Azure DevOps Service

Target Version

Azure DevOps Service

Relevant configuration

{
  "ChangeSetMappingFile": null,
  "Source": {
    "$type": "TfsTeamProjectConfig",
    "Collection": "https://dev.azure.com/XXXXX/",
    "Project": "Development",
    "ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
    "AllowCrossProjectLinking": false,
    "AuthenticationMode": "AccessToken",
    "PersonalAccessToken": "",
    "PersonalAccessTokenVariableName": "",
    "LanguageMaps": {
      "AreaPath": "Area",
      "IterationPath": "Iteration"
    },
    "CollectionName": "https://dev.azure.com/XXX/"
  },
  "Target": {
    "$type": "TfsTeamProjectConfig",
    "Collection": "https://dev.azure.com/XXXX/",
    "Project": "Columbus",
    "ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
    "AllowCrossProjectLinking": false,
    "AuthenticationMode": "AccessToken",
    "PersonalAccessToken": "",
    "PersonalAccessTokenVariableName": "",
    "LanguageMaps": {
      "AreaPath": "Area",
      "IterationPath": "Iteration"
    },
    "CollectionName": "https://dev.azure.com/XXXX/"
  },
  "FieldMaps": [],
  "GitRepoMapping": null,
  "LogLevel": "Information",
  "CommonEnrichersConfig": [
    {
      "$type": "TfsNodeStructureOptions",
      "PrefixProjectToNodes": false,
      "NodeBasePaths": [
      ],
      "AreaMaps": {
         "^Portfolio$": "XXX\\Area\\Portfolio",
        "^Development$": "XXX\\Area\\Development"

      },
      "IterationMaps": {
        "^Portfolio$": "XXX\\Iteration\\Portfolio",
         "^MDST Development$": "XXX\\Iteration\\Development"

      },
      "ShouldCreateMissingRevisionPaths": true,
      "ReplicateAllExistingNodes": true,
      "Enabled": true
    },
    {
      "$type": "TfsWorkItemLinkEnricherOptions",
      "Enabled": true,
      "FilterIfLinkCountMatches": true,
      "SaveAfterEachLinkIsAdded": false
    },
    {
      "$type": "TfsRevisionManagerOptions",
      "Enabled": true,
      "ReplayRevisions": true,
      "MaxRevisions": 100
    },
    {
      "$type": "StringManipulatorEnricherOptions",
      "Enabled": true,
      "MaxStringLength": 1000000,
      "Manipulators": [
        {
          "$type": "RegexStringManipulator",
          "Enabled": true,
          "Pattern": "[^( -~)\n\r\t]+",
          "Replacement": "",
          "Description": "Remove invalid characters from the end of the string"
        }
      ]
    }
  ],
  "Processors": [

    {
      "$type": "WorkItemMigrationConfig",
      "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', 'Route to Live') AND [System.State] IN ('Ready for Grooming', 'On Hold', 'Approved', 'In Analysis', 'New', 'Active', 'In Progress', 'In Development', 'Blocked') ORDER BY [System.ChangedDate] DESC",
      "AttachmentMigration": true,
      "AttachmentWorkingPath": "c:\\temp\\WorkItemAttachmentWorkingFolder\\",
      "FixHtmlAttachmentLinks": false,
      "SkipToFinalRevisedWorkItemType": true,
      "WorkItemCreateRetryLimit": 15,
      "FilterWorkItemsThatAlreadyExistInTarget": true,
      "PauseAfterEachWorkItem": false,
      "AttachmentMaxSize": 480000000,
      "AttachRevisionHistory": false,
      "LinkMigrationSaveEachAsAdded": false,
      "GenerateMigrationComment": true,
      "WorkItemIDs": null,
      "MaxGracefulFailures": 1000,
      "SkipRevisionWithInvalidIterationPath": false,
      "SkipRevisionWithInvalidAreaPath": false
    }
  ],
  "Version": "15.0",
  "workaroundForQuerySOAPBugEnabled": false,
  "WorkItemTypeDefinition": {
    "sourceWorkItemTypeName": "targetWorkItemTypeName"
  },
  "Endpoints": {
    "InMemoryWorkItemEndpoints": [
      {
        "Name": "Source",
        "EndpointEnrichers": null
      },
      {
        "Name": "Target",
        "EndpointEnrichers": null
      }
    ]
  }
}

Relevant log output

Microsoft.TeamFoundation.WorkItemTracking.Client.UnexpectedErrorException: There is a problem on the server. Contact your Azure DevOps Server administrator. ---> System.Web.Services.Protocols.SoapException: VS403417: ChangedBy value cannot be empty when BypassRules is specified
   at Microsoft.TeamFoundation.WorkItemTracking.Proxy.RetryHandler.HandleSoapException(SoapException se)
   at Microsoft.TeamFoundation.WorkItemTracking.Proxy.WorkItemServer.Update(String requestId, XmlElement package, XmlElement& result, MetadataTableHaveEntry[] metadataHave, String& dbStamp, IMetadataRowSets& metadata)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.SendUpdatePackage(XmlElement package, XmlElement& result, Boolean bulk)
   --- End of inner exception stack trace ---
   at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.SendUpdatePackage(XmlElement package, XmlElement& result, Boolean bulk)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.SaveWorkItems(WorkItem[] workitems, Boolean bulk, SaveFlags saveFlags)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem.Save(SaveFlags saveFlags)
   at MigrationTools.TfsExtensions.SaveToAzureDevOps(WorkItemData context) in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.ObjectModel\TfsExtensions.cs:line 77
   at VstsSyncMigrator.Engine.WorkItemMigrationContext.<ProcessWorkItemAsync>d__40.MoveNext() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 609
Microsoft.TeamFoundation.WorkItemTracking.Client.UnexpectedErrorException: There is a problem on the server. Contact your Azure DevOps Server administrator. ---> System.Web.Services.Protocols.SoapException: VS403417: ChangedBy value cannot be empty when BypassRules is specified
   at Microsoft.TeamFoundation.WorkItemTracking.Proxy.RetryHandler.HandleSoapException(SoapException se)
   at Microsoft.TeamFoundation.WorkItemTracking.Proxy.WorkItemServer.Update(String requestId, XmlElement package, XmlElement& result, MetadataTableHaveEntry[] metadataHave, String& dbStamp, IMetadataRowSets& metadata)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.SendUpdatePackage(XmlElement package, XmlElement& result, Boolean bulk)
   --- End of inner exception stack trace ---
   at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.SendUpdatePackage(XmlElement package, XmlElement& result, Boolean bulk)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.SaveWorkItems(WorkItem[] workitems, Boolean bulk, SaveFlags saveFlags)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem.Save(SaveFlags saveFlags)
   at MigrationTools.TfsExtensions.SaveToAzureDevOps(WorkItemData context) in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.ObjectModel\TfsExtensions.cs:line 77
   at VstsSyncMigrator.Engine.WorkItemMigrationContext.<ProcessWorkItemAsync>d__40.MoveNext() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 609

What happened?

A bug happened!

Debug in Visual Studio

MrHinsh commented 1 week ago

Please see

  1. https://github.com/nkdAgility/azure-devops-migration-tools/discussions/2068
  2. https://github.com/nkdAgility/azure-devops-migration-tools/issues/1200

Can you check:

However, it appears the cause of my problem was that the work item type I was trying to import as had been disabled on the ADO server. It is working now. Thank you.