错误无法找到工作项类型产品待办事项列表项

问题描述

已修复:原来我必须将项目更改为包含 ReflectedWorkItemId 的 InheritedProcess 才能使其工作。我的迁移刚刚运行。感谢您的帮助!

关闭它!

我正在尝试使用此迁移工具来测试迁移。我有一个源项目和目标项目。在 ADO 上和在同一组织中。我在 SCRUM 流程的继承流程下为我的组织创建了字段“ReflectedWorkItemId”,如下所示:

Org settings with ReflectedWorkItemId

我得到的错误是:

[12:08:55 INF] !! After removing all found work items there are 134 remaining to be migrated.
[12:08:55 WRN] ValidatingrequiredField: Task does not contain ReflectedWorkItemId
[12:08:55 FTL] Error while running WorkItemmigration
Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemTypeDeniedOrNotExistException: TF201077: The work item type Product Backlog Item cannot be found. It may have been renamed or destroyed.
   at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemTypeCollection.get_Item(String typeName)
   at MigrationTools.ProcessorEnrichers.TfsValidaterequiredField.ValidatingrequiredField(String fieldToFind,List`1 sourceWorkItems) in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.ObjectModel\ProcessorEnrichers\TfsValidaterequiredField.cs:line 44
   at VstsSyncMigrator.Engine.WorkItemmigrationContext.InternalExecute() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemmigrationContext.cs:line 122
   at MigrationTools._EngineV1.Processors.MigrationProcessorBase.Execute() in D:\a\1\s\src\MigrationTools\_EngineV1\Processors\MigrationProcessorBase.cs:line 47
[12:08:55 ERR] WorkItemmigration The Processor MigrationEngine entered the Failed state...stopping run
[12:08:55 INF] Application is shutting down...
[12:08:55 INF] Terminating: Application forcebly closed.
[12:08:55 INF] Application Ending
[12:08:55 INF] The application ran in 00:00:34.4484023 and finished at 02/19/2021 12:08:55

我的 JSON 如下所示:

{
  "ChangeSetMappingFile": null,"Source": {
    "$type": "TfsTeamProjectConfig","Collection": "https://dev.azure.com/REDACTED/","Project": "SingularPOC","ReflectedWorkItemIDFieldName": "ReflectedWorkItemId","AllowCrossprojectLinking": false,"AuthenticationMode": "Prompt","PersonalAccesstoken": "","LanguageMaps": {
      "AreaPath": "Area","IterationPath": "Iteration"
    }
  },"Target": {
    "$type": "TfsTeamProjectConfig","Project": "TargetPOC","FieldMaps": [
    {
      "$type": "MultiValueConditionalMapConfig","WorkItemTypeName": "*","sourceFieldsAndValues": {
        "Field1": "Value1","Field2": "Value2"
      },"targetFieldsAndValues": {
        "Field1": "Value1","Field2": "Value2"
      }
    },{
      "$type": "FieldBlankMapConfig","targetField": "TfsMigrationTool.ReflectedWorkItemId"
    },{
      "$type": "FieldValueMapConfig","sourceField": "System.State","targetField": "System.State","defaultValue": "New","valueMapping": {
        "Approved": "New","New": "New","Committed": "Active","In Progress": "Active","To Do": "New","Done": "Closed","Removed": "Removed"
      }
    },{
      "$type": "FieldtoFieldMapConfig","sourceField": "Microsoft.VSTS.Common.BacklogPriority","targetField": "Microsoft.VSTS.Common.StackRank","defaultValue": null
    },{
      "$type": "FieldtoFieldMultiMapConfig","SourcetoTargetMappings": {
        "SourceField1": "TargetField1","SourceField2": "TargetField2"
      }
    },{
      "$type": "FieldtoTagMapConfig","formatExpression": "ScrumState:{0}"
    },{
      "$type": "FieldMergeMapConfig","sourceField1": "System.Description","sourceField2": "Microsoft.VSTS.Common.AcceptanceCriteria","targetField": "System.Description","formatExpression": "{0} <br/><br/><h3>Acceptance Criteria</h3>{1}","doneMatch": "##DONE##"
    },{
      "$type": "RegexFieldMapConfig","sourceField": "COMPANY.PRODUCT.Release","targetField": "COMPANY.DEVISION.MinorReleaseVersion","pattern": "PRODUCT \\d{4}.(\\d{1})","replacement": "$1"
    },{
      "$type": "FieldValuetoTagMapConfig","sourceField": "Microsoft.VSTS.CMMI.Blocked","pattern": "Yes","formatExpression": "{0}"
    },{
      "$type": "TreetoTagMapConfig","toSkip": 3,"timeTravel": 1
    }
  ],"GitRepoMapping": null,"LogLevel": "@R_924_4045@ion","Processors": [
    {
      "$type": "WorkItemmigrationConfig","Enabled": true,"ReplayRevisions": true,"PrefixProjectToNodes": false,"UpdateCreatedDate": true,"UpdateCreatedBy": true,"BuildFieldTable": false,"AppendMigrationToolSignatureFooter": false,"wiqlQueryBit": "AND  [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] NOT IN ('Test Suite','Test Plan')","wiqlOrderBit": "[System.ChangedDate] desc","LinkMigration": true,"AttachmentMigration": true,"AttachmentWorkingPath": "c:\\temp\\WorkItemAttachmentWorkingFolder\\","FixHtmlAttachmentLinks": false,"SkipToFinalRevisedWorkItemType": true,"WorkItemCreateRetryLimit": 5,"FilterWorkItemsThatAlreadyExistInTarget": true,"PauseAfterEachWorkItem": false,"AttachmentMaxSize": 480000000,"CollapseRevisions": false,"LinkMigrationSaveEachAsAdded": false,"GenerateMigrationComment": true,"NodeBasePaths": [
        "Product\\Area\\Path1","Product\\Area\\Path2"
      ],"WorkItemIDs": null
    }
  ],"Version": "11.9","workaroundForQuerySOAPBugEnabled": false,"WorkItemTypeDeFinition": {
    "sourceWorkItemTypeName": "targetWorkItemTypeName"
  },"Endpoints": {
    "InMemoryWorkItemEndpoints": [
      {
        "Name": "Source","EndpointEnrichers": null
      },{
        "Name": "Target","EndpointEnrichers": null
      }
    ]
  }
}

有人能指出我正确的方向吗?我已经验证“任务”确实包含 ReflectedWorkItemId

解决方法

检查您的项目流程类型以确保它继承了 Scrum,否则产品待办列表项将无法作为项类型使用。

检查您的项目流程以确保目标项目中存在 ReflectedItemId 字段。