How do i map fields based on a condition when using the Azure DevOps Migration Tools?

287 Views Asked by At

I have a custom field on my Azure DevOps user stories that maps directly to the same custom field on the target project. However i want to be able to fill it with data from another field in case the custom field is empty on the source, like this:

  • if Field A on Source is "ABC" then Field A on Target would be "ABC".
  • if Field A on Source is "" then Field A on Target would get its value from Field B.

How do i achieve this? I tried using the MultiValueConditionalMapConfig but i can't find any examples online so i have no idea how it works and trial and error was fruitless. The documentation doesn't explain how this specific mapping works so asking here was my only option.

1

There are 1 best solutions below

1
Dou Xu-MSFT On

Here is MultiValueConditionalMapConfig sample:

  "FieldMaps": [
    {
      "$type": "MultiValueConditionalMapConfig",
      "WorkItemTypeName": "*",
      "sourceFieldsAndValues": {
        "Field1": "Value1",
        "Field2": "Value2"
      },
      "targetFieldsAndValues": {
        "Field1": "Value1",
        "Field2": "Value2"
      }
    }
   ]

if Field A on Source is "" then Field A on Target would get its value from Field B

However, I’m afraid that there is no supported condition expression in serval FieldMap from the configuration.json sample file.Please refer to doc:Getting started with VSTS sync Migrator

About FieldMaps refer to :Azure DevOps Migration Tools

You can discuss in this website:migration discussions for more detailed information.