Skip to content

Issue with workitem Migration  #1637

@radhiam

Description

@radhiam

Version

  • I confirm that I am using the latest version

Source Version

Team Foundation Server 2017

Target Version

Azure DevOps Service

Relevant configuration

{
  "ChangeSetMappingFile": null,
  "Source": {
    "$type": "TfsTeamProjectConfig",
    "Collection": "xxxxx",
    "Project": "xxxx",
    "FilterWorkItemsThatAlreadyExistInTarget": true,
    "AllowCrossProjectLinking": false,
    "PersonalAccessToken": "xxxxx",
    "PersonalAccessTokenVariableName": "",
    "LanguageMaps": {
      "AreaPath": "Area",
      "IterationPath": "Iteration"
    }
  },
  "Target": {
    "$type": "TfsTeamProjectConfig",
    "Collection": "xxxxx",
    "Project": "xxxxxxx",
    "ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
    "AllowCrossProjectLinking": false,
    "PersonalAccessToken": "xxxxx",
    "PersonalAccessTokenVariableName": "",
    "LanguageMaps": {
      "AreaPath": "Area",
      "IterationPath": "Iteration"
    }
  },
  "FieldMaps": [
    {
      "$type": "FieldValueMapConfig",
      "WorkItemTypeName": "*",
      "sourceField": "System.State",
      "targetField": "System.State",
      "valueMapping": {
        "Approved": "Approved",
        "New": "New",
        "Committed": "Committed",
        "In Progress": "In Progress",
        "To Do": "To Do",
        "Done": "Done",
        "Removed": "Removed",
        "Resolved": "Resolved",
        "Design": "Design",
        "Closed": "Closed",
        "Ready": "Ready"
      }
    },
    {
      "$type": "FieldtoFieldMapConfig",
      "WorkItemTypeName": "*",
      "sourceField": "Microsoft.VSTS.Common.BacklogPriority",
      "targetField": "Microsoft.VSTS.Common.StackRank",
      "defaultValue": null
    },
    {
      "$type": "FieldtoFieldMultiMapConfig",
      "WorkItemTypeName": "*",
      "SourceToTargetMappings": {
        "SourceField1": "TargetField1",
        "SourceField2": "TargetField2"
      }
    },
    {
      "$type": "FieldtoTagMapConfig",
      "WorkItemTypeName": "*",
      "sourceField": "System.State",
      "formatExpression": "ScrumState:{0}"
    },
    {
      "$type": "FieldMergeMapConfig",
      "WorkItemTypeName": "*",
      "sourceFields": [
        "System.Description",
        "Microsoft.VSTS.Common.AcceptanceCriteria"
      ],
      "targetField": "System.Description",
      "formatExpression": "{0} <br/><br/><h3>Acceptance Criteria</h3>{1}"
    },
    {
      "$type": "RegexFieldMapConfig",
      "WorkItemTypeName": "*",
      "sourceField": "COMPANY.PRODUCT.Release",
      "targetField": "COMPANY.DEVISION.MinorReleaseVersion",
      "pattern": "PRODUCT \\d{4}.(\\d{1})",
      "replacement": "$1"
    },
    {
      "$type": "FieldValuetoTagMapConfig",
      "WorkItemTypeName": "*",
      "sourceField": "Microsoft.VSTS.CMMI.Blocked",
      "pattern": "Yes",
      "formatExpression": "{0}"
    },
    {
      "$type": "TreeToTagMapConfig",
      "WorkItemTypeName": "*",
      "toSkip": 3,
      "timeTravel": 1
    },
    { 
      "$type": "MultiValueConditionalMapConfig", 
      "WorkItemTypeName": "User Story", 
      "sourceFieldsAndValues": { "System.State": "Active" }, 
      "targetFieldsAndValues": { "Microsoft.VSTS.Common.ActivatedDate": null, "Microsoft.VSTS.Common.ActivatedBy": null } } 
  ],
  "GitRepoMapping": null,
  "LogLevel": "Information",
  "CommonEnrichersConfig": null,
  "Processors": [
    {
      "$type": "WorkItemMigrationConfig",
      "Enabled": true,
      "ReplayRevisions": true,
      "PrefixProjectToNodes": false,
      "UpdateCreatedDate": true,
      "UpdateCreatedBy": true,
      "WIQLQueryBit": "AND  [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request')",
      "WIQLOrderBit": "[System.ChangedDate] desc",
      "LinkMigration": true,
      "AttachmentMigration": true,
      "AttachmentWorkingPath": "c:\\temp\\WorkItemAttachmentWorkingFolder\\",
      "FixHtmlAttachmentLinks": false,
      "SkipToFinalRevisedWorkItemType": true,
      "WorkItemCreateRetryLimit": 5,
      "FilterWorkItemsThatAlreadyExistInTarget": true,
      "PauseAfterEachWorkItem": false,
      "AttachmentMaxSize": 480000000,
      "AttachRevisionHistory": false,
      "LinkMigrationSaveEachAsAdded": false,
      "GenerateMigrationComment": true,
      "WorkItemIDs": null,
      "MaxRevisions": 0,
      "UseCommonNodeStructureEnricherConfig": false,
      "StopMigrationOnMissingAreaIterationNodes": false,
      "NodeBasePaths": [],
      "AreaMaps": {},
      "IterationMaps": {
           
      },
      "MaxGracefulFailures": 0,
      "SkipRevisionWithInvalidIterationPath": false,
      "SkipRevisionWithInvalidAreaPath": false
    }
  ],
  "Version": "13.1",
  "workaroundForQuerySOAPBugEnabled": false,
  "WorkItemTypeDefinition": {
    "sourceWorkItemTypeName": "targetWorkItemTypeName"
  },
  "Endpoints": {
    "InMemoryWorkItemEndpoints": [
      {
        "Name": "Source",
        "EndpointEnrichers": null
      },
      {
        "Name": "Target",
        "EndpointEnrichers": null
      }
    ]
  }
}

Relevant log output

error : 
[18:59:41 ERR] Field map fault
Microsoft.TeamFoundation.WorkItemTracking.Client.FieldDefinitionNotExistException: TF26027: A field definition Microsoft.VSTS.Common.AcceptanceCriteria in the work item type definition file does not exist. Add a definition for this field or remove the reference to the field and try again.
   at Microsoft.TeamFoundation.WorkItemTracking.Client.FieldDefinitionCollection.get_Item(String name)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.FieldCollection.get_Item(String name)
   at MigrationTools.FieldMaps.AzureDevops.ObjectModel.FieldMergeMap.InternalExecute(WorkItem source, WorkItem target) in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.ObjectModel\FieldMaps\FieldMergeMap.cs:line 47
   at MigrationTools.FieldMaps.AzureDevops.ObjectModel.FieldMapBase.Execute(WorkItemData source, WorkItemData target) in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.ObjectModel\FieldMaps\FieldMapBase.cs:line 31

What happened?

while Migrating the workitems, out of 2500 workitems only 1500 has been migrated. while comparing the Source & target. seems like inprogress, closed items are not migrated to the target.

Debug in Visual Studio

  • Visual Studio Debug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions