问题描述
我使用的是10.2版本,并且面临以下问题之一
问题是17个任务工作项中有15个即将到来,而2个任务未迁移,但是在那个位置创建的两个没有标题和状态的产品待办事项项都带有新状态
- 这是我的配置文件:
{ "Version": "10.2","TelemetryEnableTrace": false,"workaroundForQuerySOAPBugEnabled": false,"ChangeSetMappingFile": null,"Source": {
"Collection": "","Project": "Road To NPD 3.0","ReflectedWorkItemIDFieldName": "PATtinitiativesRefID","AllowCrossprojectLinking": false,"PersonalAccesstoken": "","LanguageMaps": {
"AreaPath": "Road To NPD 3.0","IterationPath": "Road To NPD 3.0"
} },"Target": {
"Collection": "","Project": "AS-Scrum-RoadToNPD3.0","ReflectedWorkItemIDFieldName": "AutoSolScrumRefID","LanguageMaps": {
"AreaPath": "AS-Scrum-RoadToNPD3.0","IterationPath": "AS-Scrum-RoadToNPD3.0" } },"FieldMaps": [
{
"ObjectType": "MultiValueConditionalMapConfig","WorkItemTypeName": "*","sourceFieldsAndValues": {
"Field1": "Value1","Field2": "Value2"
},"targetFieldsAndValues": {
"Field1": "Value1","Field2": "Value2"
}
},{
"ObjectType": "FieldBlankMapConfig","targetField": "TfsMigrationTool.ReflectedWorkItemId"
},{
"ObjectType": "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"
//}
},{
"ObjectType": "FieldtoFieldMapConfig","sourceField": "Microsoft.VSTS.Common.BacklogPriority","targetField": "Microsoft.VSTS.Common.StackRank","defaultValue": null
},{
"ObjectType": "FieldtoFieldMultiMapConfig","SourcetoTargetMappings": {
"SourceField1": "TargetField1","SourceField2": "TargetField2"
}
},{
"ObjectType": "FieldtoTagMapConfig","formatExpression": "ScrumState:{0}"
},{
"ObjectType": "FieldMergeMapConfig","sourceField1": "System.Description","sourceField2": "Microsoft.VSTS.Common.AcceptanceCriteria","targetField": "System.Description","formatExpression": "{0} <br/><br/><h3>Acceptance Criteria</h3>{1}","doneMatch": "##DONE##"
},{
"ObjectType": "RegexFieldMapConfig","sourceField": "COMPANY.PRODUCT.Release","targetField": "COMPANY.DEVISION.MinorReleaseVersion","pattern": "PRODUCT \\d{4}.(\\d{1})","replacement": "$1"
},{
"ObjectType": "FieldValuetoTagMapConfig","sourceField": "Microsoft.VSTS.CMMI.Blocked","pattern": "Yes","formatExpression": "{0}"
},{
"ObjectType": "TreetoTagMapConfig","toSkip": 3,"timeTravel": 1
} ],"WorkItemTypeDeFinition": {
"Product Backlog Item": "Product Backlog Item","Epic": "Epic","Task": "Task" },"GitRepoMapping": null,"Processors": [
{
"ObjectType": "NodeStructuresMigrationConfig","PrefixProjectToNodes": false,"Enabled": false,"BasePaths": [
"Product\\Area\\Path1","Product\\Area\\Path2"
]
},{
"ObjectType": "WorkItemmigrationConfig","ReplayRevisions": true,"UpdateCreatedDate": true,"UpdateCreatedBy": true,"BuildFieldTable": false,"AppendMigrationToolSignatureFooter": false,"QueryBit": "AND [Microsoft.VSTS.Common.ClosedDate] != '' AND [System.WorkItemType] IN ('Task')","OrderBit": "[System.ChangedDate] desc","Enabled": true,"LinkMigration": true,"AttachmentMigration": true,"AttachmentWorkingPath": "c:\\temp\\WorkItemAttachmentWorkingFolder\\","FixHtmlAttachmentLinks": false,"SkipToFinalRevisedWorkItemType": false,"WorkItemCreateRetryLimit": 5,"FilterWorkItemsThatAlreadyExistInTarget": true,"PauseAfterEachWorkItem": false,"AttachmentMazSize": 480000000,"CollapseRevisions": false,"LinkMigrationSaveEachAsAdded": false
} ] }
解决方法
此问题是由于某些代码故障导致更改工作项类型所致,而这是旧对象模型中无法实现的。有些人对此有疑问,因此可以添加SkipToFinalRevisedWorkItemType
来查看最新修订的类型并使用它,而不是试图在两者之间弄乱。
{
"ObjectType": "WorkItemMigrationConfig","ReplayRevisions": true,"PrefixProjectToNodes": false,"UpdateCreatedDate": true,"UpdateCreatedBy": true,"BuildFieldTable": false,"AppendMigrationToolSignatureFooter": false,"QueryBit": "AND [Microsoft.VSTS.Common.ClosedDate] != '' AND [System.WorkItemType] IN ('Task')","OrderBit": "[System.ChangedDate] desc","Enabled": true,"LinkMigration": true,"AttachmentMigration": true,"AttachmentWorkingPath": "c:\\temp\\WorkItemAttachmentWorkingFolder\\","FixHtmlAttachmentLinks": false,"SkipToFinalRevisedWorkItemType": true,"WorkItemCreateRetryLimit": 5,"FilterWorkItemsThatAlreadyExistInTarget": true,"PauseAfterEachWorkItem": false,"AttachmentMazSize": 480000000,"CollapseRevisions": false,"LinkMigrationSaveEachAsAdded": false
} ] }
在这里,我将"SkipToFinalRevisedWorkItemType"
更改为true
,而不是false
。