1
0
-1

We have Exalate in our Jira Cloud enviornment and I was wondering, when putting the Exalate function in a post transition workflow, can you specify two connections, say by Issue Type, or are you stuck with just one?


The use case is, I have a user that wants to have two connections to two different projects based on issue type, like Bug goes one and all others go to another

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi Josh,


      Thanks for raising this question. The easiest way to accomodate this would be actually using just one connection that maps into two different projects depending on the remote issue's issueType. 


      You can accomplish this with the following code:


      //Incoming sync:
      if(firstSync){
         if (replica.typeName == "Bug") {
            issue.projectKey   = "TEST"
         } else {
            issue.projectKey   = "TEST2"
         }
         // Set type name from source issue, if not found set a default
         issue.typeName     = nodeHelper.getIssueType(replica.typeName)?.name ?: "Task"
      }


      In this example, if the remote issue's type is "Bug" it creates the destination issue in the TEST project, and if the remote issue is of any other issue type, then Exalate creates the destination issue in the project TEST2.


      Let me know if this is sufficient for your case!


      Thanks,


      André

      1. Josh Ketchersid

        Hi Andre,


        Thanks for the response, to clear up before I give this a try, the one project that will sync to the other two is in the Cloud and the other two are in Jira Server. 


        Based on this, I would set this up in our Server environment to look for the Issue type, then use the one connection you suggested. Does that sound right?

      2. André Leroy-Beaulieu Castro

        Hi Josh,


        Yes exactly, this code would be in the server side Incoming Sync script!


        Best regards,


        André

      3. Josh Ketchersid

        Andre, 


        This worked, apologies on the delay letting you know but thank you for your help! 

      4. allen

        Hi Andre, 
        I have a situation that we like to use Jira's workflow or status to initiate sync up to a desired receiver project or company.  

        Use Case:
        3 platforms to sync up together/
        A. Jira Software/Cloud - B. Jira Software/Cloud - C. Jira Service Desk/Local

        Source Project - A
        Receiver Project - B and C

        Case one - Source project A uses workflow to assign a ticket to the receiver B while the receiver C can't see this ticket (compliance concerns). 

        Case two - Source project A uses workflow to assign a ticket to the receiver C while the receiver B can't see this ticket (compliance concerns). 

        Can any experts or use cases out there to shed a light on this particular use case?

        I kept asking Exalate customer service about it and they were telling me this is the place where my special use case will get some directions or even a practical solution. 

        I really appreciate to whom seeing this question and have some good tips and thank you in advance for leaving a mark here. THANK YOU~

      CommentAdd your comment...