我使用FieldValueMapConfig来映射源和目标区域/迭代路径,但是,源路径是在目标项目的根目录下创建的。
如何设置配置以便将路径迁移到新的目标层次结构?
例如:
来源项目\区域1>TargetProj\NewParentNode\Area1
SourceProj\SSprint1>TargetProj\NewParentNode\SSprint1
我遇到了类似的问题,regex映射似乎对我有效,请尝试以下操作:
{
"$type": "RegexFieldMapConfig",
"WorkItemTypeName": "*",
"sourceField": "System.AreaPath",
"targetField": "System.AreaPath",
"pattern": "SourceProj\\(.*)",
"replacement": "TargetProj\NewParentNode\$1",
"valueMapping": { "SourceProj" : "TargetProj\NewParentNode\$1" }
},
{
"$type": "RegexFieldMapConfig",
"WorkItemTypeName": "*",
"sourceField": "System.IterationPath",
"targetField": "System.IterationPath",
"pattern": "SourceProj\\(.*)",
"replacement": "TargetProj\NewParentNode\$1",
"valueMapping": { "SourceProj" : "TargetProj\NewParentNode\$1" }
},
{
"$type": "RegexFieldMapConfig",
"WorkItemTypeName": "*",
"sourceField": "System.NodeName",
"targetField": "System.NodeName",
"pattern": "SourceProj\\(.*)",
"replacement": "TargetProj\NewParentNode\$1",
"valueMapping": { "SourceProj" : "TargetProj\NewParentNode\$1" }
}