4

我正在使用FieldValueMapConfig来映射源和目标区域/迭代路径,但是,源路径是在目标项目的根目录中创建的。

如何设置配置以便将路径迁移到新的目标层次结构?

例如:

SourceProj\Area1 > TargetProj\ NewParentNode \Area1

SourceProj\Sprint1 > TargetProj\ NewParentNode \Sprint1

4

1 回答 1

0

我有一个类似的问题,正则表达式映射似乎对我有用,试试这样的:

{
  "$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" }
}
于 2021-11-29T09:25:53.547 回答