0

以下是源代码中的结构:Drug Library Editor

以下是 Target 中的结构:DaVinci\xx\yy\zz\Drug Library

以下是我的查询:

"WIQLQueryBit": "AND [System.WorkItemType] = 'Specification' AND [System.AreaPath] Under 'DaVinci\\xx\\yy\\zz\\Drug Library' ",

以下是我在执行处理器时遇到的错误,在目标系统上运行查询以查找工作项是否已迁移时失败:

[07:52:38 DBG] WorkItemQuery: Query: SELECT [System.Id], [System.Tags] FROM WorkItems WHERE [System.TeamProject] = 'DaVinci' AND [System.WorkItemType] = 'Specification' AND [System.AreaPath] Under 'DaVinci\Infusion\Neo\Connectivity\Drug Library'  ORDER BY [System.ChangedDate] desc
[07:52:38 DBG] WorkItemQuery: Paramiters: {"TeamProject": "DaVinci"}
[07:52:38 DBG] WorkItemQuery: TeamProject: DaVinci
[07:54:31 INF] Replay all revisions of 748 work items?
[07:54:31 INF] Found target project as Test_Connectivity
[07:54:31 INF] [FilterWorkItemsThatAlreadyExistInTarget] is enabled. Searching for work items that have already been migrated to the target...
[07:54:31 DBG] FilterExistingWorkItems: START |
[07:54:31 DBG] FilterByTarget: Query Execute...
[07:54:31 DBG] WorkItemQuery: ===========GetWorkItems=============
[07:54:31 DBG] WorkItemQuery: TeamProjectCollection: https://dev.azure.com/BD-MMS-Connectivity/
[07:54:31 DBG] WorkItemQuery: Query: SELECT [System.Id], [Custom.TFSID] FROM WorkItems WHERE [System.TeamProject] = 'Test_Connectivity' AND [System.WorkItemType] = 'Specification' AND [System.AreaPath] Under 'DaVinci\Infusion\Neo\Connectivity\Drug Library'  ORDER BY [System.ChangedDate] desc
[07:54:31 DBG] WorkItemQuery: Paramiters: {"TeamProject": "Test_Connectivity"}
[07:54:31 DBG] WorkItemQuery: TeamProject: Test_Connectivity
[07:54:31 ERR]  Error running query
Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF51011: The specified area path does not exist. The error is caused by «'DaVinci\Infusion\Neo\Connectivity\Drug Library'».
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 MigrationTools._EngineV1.Clients.TfsWorkItemQuery.GetWorkItemsFromQuery(TfsWorkItemMigrationClient wiClient) in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.ObjectModel\_EngineV1\Clients\TfsWorkItemQuery.cs:line 40
[07:54:31 FTL] Error while running WorkItemMigration
Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF51011: The specified area path does not exist. The error is caused by «'DaVinci\Infusion\Neo\Connectivity\Drug Library'».
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 MigrationTools._EngineV1.Clients.TfsWorkItemQuery.GetWorkItemsFromQuery(TfsWorkItemMigrationClient wiClient) in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.ObjectModel\_EngineV1\Clients\TfsWorkItemQuery.cs:line 72
at MigrationTools._EngineV1.Clients.TfsWorkItemQuery.GetWorkItems() in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.ObjectModel\_EngineV1\Clients\TfsWorkItemQuery.cs:line 28
at MigrationTools._EngineV1.Clients.TfsWorkItemMigrationClient.FilterExistingWorkItems(List`1 sourceWorkItems, TfsWiqlDefinition wiqlDefinition, TfsWorkItemMigrationClient sourceWorkItemMigrationClient) in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.ObjectModel\_EngineV1\Clients\TfsWorkItemMigrationClient.cs:line 51
at VstsSyncMigrator.Engine.WorkItemMigrationContext.InternalExecute() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 117
at MigrationTools._EngineV1.Processors.MigrationProcessorBase.Execute() in D:\a\1\s\src\MigrationTools\_EngineV1\Processors\MigrationProcessorBase.cs:line 47
[07:54:31 ERR] WorkItemMigration The Processor MigrationEngine entered the failed state...stopping run
[07:54:31 INF] Application is shutting down...
[07:54:31 DBG] Hosting stopping
[07:54:31 DBG] Exiting with return code: 0
``
Of course source Area Path does not exist in Target project. How to resolve this?
Is there a way for the query to use one Area Path when executing in source and another Area path in Target. 

4

1 回答 1

0

对 Source 和 Target 运行相同的查询。因此,如果目标中不存在 NodePath,则将 NodePath 添加到查询中将导致错误(因为项目名称在路径中,所以它不能)

请改用 NodePath 过滤器参数。

于 2022-02-01T22:05:02.557 回答