首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >TF51005:查询引用一个不存在的字段。错误是由[Custom.ReflectedWorkItemId]引起的。

TF51005:查询引用一个不存在的字段。错误是由[Custom.ReflectedWorkItemId]引起的。
EN

Stack Overflow用户
提问于 2022-02-23 00:26:19
回答 1查看 323关注 0票数 1

我尝试将Azure DevOps板从一个组织迁移到另一个组织。我使用这个工具:https://github.com/nkdAgility/azure-devops-migration-tools

我遵循文档中的说明,但会出现错误:

代码语言:javascript
运行
复制
[16:43:59 INF] Processor: WorkItemMigration 
[16:43:59 INF] Migration Context Start: WorkItemMigration [16:43:59 INF] WorkItemMigrationContext::InternalExecute ... 
[16:44:00 INF] MigrationClient: Access granted to https://dev.azure.com/yyy/ for xxx (xxx@xxx.com) ... 
[16:44:03 INF] MigrationClient: Access granted to https://dev.azure.com/zzz/ for xxx (xxx@xxx.com) 
[16:44:04 INF] Migrating all Nodes before the Processor run. 
[16:44:05 WRN] The node \xxx\Iteration\Sprint 1 is being excluded due to your basePath setting. 
[16:44:06 INF] Querying items to be migrated: SELECT [System.Id], [System.Tags] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan') ORDER BY [System.ChangedDate] desc ... 
[16:44:13 INF] Replay all revisions of 20 work items? 
[16:44:13 INF] Found target project as test-han [16:44:13 INF] [FilterWorkItemsThatAlreadyExistInTarget] is enabled. Searching for work items that have already been migrated to the target... 
[16:44:13 ERR] Error running query Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF51005: The query references a field that does not exist. The error is caused by «[Custom.ReflectedWorkItemId]». 
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 

[16:44:13 FTL] Error while running WorkItemMigration Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF51005: The query references a field that does not exist. The error is caused by «[Custom.ReflectedWorkItemId]». 
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 70 at MigrationTools._EngineV1.Clients.TfsWorkItemQuery.GetWorkItems() 
in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.ObjectModel\_EngineV1\Clients\TfsWorkItemQuery.cs:line 30 
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 54 
at VstsSyncMigrator.Engine.WorkItemMigrationContext.InternalExecute() 
in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 120 
at MigrationTools._EngineV1.Processors.MigrationProcessorBase.Execute() 
in D:\a\1\s\src\MigrationTools\_EngineV1\Processors\MigrationProcessorBase.cs:line 47 [16:44:13 ERR] WorkItemMigration The Processor MigrationEngine entered the failed state...stopping run
[16:44:13 INF] Application is shutting down...

下面是我的配置文件

代码语言:javascript
运行
复制
{
"ChangeSetMappingFile": null,
"Source": {
"$type": "TfsTeamProjectConfig",
"Collection": "https://dev.azure.com/yyy/",
"Project": "y01",
"ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
"AllowCrossProjectLinking": false,
"AuthenticationMode": "AccessToken",
"PersonalAccessToken": "MY_TOKEN",
"LanguageMaps": {
"AreaPath": "Area",
"IterationPath": "Iteration"
}
},
"Target": {
"$type": "TfsTeamProjectConfig",
"Collection": "https://dev.azure.com/zzz/",
"Project": "z01",
"ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
"AllowCrossProjectLinking": false,
"AuthenticationMode": "AccessToken",
"PersonalAccessToken": "MY_TOKEN2",
"LanguageMaps": {
"AreaPath": "Area",
"IterationPath": "Iteration"
}
},
"GitRepoMapping": null,
"LogLevel": "Information",
"Processors": [
{
"$type": "WorkItemMigrationConfig",
"Enabled": true,
"ReplayRevisions": false,
"PrefixProjectToNodes": false,
"UpdateCreatedDate": true,
"UpdateCreatedBy": true,
"WIQLQueryBit": "AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan')",
"WIQLOrderBit": "[System.ChangedDate] desc",
"LinkMigration": false,
"AttachmentMigration": false,
"AttachmentWorkingPath": "c:\temp\WorkItemAttachmentWorkingFolder\",
"FixHtmlAttachmentLinks": false,
"SkipToFinalRevisedWorkItemType": true,
"WorkItemCreateRetryLimit": 5,
"FilterWorkItemsThatAlreadyExistInTarget": true,
"PauseAfterEachWorkItem": false,
"AttachmentMaxSize": 480000000,
"AttachRevisionHistory": false,
"LinkMigrationSaveEachAsAdded": false,
"GenerateMigrationComment": false,
"NodeStructureEnricherEnabled": null,
"NodeBasePaths": [
"/"
],
"WorkItemIDs": null,
"MaxRevisions": 0
}
],
"Version": "11.11",
"workaroundForQuerySOAPBugEnabled": false,
"WorkItemTypeDefinition": {
"sourceWorkItemTypeName": "targetWorkItemTypeName"
},
"Endpoints": {
"InMemoryWorkItemEndpoints": [
{
"Name": "Source",
"EndpointEnrichers": null
},
{
"Name": "Target",
"EndpointEnrichers": null
}
]
}
}

我遵循其他文章中的一些解决方案,为工作项类型“Product”设置了一个名为“ReflectedItemId”的自定义列(只有这种类型)。并将此自定义过程(继承形式Scrum)应用于源项目和目标项目。而且仍然无法修复它。

然后,我尝试在源项目上使用Wiql游乐场扩展来运行上面显示的查询(错误日志)。它说"@TeamProject“不是一个有效的名称,这意味着来自源项目的查询不起作用,更不用说接下来的任务了。我明白了吗?

请给我一些建议。

EN

回答 1

Stack Overflow用户

发布于 2022-06-09 11:41:51

该字段用于发布迁移的WorkItems。你需要在你的命运计划中创造它。为此,请执行以下步骤:1.创建继承的进程

2.-对于每个工作项,您必须创建一个字段(首先)或使用一个名为"ReflectedWorkItemId“的现有字段(下一个字段)

3.-重新开始移徙

如果您遵循了以下步骤,则应该在配置文件中输入"Custom.ReflectedWorkItemId“值。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71229978

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档