Confluence has been updated to ver 6.15.9. In case of any troubles, please contact infra team.

Questions

 
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! 

      CommentAdd your comment...