We are getting below error when trying to migrate the test plan and suites. [19:57:05 FTL] Error while running TestPlansAndSuitesMigrationContext System.ArgumentNullException: Value cannot be null. Parameter name: name at Microsoft.TeamFoundation.WorkItemTracking.Client.FieldCollection.get_Item(String name) at VstsSyncMigrator.Engine.TestPlandsAndSuitesMigrationContext.AssignReflectedWorkItemId(Int32 sourceWIId, Int32 targetWIId) in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\TestPlansAndSuitesMigrationContext.cs:line 361 at VstsSyncMigrator.Engine.TestPlandsAndSuitesMigrationContext.ProcessTestSuite(ITestSuiteBase sourceSuite, ITestSuiteBase targetParent, ITestPlan targetPlan) in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\TestPlansAndSuitesMigrationContext.cs:line 929 at VstsSyncMigrator.Engine.TestPlandsAndSuitesMigrationContext.ProcessTestSuite(ITestSuiteBase sourceSuite, ITestSuiteBase targetParent, ITestPlan targetPlan) in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\TestPlansAndSuitesMigrationContext.cs:line 952 at VstsSyncMigrator.Engine.TestPlandsAndSuitesMigrationContext.ProcessTestSuite(ITestSuiteBase sourceSuite, ITestSuiteBase targetParent, ITestPlan targetPlan) in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\TestPlansAndSuitesMigrationContext.cs:line 952 at VstsSyncMigrator.Engine.TestPlandsAndSuitesMigrationContext.ProcessTestPlan(ITestPlan sourcePlan) in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\TestPlansAndSuitesMigrationContext.cs:line 821 at VstsSyncMigrator.Engine.TestPlandsAndSuitesMigrationContext.InternalExecute() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\TestPlansAndSuitesMigrationContext.cs:line 83 at MigrationTools._EngineV1.Processors.MigrationProcessorBase.Execute() in D:\a\1\s\src\MigrationTools_EngineV1\Processors\MigrationProcessorBase.cs:line 47 [19:57:05 ERR] TestPlansAndSuitesMigrationContext The Processor MigrationEngine entered the failed state...stopping run
Asked
Active
Viewed 251 times
1
-
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Oct 09 '21 at 13:42
1 Answers
0
The error occurs in the "AssignReflectedWorkItemId".
You need to check if this property has been set correctly in the "Source" and "Target" section of your config file. e.g. :
"ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId"
,The property value (
Custom.ReflectedWorkItemId
) should be either a real custom field in the target project or just any existing field with type of 'string' (as workaround - not sure about correctness).
- how to add a custom field for a project: https://learn.microsoft.com/en-us/azure/devops/organizations/settings/work/add-custom-field?view=azure-devops
- If you don't want to create a custom field, it seems to be enough to define 'ReflectedWorkItemIDFieldName' as any existing DevOps string field
- ReflectedWorkItemIDFieldName is used as a field to write "
http(s)://dev.azure.com/{source-company-name}/{source-project-name}/_workitems/edit/{source-item-id}
" value. Please see method string CreateReflectedWorkItemId(WorkItem wi) for more details here https://github.com/nkdAgility/azure-devops-migration-tools/blob/master/src/VstsSyncMigrator.Core/Execution/ComponentContext/WorkItemStoreContext.cs - You can also consult this similar article in GitHub.

Rachel
- 81
- 1
- 9