1
0
-1

I am trying to ensure that our sync between Zendesk and JIRA will support changing issue types and request types if the source issue from Zendesk changes it's ticket type. 


JIRA is very finicky when working with Request Types. Since the issue must have the correct issue type before it accepts a change to the Request Type custom field, I've been trying a combination of things such as this: 

if(replica.typeName == "problem") {
   issue.type                              = nodeHelper.getIssueType("Problem")
   while(issue.type != nodeHelper.getIssueType("Problem")){
      sleep(1)      
   }
   issue.customFields."Request Type".value = "Operations problem"         

} else {         
   issue.type                              = nodeHelper.getIssueType("Request")
   while(issue.type != nodeHelper.getIssueType("Request") ){
      sleep(1)       
   }
   issue.customFields."Request Type".value = "Operations request" 
}

However, I have not been able to get this to work after the issue has been created. Any ideas?

    CommentAdd your comment...

    3 answers

    1.  
      1
      0
      -1

      Thanks for your answer Majid. 

      It's starting to look like the API to use here may be different thanks to Service Desk having it's own endpoint and syntax. One piece that I've discovered is this: 

      https://confluence.atlassian.com/jirakb/how-to-set-the-request-type-when-creating-an-issue-using-jira-core-rest-api-in-cloud-974366000.html


      The syntax in this refers to using a "KEY/request-type-key" format, and that appears to not have a REST endpoint to query the actual names. 

      Your workaround will probably get the job done for now, but I'd prefer to see this integrated into Exalate using the different REST endpoint, if that's not how it's being done under the hood.

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

        Hi Seth E,


        I believe the issue you are facing is due to a limitation in the Jira API which does not allow you to change the Request Type via API once the issue has been created. I have provided a detailed explanation of this here:
        Help to Sync Jira Service Desk "request type" from Cloud Jira Service Management to Onpremise


        I believe the answer to this would be to have a custom field in Jira to represent the Request Type. Now, you can change that within the Incoming Sync Script to the desired value based on what Zendesk is sending over. To complete the loop, you can add an automation rule within Jira which would set the Request Type field based on the value of that custom field. I have added a short video demonstrating this approach at a rudimentary level:



        The video is Jira to Jira, but the exact same approach should be applicable to Zendesk to Jira as well. 


        Thanks 

        Majid

          CommentAdd your comment...