Thursday, October 27, 2022

Err work item is not ready save - nkd azure devops migration tool

 

I am trying to migrate the workitems from one azure devops org to other azure devops org project.

ERR] System.InvalidOperationException: This path is not anchored in the source project name: it   at MigrationTools.Enrichers.TfsNodeStructure.GetNewNodeName(String sourceNodePath, TfsNodeStructureType nodeStructureType) in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.ObjectModel\ProcessorEnrichers\TfsNodeStructure.cs:line 99   at VstsSyncMigrator.Engine.WorkItemMigrationContext.PopulateWorkItem(WorkItemData oldWi, WorkItemData newwit, String destType) in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 402   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 642[14:23:01 INF] ===============================================================[14:23:01 DBG] TfsExtensions::SaveToAzureDevOps

[14:23:01 DBG] TfsExtensions::SaveToAzureDevOps: ChangedBy: , AuthorisedBy: Nnkata[14:23:01 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.[14:23:01 DBG] --------------------------------------------------------------------------------------------------------------------

[14:23:01 DBG] --------------------------------------------------------------------------------------------------------------------

[14:23:01 DBG] TfsExtensions::ToJson

[14:23:01 DBG] Invalid Field Object:

{

  "WorkItemId": 0,

  "CurrentRevisionWorkItemRev": 0,

  "CurrentRevisionWorkItemTypeName": "Feature",

  "Name": "Area Path",

  "ReferenceName": "System.AreaPath",

  "Value": "i",

  "OriginalValue": "",

  "ValueWithServerDefault": "",

  "Status": 16,

  "IsRequired": true,

  "IsEditable": true,

  "IsDirty": true,

  "IsComputed": true,

  "IsChangedByUser": true,

  "IsChangedInRevision": true,

  "HasPatternMatch": false,

  "IsLimitedToAllowedValues": false,

  "HasAllowedValuesList": false,

  "AllowedValues": [],

  "IdentityFieldAllowedValues": [],

  "ProhibitedValues": []

}

[14:23:01 DBG] TfsExtensions::ToJson

[14:23:01 DBG] Invalid Field Object:

{

  "WorkItemId": 0,

  "CurrentRevisionWorkItemRev": 0,

  "CurrentRevisionWorkItemTypeName": "Feature",

  "Name": "Iteration Path",

  "ReferenceName": "System.IterationPath",

  "Value": "\\Admin Portal\\Sprint 14 Sep - 25 Sep",

  "OriginalValue": "",

  "ValueWithServerDefault": "\\Admin Portal\\Sprint 14 Sep - 25 Sep",

  "Status": 16,

  "IsRequired": true,

  "IsEditable": true,

  "IsDirty": true,

  "IsComputed": true,

  "IsChangedByUser": true,

  "IsChangedInRevision": true,

  "HasPatternMatch": false,

  "IsLimitedToAllowedValues": false,

  "HasAllowedValuesList": false,

  "AllowedValues": [],

  "IdentityFieldAllowedValues": [],

  "ProhibitedValues": []

}

[14:23:01 DBG] --------------------------------------------------------------------------------------------------------------------

[14:23:01 DBG] --------------------------------------------------------------------------------------------------------------------

[14:23:01 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 77

   at VstsSyncMigrator.Engine.WorkItemMigrationContext.<ProcessWorkItemAsync>d__35.MoveNext() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 505

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 77

   at VstsSyncMigrator.Engine.WorkItemMigrationContext.<ProcessWorkItemAsync>d__35.MoveNext() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 505

[14:23:01 ERR] Could not save migrated work item 696, an exception occurred.

System.AggregateException: One or more errors occurred. ---> Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF237124: Work Item is not ready to save

   at VstsSyncMigrator.Engine.WorkItemMigrationContext.<ProcessWorkItemAsync>d__35.MoveNext() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 550

   --- End of inner exception stack trace ---

   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)

   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)

   at VstsSyncMigrator.Engine.WorkItemMigrationContext.InternalExecute() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 205

---> (Inner Exception #0) Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF237124: Work Item is not ready to save

   at VstsSyncMigrator.Engine.WorkItemMigrationContext.<ProcessWorkItemAsync>d__35.MoveNext() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 550<---

[14:23:01 WRN] The following items could not be migrated: 696

[14:23:01 INF] DONE in 00:08:24.0134378

[14:23:01 FTL] Error while running WorkItemMigration

System.AggregateException: One or more errors occurred. ---> Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF237124: Work Item is not ready to save

   at VstsSyncMigrator.Engine.WorkItemMigrationContext.<ProcessWorkItemAsync>d__35.MoveNext() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 550

   --- End of inner exception stack trace ---

   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)

   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)

   at VstsSyncMigrator.Engine.WorkItemMigrationContext.InternalExecute() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 225

   at MigrationTools._EngineV1

Migrate the Azure DevOps workitems from One Azure Devops org project to another Azure DevOps Org project

When migrating found that the Area path is different at the time of creation , after few days we changed to different Area Path name.

Can anyone help how we can skip or take force migration for Target project?



SOLUTION:


Is this because you have the ReplayRevisions set to true In Configuration.json file, and it is replaying all the revisions

Featured Post

Ansible Tool Introduction

                                                                                                                                    Next ...