是否可以通过 Azure DevOps 迁移工具使用 "Work items and direct link" 类型的查询
Is it possible to use "Work items and direct link" type of query with Azure DevOps Migration tool
我正在尝试使用“azure-devops-migration-tool”来迁移工作项。我想要实现的是在一个查询中查询所有未设置关闭的项目以及所有与它们直接链接的项目。这可以在 Azure DevOps UI 中完成,但我无法在工具中使用相同的查询。
示例查询如下:
"QueryBit": "AND ( [Source].[System.WorkItemType] <> '' AND [Source].[System.State] <> '' AND [Source].[Microsoft.VSTS.Common.ClosedDate] = '') AND ([Target].[System.WorkItemType] <> '')"
一旦运行我得到一个异常的工具
[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\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\s\src\VstsSyncMigrator.Core\Execution\ComponentContext\TfsQueryContext.cs:line 99
at VstsSyncMigrator.Engine.WorkItemMigrationContext.InternalExecute() in d:\a\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 101
at VstsSyncMigrator.Engine.MigrationContextBase.Execute() in d:\a\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\MigrationContextBase.cs:line 35
有什么建议吗?
试试 wiql 编辑器插件 - https://marketplace.visualstudio.com/items?itemName=ottostreifel.wiql-editor
这使您可以使用 UI 构建查询并使用编辑器将它们转换为 wiql。您可以将它们复制并粘贴到您的配置文件中
发现问题,工具不支持从“WorkItemLinks”查询。
它仅支持“工作项类型查询的平面列表”
我正在尝试使用“azure-devops-migration-tool”来迁移工作项。我想要实现的是在一个查询中查询所有未设置关闭的项目以及所有与它们直接链接的项目。这可以在 Azure DevOps UI 中完成,但我无法在工具中使用相同的查询。
示例查询如下:
"QueryBit": "AND ( [Source].[System.WorkItemType] <> '' AND [Source].[System.State] <> '' AND [Source].[Microsoft.VSTS.Common.ClosedDate] = '') AND ([Target].[System.WorkItemType] <> '')"
一旦运行我得到一个异常的工具
[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\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\s\src\VstsSyncMigrator.Core\Execution\ComponentContext\TfsQueryContext.cs:line 99
at VstsSyncMigrator.Engine.WorkItemMigrationContext.InternalExecute() in d:\a\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 101
at VstsSyncMigrator.Engine.MigrationContextBase.Execute() in d:\a\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\MigrationContextBase.cs:line 35
有什么建议吗?
试试 wiql 编辑器插件 - https://marketplace.visualstudio.com/items?itemName=ottostreifel.wiql-editor
这使您可以使用 UI 构建查询并使用编辑器将它们转换为 wiql。您可以将它们复制并粘贴到您的配置文件中
发现问题,工具不支持从“WorkItemLinks”查询。 它仅支持“工作项类型查询的平面列表”