1
0
-1

Hi all,


I am trying to sync a value from Radio button in Jira cloud to ADO


By running this script on Jira cloud outgoing

replica.customFields."10228" = issue.customFields."10228"

I get the following code in the local payload on Jira cloud side

      "10228": {
        "id": 10228,
        "name": "Issue type",
        "uid": "10228",
        "type": "OPTION",
        "value": {
          "id": "11135",
          "value": "Issue in production"
        }
      }

so it seems that the data is there. 


What I am now struggling with, is how to get the option value data "Issue in production" into a custom field on the Azure devOps side.


I have tried:

workItem."Custom.Type" = replica.customFields."10228"

When I try this I get no error but no data

and with the one below I get an error

def typeOption = nodeHelper.getOption(workItem, 10228L, replica.customFields."10228")
workItem."Custom.Type" = typeOption

I have searched through the documentation but have not been able to find anything about radio button custom fields on the ADO side.


Any help would be highly appreciated (smile)

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Hi Tomás,


      The first option you suggest gives this error on destination sided: Cannot get property 'value' on null object


      And the second option with the nodeHelper gives this: NodeHelper.getOption is not supported in Exalate for Azure. Please remove its usages from your scripts.


      So it seems that using the nodeHelper in ADO is not possible. Does anyone know of an alternative solution to this?


      Best, Jónheiður

        CommentAdd your comment...
      1.  
        1
        0
        -1

        Hi Jonheiour,

        I think the problem here is that `workItem."Custom.Type"` should be set with the option value as a String.

        Can you try with this code:

        workItem."Custom.Type" = replica.customFields."10228".value
        
        

        Maybe an alternative to your approach can be like this:

        def typeOption = nodeHelper.getOption(workItem, 10228L, replica.customFields."10228")
        workItem.customFields."Type".value = typeOption
          CommentAdd your comment...