Skip to content

[Bug]: FieldToFieldMap with TargetToTarget does not work if Source workitem is missing the sourceField #2996

@JDAVF

Description

@JDAVF

Version

  • I confirm that I am using the latest version

Source Version

Azure DevOps Server 2022

Target Version

Azure DevOps Service

Relevant configuration

{
            "FieldMapType": "FieldToFieldMap",
            "fieldMapMode": "TargetToTarget",
            "sourceField": "Custom.ReflectedWorkitem",
            "targetField": "Microsoft.VSTS.Build.IntegrationBuild",
            "defaultValue": "",
            "ApplyTo": ["*"]
          }

Relevant log output

[10:45:29 DBG] [16.3.1] FieldSkipMap: target field does not exist 'Microsoft.VSTS.Build.FoundIn' for 'Epic' 
[10:45:29 DBG] [16.3.1] Running Field Map: FieldToFieldMap Custom.ReflectedWorkitem Microsoft.VSTS.Build.IntegrationBuild 
[10:45:29 DBG] [16.3.1] Running Field Map: FieldValueMap System.State System.State

What happened?

I tried to follow the documentation to copy the ReflectedWorkitem into the IntegrationBuild but it doesn't work.

Culprit seems to be this line (from what I can assume):
internal override void InternalExecute(WorkItem source, WorkItem target) { if (!source.Fields.Contains(Config.sourceField) || !target.Fields.Contains(Config.targetField)) { return; }

Debug in Visual Studio

  • Visual Studio Debug

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions