1
0
-1

Hi All


We have one was sync of Tasks from ADO to JIRA cloud


I need to set a Jira label to a constant literal string “ERP”

and the JIRA custom field “Portfolio” to the same value.


This string does not exist in the ADO, it will be hard-coded in the sync config. 


My outgoing sync in ADO has these:

replica.labels = nodeHelper.getLabel("ERP")

replica.customFields."Portfolio" = "ERP"

Also tried replica.labels = "ERP"


can anyone point me in the right direction

  1. Mark Anderson

    I got it working, but not sure what the custom field assignment does


    issue.labels += nodeHelper.getLabel("ERP")  – this worked


    issue.customFields."Portfolio".value =  replica.customFields."xyz"?.value ?:  "ERP"  -– i believe this says if the incoming custom field contains "xyz' use it, if not use "ERP"


    There is no incoming custom field, I just want equivalent of 


    issue.customFields."Portfolio".value =   "ERP" 

CommentAdd your comment...

1 answer

  1.  
    1
    0
    -1

    > issue.customFields."Portfolio".value =  replica.customFields."xyz"?.value ?:  "ERP"  -– i believe this says if the incoming custom field contains "xyz' use it, if not use "ERP"

    That is correct.


    > issue.customFields."Portfolio".value =   "ERP" 

    I assume it is not working?
    If not - can you check on the type of 'Portfolio'


    1. Mark Anderson

      Thanks for reply. Porfolio is a single value select field in JIRA

    2. Francis Martens (Exalate)

      Is ERP in the list (like without spaces) ...

    CommentAdd your comment...