azure-devops-migration-tools

Is it possible to use "Work items and direct link" type of query with Azure DevOps Migration tool


I'm trying to use the "azure-devops-migration-tool" to migrate Work items. What I'm trying to achieve is to query all items with closed not set and all the directly linked items with them in one query. This can be done in Azure DevOps UI, but I can't get the same query working in the tool.

An example query would be like this:

 "QueryBit": "AND ( [Source].[System.WorkItemType] <> '' AND [Source].[System.State] <> '' AND [Source].[Microsoft.VSTS.Common.ClosedDate] = '') AND ([Target].[System.WorkItemType] <> '')"

Once running the tool I get an exception

  [EXCEPTION] Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF51005: The query references a field that does not exist. The error is caused by «Source.[System.WorkItemType]».
   at Microsoft.TeamFoundation.WorkItemTracking.Client.Query.Initialize(WorkItemStore store, String wiql, IDictionary context, Int32[] ids, Int32[] revs, Boolean dayPrecision)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.Query(String wiql, IDictionary context)
   at VstsSyncMigrator.Engine.TfsQueryContext.Execute() in d:\a\1\s\src\VstsSyncMigrator.Core\Execution\ComponentContext\TfsQueryContext.cs:line 72
migration.exe Warning: 0 :   [EXCEPTION] Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF51005: The query references a field that does not exist. The error is caused by «Source.[System.WorkItemType]».
   at Microsoft.TeamFoundation.WorkItemTracking.Client.Query.Initialize(WorkItemStore store, String wiql, IDictionary context, Int32[] ids, Int32[] revs, Boolean dayPrecision)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.Query(String wiql, IDictionary context)
   at VstsSyncMigrator.Engine.TfsQueryContext.Execute() in d:\a\1\s\src\VstsSyncMigrator.Core\Execution\ComponentContext\TfsQueryContext.cs:line 99
   at VstsSyncMigrator.Engine.WorkItemMigrationContext.InternalExecute() in d:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 101
   at VstsSyncMigrator.Engine.MigrationContextBase.Execute() in d:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\MigrationContextBase.cs:line 35

Any suggestions?


Solution

  • Found the issue, and it was that the tool did not support to query from "WorkItemLinks". It only supports "flat list of workitems type query"