Questions for Confluence license has expired.

Please purchase a new license to continue using Questions for Confluence.

Sync Zendesk-> Jira from Dropdown to Cascading style

 
1
0
-1

Want to Sync from Zendesk to Jira


Scenario 1: Atleast the selection from Zendesk should go to the Jira parent box


  1. Zendesk Fields - "User Roles ZD" which is a Multi-select dropdown

  2. Jira Fields - "User Roles Jira" which is a Select List (cascading) 


Scenario 2: Selection from ZD should reflect in Jira first Box

  1. Zendesk Fields - "questions" which is a Single-select dropdown

    2. Jira Field-  "question" which is a Select List (cascading)


    CommentAdd your comment...

    5 answers

    1.  
      2
      1
      0

      Try something like this:

      def testMap = [
          "yes" : "Yes",
          "no" : "No"
          ]
      issue.customFields."XYZ".value = nodeHelper.getOption(issue, "XYZ", testMap[replica.customFields."FIELD_NAME_FROM_ZD"?.value?.value])


      XYZ is the Jira field name!


      Thanks

      Majid


      1. Syed Majid Hassan

        I believe the nodeHelper requires the field name. Something worth remembering for future config!

        I am glad it worked though!

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

      Hi Syed Majid Hassan it worked now, the only thing I did is instead of numeric values of the field in Incoming and outgoing, I replace everything with actual text and it worked. 


      Outgoing- Zendesk

      replica.customFields."Is this blocking an active or impending study visit?" = issue.customFields."Is this blocking an active or impending study visit?" //Is this blocking an activity?


      Incoming -Jira

      //Is this blocking an activity?
      def blockMap = ["yes_bug_blocking_study":"Yes", "no_bug_not_blocking_study":"No"]
      issue.customFields."Is this blocking an active or impending study visit?".value = nodeHelper.getOption(issue, "Is this blocking an active or impending study visit?", blockMap[replica.customFields."Is this blocking an active or impending study visit?"?.value?.value])

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

        I use the same code, now the Error is gone, but the field is not populating in Jira

        1. Syed Majid Hassan

          Unfortunately, it is not possible to troubleshoot this here. Can you please check the remote replica to ensure that the expected data is arriving from the other side? If it is, can you please try to hard code a value in the Incoming script and try to go backwards from there to work out where the config is failing?

          Thanks

          Majid


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

        Hi Syed Majid Hassan 


        From my above mention Scenarios, 1st one works fine, but 2nd is not



        When I use the below code, I am getting Error.

        Outgoing from Zendesk :


        Incoming in Jira:

        def blockMap = ["yes_bug_blocking_study":"Yes", "no_bug_not_blocking_study":"No"]
        if (replica.customFields."13637516636557"?.value?.size()>0) //line 40
            issue.customFields."12388".value = nodeHelper.getOption(issue, "Is this blocking an active or impending study visit?", blockMap[replica.customFields."13637516636557"?.value[0]?.value])


        ERROR


        Remote replica I checked from Jira, its showing the value is coming.

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

          Hi,


          I have tested both your scenarios out by using the following code:


          ZD Outgoing:

          replica.customFields."Supported Browsers" = issue.customFields."Supported Browsers"

          Jira Incoming:

          def testMap = [
              "chrome" : "Chrome",
              "safari" : "Safari"
              ]
          if (replica.customFields."Supported Browsers"?.value?.size()>0)
              issue.customFields."Browser".value = nodeHelper.getOption(issue, "Browser", testMap[replica.customFields."Supported Browsers"?.value[0]?.value])

          Here is a video explanation of the issue. 



          Please let me know if you have any questions. 

          Please mark the answer as accepted if this works for you. 


          Thanks

          Majid

            CommentAdd your comment...