1
0
-1

Hello I am trying to sync custom fields and I would like a little help.

The case is I want when in Jira1 custom field is ‘yes’ on Jira 2 2 other fields to be “Yes” too. Can you please send me the outgoing and incoming script for this. Thank you

    CommentAdd your comment...

    4 answers

    1.  
      1
      0
      -1

      Hello Mario,


      You need to place the following script in your connection:


      Outgoing Sync Jira Cloud 1

      replica.customFields."Bug" = issue.customFields."Bug"


      Incoming Sync Of Jira Cloud 2

      if(replica.customFields."Bug".value?.value == ["Yes"]){ 
      	issue.customFields."Bug Fix Approved (Team Leaders)".value = ["Yes"] 
      	issue.customFields."Bug fix reason"?.value = "NAVMOBILE"
      }else{
      	issue.customFields."Bug Fix Approved (Team Leaders)".value = [] 
      	issue.customFields."Bug fix reason".value = null
      }



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

        The problem is that this check box may be checked after the task is created so it errors for a null object


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

          Hello

          I am sending a picture of the exact field. It is the same on both sides

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

            Hi
            It depends on what type of fields you use for the option "yes". Is it a text field, list, or any other type.
            Do you use Cloud or DC?

            I would by with looking at this documentation:
            https://docs.exalate.com/docs/how-to-synchronize-custom-fields-in-jira-cloud

            This is for on-prem:
            https://docs.exalate.com/docs/how-to-synchronize-custom-fields-in-jira-on-premise

            Regards
            Daniel Miks
            Eficode

              CommentAdd your comment...