需要在两个 Azure Devops 组织之间移动已关闭的工作项
Need to moved the closed work items between two AzureDevops Organization
通过使用 VstsSyncMigrator 工具,我已经成功地将工作项从一个 Azure Devops 组织迁移到另一个(基于敏捷的流程)。
在我的例子中,所有打开的工作项都被迁移而不是关闭的工作项。但我也需要迁移关闭的。
我该怎么做(迁移已关闭的工作项)?
下面是我的 Json 文件。如何迁移已关闭的工作项?
{
"Version": "8.9",
"TelemetryEnableTrace": false,
"workaroundForQuerySOAPBugEnabled": false,
"Source": {
"Collection": "",
"Project": "",
"ReflectedWorkItemIDFieldName": "",
"AllowCrossProjectLinking": false,
//"AllowCrossProjectLinking": true,
"PersonalAccessToken": ""
},
"Target": {
"Collection": "",
"Project": "",
"ReflectedWorkItemIDFieldName": "",
"AllowCrossProjectLinking": false,
//"AllowCrossProjectLinking": true,
"PersonalAccessToken": ""
},
"FieldMaps": [
{
//Not Required
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.MultiValueConditionalMapConfig",
"WorkItemTypeName": "*",
"sourceFieldsAndValues": {
"Field1": "Value1",
"Field2": "Value2"
},
"targetFieldsAndValues": {
"Field1": "Value1",
"Field2": "Value2"
}
},
{
//Not Required
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldBlankMapConfig",
"WorkItemTypeName": "*",
"targetField": "TfsMigrationTool.ReflectedWorkItemId"
//"targetField" :"AsSyssProjectDataLink"
},
{
//Not Required, here we can take the default value as it is.
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldValueMapConfig",
"WorkItemTypeName": "*",
"sourceField": "System.State",
"targetField": "System.State"
//"defaultValue": "New",
//"valueMapping": {
//"Approved" : "Approved",
//"New" : "New",
//"Commited" : "Commited",
//"In Progress" :"In Progress",
//"To Do" : "To Do",
//"Removed" : "Removed",
//"Open" : "Open",
//"Closed" : "Closed"
//"Design" : "Design",
//"Ready" : "Ready",
//"Active" : "Active",
//"Inactive" : "Inactive",
//"Done" : "Done",
//"Fixed" : "Fixed"
// }
},
//{
// In Bug workitem the filed value are mappping for Detailed to SystemInfo
//"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldtoFieldMapConfig",
//"WorkItemTypeName": "Bug",
//"sourceField": "Sirius.ReprostepsDetailed",
//"targetField": "Microsoft.VSTS.TCM.SystemInfo"
//},
{
// In Bug workitem the filed value are mappping for Detailed to SystemInfo
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldtoFieldMapConfig",
"WorkItemTypeName": "*",
"sourceField": "Microsoft.VSTS.Common.BacklogPriority",
"targetField": "Microsoft.VSTS.Common.StackRank"
},
{
//Not Required
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldtoFieldMultiMapConfig",
"WorkItemTypeName": "*",
"SourceToTargetMappings": {
"SourceField1": "TargetField1",
"SourceField2": "TargetField2"
}
},
{
//Not Required
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldtoTagMapConfig",
"WorkItemTypeName": "*",
"sourceField": "System.State",
"formatExpression": "ScrumState:{0}"
},
{
//Not Required
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldMergeMapConfig",
"WorkItemTypeName": "*",
"sourceField1": "System.Description",
"sourceField2": "Microsoft.VSTS.Common.AcceptanceCriteria",
"targetField": "System.Description",
"formatExpression": "{0} <br/><br/><h3>Acceptance Criteria</h3>{1}",
"doneMatch": "##DONE##"
},
{
//Not Required
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.RegexFieldMapConfig",
"WorkItemTypeName": "*",
"sourceField": "COMPANY.PRODUCT.Release",
"targetField": "COMPANY.DEVISION.MinorReleaseVersion",
"pattern": "PRODUCT \d{4}.(\d{1})",
"replacement": ""
},
{
//Not Required
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldValuetoTagMapConfig",
"WorkItemTypeName": "*",
"sourceField": "Microsoft.VSTS.CMMI.Blocked",
"pattern": "Yes",
"formatExpression": "{0}"
},
{
//Not Required
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.TreeToTagMapConfig",
"WorkItemTypeName": "*",
"toSkip": 3,
"timeTravel": 1
}
],
"WorkItemTypeDefinition": {
//"sourceWorkItemTypeName": "targetWorkItemTypeName"
//Since on source Requrement workitem is Prodcut Backlog on Target
//"Requirement" : "Product Backlog Item"
"Bug" : "Bug",
"Epic" : "Epic",
"Feature" : "Feature",
"Issue" : "Issue",
"Task" : "Task",
"Test Case" : "Test Case",
"Test Plan" :"Test Plan",
"Test Suite" : "Test Suite",
"User Story" : "User Story"
},
"GitRepoMapping": null,
"Processors": [
{
// As it is since Area and Iteraion value are coping here
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.NodeStructuresMigrationConfig",
"PrefixProjectToNodes": false,
"Enabled": false,
"BasePaths": [
//"Product\Area\Path1",
//"Product\Area\Path2"
]
},
{
//Workitmes are coping with Histoy, Attachment, Link
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.WorkItemMigrationConfig",
"ReplayRevisions": true,
"PrefixProjectToNodes": false,
"UpdateCreatedDate": true,
"UpdateCreatedBy": true,
"UpdateSourceReflectedId": false,
"BuildFieldTable": false,
"AppendMigrationToolSignatureFooter": false,
//"QueryBit": "AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] IN ('Epic', 'Feature', 'Bug', 'Task', 'Test Suite', 'Test Plan', 'Test Case', 'Impediment')",
"QueryBit": "AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] IN ('Bug', 'Epic', 'Feature', 'Issue', 'Task', 'Test Case', 'Test Plan', 'Test Suite', 'User Story', 'Shared Parameter', 'Shared Steps' )",
//"QueryBit": "AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] IN ('Impediment' )",
"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
}
]
}
迁移自:https://github.com/nkdAgility/azure-devops-migration-tools/issues/499
您应该能够从 WorkItemMigrationConfig 处理器的 QueryBit 对象中删除 [Microsoft.VSTS.Common.ClosedDate] = ''
条件。在您的具体情况下,我会将行更改为以下内容。
"QueryBit": "AND [System.WorkItemType] IN ('Bug', 'Epic', 'Feature', 'Issue', 'Task', 'Test Case', 'Test Plan', 'Test Suite', 'User Story', 'Shared Parameter', 'Shared Steps' )",
对于使用默认配置的人,他们会将其更改为以下内容。
"QueryBit": "AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan')",
通过使用 VstsSyncMigrator 工具,我已经成功地将工作项从一个 Azure Devops 组织迁移到另一个(基于敏捷的流程)。 在我的例子中,所有打开的工作项都被迁移而不是关闭的工作项。但我也需要迁移关闭的。 我该怎么做(迁移已关闭的工作项)?
下面是我的 Json 文件。如何迁移已关闭的工作项?
{
"Version": "8.9",
"TelemetryEnableTrace": false,
"workaroundForQuerySOAPBugEnabled": false,
"Source": {
"Collection": "",
"Project": "",
"ReflectedWorkItemIDFieldName": "",
"AllowCrossProjectLinking": false,
//"AllowCrossProjectLinking": true,
"PersonalAccessToken": ""
},
"Target": {
"Collection": "",
"Project": "",
"ReflectedWorkItemIDFieldName": "",
"AllowCrossProjectLinking": false,
//"AllowCrossProjectLinking": true,
"PersonalAccessToken": ""
},
"FieldMaps": [
{
//Not Required
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.MultiValueConditionalMapConfig",
"WorkItemTypeName": "*",
"sourceFieldsAndValues": {
"Field1": "Value1",
"Field2": "Value2"
},
"targetFieldsAndValues": {
"Field1": "Value1",
"Field2": "Value2"
}
},
{
//Not Required
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldBlankMapConfig",
"WorkItemTypeName": "*",
"targetField": "TfsMigrationTool.ReflectedWorkItemId"
//"targetField" :"AsSyssProjectDataLink"
},
{
//Not Required, here we can take the default value as it is.
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldValueMapConfig",
"WorkItemTypeName": "*",
"sourceField": "System.State",
"targetField": "System.State"
//"defaultValue": "New",
//"valueMapping": {
//"Approved" : "Approved",
//"New" : "New",
//"Commited" : "Commited",
//"In Progress" :"In Progress",
//"To Do" : "To Do",
//"Removed" : "Removed",
//"Open" : "Open",
//"Closed" : "Closed"
//"Design" : "Design",
//"Ready" : "Ready",
//"Active" : "Active",
//"Inactive" : "Inactive",
//"Done" : "Done",
//"Fixed" : "Fixed"
// }
},
//{
// In Bug workitem the filed value are mappping for Detailed to SystemInfo
//"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldtoFieldMapConfig",
//"WorkItemTypeName": "Bug",
//"sourceField": "Sirius.ReprostepsDetailed",
//"targetField": "Microsoft.VSTS.TCM.SystemInfo"
//},
{
// In Bug workitem the filed value are mappping for Detailed to SystemInfo
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldtoFieldMapConfig",
"WorkItemTypeName": "*",
"sourceField": "Microsoft.VSTS.Common.BacklogPriority",
"targetField": "Microsoft.VSTS.Common.StackRank"
},
{
//Not Required
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldtoFieldMultiMapConfig",
"WorkItemTypeName": "*",
"SourceToTargetMappings": {
"SourceField1": "TargetField1",
"SourceField2": "TargetField2"
}
},
{
//Not Required
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldtoTagMapConfig",
"WorkItemTypeName": "*",
"sourceField": "System.State",
"formatExpression": "ScrumState:{0}"
},
{
//Not Required
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldMergeMapConfig",
"WorkItemTypeName": "*",
"sourceField1": "System.Description",
"sourceField2": "Microsoft.VSTS.Common.AcceptanceCriteria",
"targetField": "System.Description",
"formatExpression": "{0} <br/><br/><h3>Acceptance Criteria</h3>{1}",
"doneMatch": "##DONE##"
},
{
//Not Required
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.RegexFieldMapConfig",
"WorkItemTypeName": "*",
"sourceField": "COMPANY.PRODUCT.Release",
"targetField": "COMPANY.DEVISION.MinorReleaseVersion",
"pattern": "PRODUCT \d{4}.(\d{1})",
"replacement": ""
},
{
//Not Required
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldValuetoTagMapConfig",
"WorkItemTypeName": "*",
"sourceField": "Microsoft.VSTS.CMMI.Blocked",
"pattern": "Yes",
"formatExpression": "{0}"
},
{
//Not Required
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.TreeToTagMapConfig",
"WorkItemTypeName": "*",
"toSkip": 3,
"timeTravel": 1
}
],
"WorkItemTypeDefinition": {
//"sourceWorkItemTypeName": "targetWorkItemTypeName"
//Since on source Requrement workitem is Prodcut Backlog on Target
//"Requirement" : "Product Backlog Item"
"Bug" : "Bug",
"Epic" : "Epic",
"Feature" : "Feature",
"Issue" : "Issue",
"Task" : "Task",
"Test Case" : "Test Case",
"Test Plan" :"Test Plan",
"Test Suite" : "Test Suite",
"User Story" : "User Story"
},
"GitRepoMapping": null,
"Processors": [
{
// As it is since Area and Iteraion value are coping here
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.NodeStructuresMigrationConfig",
"PrefixProjectToNodes": false,
"Enabled": false,
"BasePaths": [
//"Product\Area\Path1",
//"Product\Area\Path2"
]
},
{
//Workitmes are coping with Histoy, Attachment, Link
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.WorkItemMigrationConfig",
"ReplayRevisions": true,
"PrefixProjectToNodes": false,
"UpdateCreatedDate": true,
"UpdateCreatedBy": true,
"UpdateSourceReflectedId": false,
"BuildFieldTable": false,
"AppendMigrationToolSignatureFooter": false,
//"QueryBit": "AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] IN ('Epic', 'Feature', 'Bug', 'Task', 'Test Suite', 'Test Plan', 'Test Case', 'Impediment')",
"QueryBit": "AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] IN ('Bug', 'Epic', 'Feature', 'Issue', 'Task', 'Test Case', 'Test Plan', 'Test Suite', 'User Story', 'Shared Parameter', 'Shared Steps' )",
//"QueryBit": "AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] IN ('Impediment' )",
"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
}
]
}
迁移自:https://github.com/nkdAgility/azure-devops-migration-tools/issues/499
您应该能够从 WorkItemMigrationConfig 处理器的 QueryBit 对象中删除 [Microsoft.VSTS.Common.ClosedDate] = ''
条件。在您的具体情况下,我会将行更改为以下内容。
"QueryBit": "AND [System.WorkItemType] IN ('Bug', 'Epic', 'Feature', 'Issue', 'Task', 'Test Case', 'Test Plan', 'Test Suite', 'User Story', 'Shared Parameter', 'Shared Steps' )",
对于使用默认配置的人,他们会将其更改为以下内容。
"QueryBit": "AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan')",