Questions for Confluence license has expired.

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

How to set customer request type base on issye type

 
1
0
-1

Hi, is there a way to set in incoming sync customer request type in Jira DC based on issue type.

I've looked into 

https://docs.idalko.com/exalate/display/ED/How+to+synchronize+issue+type and added this for issue type mapping

def issueTypeMapping = [
// "remote issue type" : "loal issue type"
"Incident" : "Bug",
"IT Help" : "Improvement"
]


Now i need for issue type to have one request type but for improvement to have another. Is this is possible with incoming sync or it's recommended to use Automations with on create triggers?

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      You can set the customer request type in the incoming sync.

      There are a couple of examples and similar questions on this site.
      Such as - customer request type sync

      1. Vygandas

        Yes i've able to implement static value for customer request type with :
        issue.customFields."Customer Request Type".value = "Functional issue"

        however in my case Exalation connection beetween two jiras have multiple customer request type which do not match each other. 
        Is there a way i could make this change with such logic?:
        if(issuetype = x ){

        issue.customFields."Customer Request Type".value = "z"

        }else if (issuetype = a){

        issue.customFields."Customer Request Type".value = "y"

        }

      2. Vygandas

        I've implemented by using this logic :

        if (issue.typeName == "Bug")
        {     issue.customFields."Request Type".value =  "Report a bug"   }
          else if (issue.typeName == "Support")
        {     issue.customFields."Request Type".value =  "Support"   }
      CommentAdd your comment...