Trying to migrate work items from one organization to another organization. Both organizations are Azure DevOps Services.
When I execute:
migration.exe execute --config .\configuration.json
I get errors:
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 76
at VstsSyncMigrator.Engine.WorkItemMigrationContext.<ProcessWorkItemAsync>d__33.MoveNext() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 406
Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF237124: Work Item is not ready to save
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 76
at VstsSyncMigrator.Engine.WorkItemMigrationContext.<ProcessWorkItemAsync>d__33.MoveNext() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 406
This problem only occurs not with all work items.
Performed some testing and it seems the problem is related to work item history migration, if in configuration.json disable revisions migration, then it succeeds to migrate the task.
Seems something in "rev": 1.
I can’t find what field or value he didn’t like.
Debug mode log:
[10:17:16 DBG] Running Field Map: FieldValueMap System.State System.State
[10:17:16 DBG] FieldValueMap: [UPDATE] field value mapped 92552:System.State to 0:System.State
[10:17:16 DBG] Running Field Map: FieldToFieldMap System.Tags System.Tags
[10:17:16 DBG] FieldToFieldMap: [UPDATE] field mapped 92552:System.Tags to 0:System.Tags
[10:17:16 DBG] Running Field Map: FieldToFieldMap System.IterationPath System.IterationPath
[10:17:16 DBG] FieldToFieldMap: [UPDATE] field mapped 92552:System.IterationPath to 0:System.IterationPath
[10:17:16 DBG] Running Field Map: FieldToFieldMap System.Description System.Description
[10:17:16 DBG] FieldToFieldMap: [UPDATE] field mapped 92552:System.Description to 0:System.Description
[10:17:16 DBG] Running Field Map: FieldToFieldMap Custom.Requestor Custom.Requestorname
[10:17:16 DBG] Running Field Map: FieldToFieldMap Custom.Projectcode Custom.ProjectCode
[10:17:16 DBG] Running Field Map: FieldToFieldMap Custom.Team Custom.Team
[10:17:16 DBG] Running Field Map: FieldToFieldMap Custom.OperationsArea Custom.OperationsArea
[10:17:16 DBG] Running Field Map: FieldToFieldMap Custom.Developmenttime Custom.Estimation
[10:17:16 DBG] Running Field Map: FieldToFieldMap Custom.Tech Custom.TechnologyUsed
[10:17:16 DBG] Running Field Map: FieldToFieldMap Custom.DevelopmentStartDate Microsoft.VSTS.Scheduling.StartDate
[10:17:16 DBG] Running Field Map: FieldToFieldMap Custom.DevelopmentEnddate Microsoft.VSTS.Scheduling.TargetDate
[10:17:16 DBG] Running Field Map: FieldToFieldMap Custom.HoursSaved Custom.HoursSaved
[10:17:16 DBG] Running Field Map: FieldToFieldMap Custom.QualityImprovement Custom.ImpactDescription
[10:17:16 DBG] Running Field Map: FieldToFieldMap Custom.Customer Custom.ProjectCode
[10:17:16 DBG] Running Field Map: FieldValueMap Microsoft.VSTS.Common.Priority Custom.Prioritization
[10:17:16 DBG] FieldValueMap: [UPDATE] field value mapped 92552:Microsoft.VSTS.Common.Priority to 0:Custom.Prioritization
[10:17:16 DBG] TfsExtensions::SaveToAzureDevOps
[10:17:16 DBG] TfsExtensions::SaveToAzureDevOps: ChangedBy: user1, AuthorisedBy: user2
[10:17:16 WRN] Work Item is not ready to save as it has some invalid fields. This may not result in an error. Enable LogLevel as 'Debug' in the config to see more.
[10:17:16 DBG] --------------------------------------------------------------------------------------------------------------------
[10:17:16 DBG] --------------------------------------------------------------------------------------------------------------------
[10:17:16 DBG] TfsExtensions::ToJson
[10:17:16 DBG] Invalid Field Object:
{
"WorkItemId": 0,
"CurrentRevisionWorkItemRev": 0,
"CurrentRevisionWorkItemTypeName": "User Story",
"Name": "Iteration Path",
"ReferenceName": "System.IterationPath",
"Value": "C-SAM",
"OriginalValue": "",
"ValueWithServerDefault": "C-SAM",
"Status": 16,
"IsRequired": true,
"IsEditable": true,
"IsDirty": true,
"IsComputed": true,
"IsChangedByUser": true,
"IsChangedInRevision": true,
"HasPatternMatch": false,
"IsLimitedToAllowedValues": false,
"HasAllowedValuesList": false,
"AllowedValues": [],
"IdentityFieldAllowedValues": [],
"ProhibitedValues": []
[10:17:16 ERR] Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF237124: Work Item is not ready to save
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 76
at VstsSyncMigrator.Engine.WorkItemMigrationContext.ReplayRevisions(List`1 revisionsToMigrate, WorkItemData sourceWorkItem, WorkItemData targetWorkItem) in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 563