2
1
0

Use case is two Connections used for different reasons.


Connection A is for Issues in the support desk project (ITSM) in JIRA Cloud syncing Issues that have been classified as Known Problems to Bug Issues in the Development JIRA Server project (JSMO).


Connection B is Issues in the support desk project (ITSM in JIRA Cloud syncing Issues where time has been booked to a specific database (JSDT) on the Development JIRA server


Connection A runs first and Exalate is used to link the (ITSM) Known Problem to the (JSDMO) Bug. 

Then the user books the time they spent in ITSM and Connection B gets triggered.

Connection B checks to see if it's a new issue (no) and then the worklogs get synced to the issue in JSMO - rather than creating an Issue with associated worklogs in JSDT as intended.


Q1 - Is it supported to have one Issue sync to different remote Issues depending on which Connection is used ?

Q2 - If it is then what is a better way to write the initial check to see if we should create a new issue in the code fragment below:



Would it be valid to add issue.projectKey = "JSDT" at line 13. Would that make it generate a new Issue in JSDT when I synced the worklogs ? I presume that's where the Issue creation takes place..



Thanks for any advice ...


Andy

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hello Andrew Hines


      (sorry for the delay, and thank you for the question)

      If I understand correctly

      Worklog information from ITSM should go to the JSDT project, unless it is a known issue, which would then sync to the JSDMO project?



      The approach I would take is to have 1 connection which creates an issue in either the JSDMO or the JSDT project depending on the fact that the original issue is a known issue.


      Assume that there is a specific issue type 'Known Issue' on the ITSM side


      The incoming sync on the target would then have something like



      if (firstSync) {
         // select the right project depending on the issue type of the source issue
         issue.projectKey = replica.type?.name == "Known Issue" ? "JSDMO" : "JSDT"
         ...
      }
      
      ...


      To answer your original questions


      • You can have multiple connections from the same issue (we call this the fan-out feature)
        Typical use case is when a single product issue is linked with multiple support tickets
      • "add issue.projectKey = "JSDT" at line 13"
        The projectKey is only interpreted when creating an issue
        CommentAdd your comment...