错误找不到工作项类型产品待办列表项

Error The work item type Product Backlog Item cannot be found

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

请关闭!

我正在尝试使用此迁移工具来测试迁移。我有一个源项目和目标项目。既在 ADO 上又在同一个组织中。我在 SCRUM 流程的继承流程下为我的组织创建了字段“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\s\src\MigrationTools.Clients.AzureDevops.ObjectModel\ProcessorEnrichers\TfsValidateRequiredField.cs:line 44
   at VstsSyncMigrator.Engine.WorkItemMigrationContext.InternalExecute() in D:\a\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 122
   at MigrationTools._EngineV1.Processors.MigrationProcessorBase.Execute() in D:\a\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",
    "Collection": "https://dev.azure.com/REDACTED/",
    "Project": "TargetPOC",
    "ReflectedWorkItemIDFieldName": "ReflectedWorkItemId",
    "AllowCrossProjectLinking": false,
    "AuthenticationMode": "Prompt",
    "PersonalAccessToken": "",
    "LanguageMaps": {
      "AreaPath": "Area",
      "IterationPath": "Iteration"
    }
  },
  "FieldMaps": [
    {
      "$type": "MultiValueConditionalMapConfig",
      "WorkItemTypeName": "*",
      "sourceFieldsAndValues": {
        "Field1": "Value1",
        "Field2": "Value2"
      },
      "targetFieldsAndValues": {
        "Field1": "Value1",
        "Field2": "Value2"
      }
    },
    {
      "$type": "FieldBlankMapConfig",
      "WorkItemTypeName": "*",
      "targetField": "TfsMigrationTool.ReflectedWorkItemId"
    },
    {
      "$type": "FieldValueMapConfig",
      "WorkItemTypeName": "*",
      "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",
      "WorkItemTypeName": "*",
      "sourceField": "Microsoft.VSTS.Common.BacklogPriority",
      "targetField": "Microsoft.VSTS.Common.StackRank",
      "defaultValue": null
    },
    {
      "$type": "FieldtoFieldMultiMapConfig",
      "WorkItemTypeName": "*",
      "SourceToTargetMappings": {
        "SourceField1": "TargetField1",
        "SourceField2": "TargetField2"
      }
    },
    {
      "$type": "FieldtoTagMapConfig",
      "WorkItemTypeName": "*",
      "sourceField": "System.State",
      "formatExpression": "ScrumState:{0}"
    },
    {
      "$type": "FieldMergeMapConfig",
      "WorkItemTypeName": "*",
      "sourceField1": "System.Description",
      "sourceField2": "Microsoft.VSTS.Common.AcceptanceCriteria",
      "targetField": "System.Description",
      "formatExpression": "{0} <br/><br/><h3>Acceptance Criteria</h3>{1}",
      "doneMatch": "##DONE##"
    },
    {
      "$type": "RegexFieldMapConfig",
      "WorkItemTypeName": "*",
      "sourceField": "COMPANY.PRODUCT.Release",
      "targetField": "COMPANY.DEVISION.MinorReleaseVersion",
      "pattern": "PRODUCT \d{4}.(\d{1})",
      "replacement": ""
    },
    {
      "$type": "FieldValuetoTagMapConfig",
      "WorkItemTypeName": "*",
      "sourceField": "Microsoft.VSTS.CMMI.Blocked",
      "pattern": "Yes",
      "formatExpression": "{0}"
    },
    {
      "$type": "TreeToTagMapConfig",
      "WorkItemTypeName": "*",
      "toSkip": 3,
      "timeTravel": 1
    }
  ],
  "GitRepoMapping": null,
  "LogLevel": "Information",
  "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,否则 Product Backlog Item 将无法作为项目类型使用。

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