3
2
1

Once the sync is done… Exalate populates the remote issue key on the side panel… we would like to update the remote issue key (along with the URL) in the custom field of the initiating issue… how do we do that?

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Is it just being set using replica.key?


      Something like this in the Incoming rule would work, wouldn't it?

      issue.customFields."Remote Key".value = replica.key

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

        This case is described in ExalateEventListener.groovy

        It will require an external script to be installed on the server (described here), and then add to your outgoing sync following code


        ExalateEventListener.hangListener(connection,{ 
                           String localIssueKey, 
                           String remoteIssueKey, 
                           localIssue, 
                           remoteIssue ->
        
             localIssue.customFields."Remote Key".value = remoteIssueKey
             })
        1. Samip K Banker

          user-50445 :

          I created ExalateEventListener.groovy (by copying the data from ExalateEventListener.groovy) under $JIRA_HOME/scripts... then I added below code to the outgoing sync... 

          ExalateEventListener.hangListener(connection,{
          String localIssueKey,
          String remoteIssueKey,
          localIssue,
          remoteIssue ->

          localIssue.customFields."Published External URL".value = remoteIssueKey
          })


          I am seeing this Error... 


          ~Samip

        2. user-3fd1a

          This is to be expected when Exalate cannot access  the external script - either because of a path or a permission problem.


          Can you check either?

        3. Samip K Banker

          user-50445 :

          I double checked the path and its correct... permission wise the script has read permission... what permission do I need to set ?

          ~Samip

        4. user-3fd1a

          Samip K Banker

          Let's review during the workshop.  I guess it is a small thingy.


        5. user-3fd1a

          We found it today.  In case of a data center version of the underlying tracker - it needs to be copied to a folder under the shared-home


        6. Samip K Banker

          user-50445 :

          This is working but not quite exactly…

          ABC-23 is synced to EXT-234
                        ABC-23 will have the “Published URL” as EXT-234

          EXT-234 is synced to EXTP-567
          EXT-234 now will have the “Published URL” as EXTP-567


          But what we want is this…
          ABC-23’s “Published URL” to have EXTP-567

          ~Samip

        7. Samip K Banker

          user-50445 :

          Do you have any recomendation on how we achive this?

          ~Samip

        8. user-3fd1a

          Do you have the 'Published URL'  in the outgoing sync of the connection between  ABC and EXT?

          When exalate adapts the value of that custom field, a sync will be triggered between EXT and ABC.  You can then configure the incoming sync of the ABC-EXT connection to update a custom field on the ABC issue.


          Would that help?

        9. Samip K Banker

          user-50445 :

          Yes, for the Outgoing Sync Connection between ABC and EXT we have this.. 

          ExalateEventListener.hangListener(connection,{ 
                  String localIssueKey, 
                  String remoteIssueKey, 
                  localIssue, 
                  remoteIssue ->
                  localIssue.customFields."Published External URL".value =  remoteIssueKey
          })

          We don't have anything in the incomming Sync of ABC-EXT... what do I need to put in ABC-EXT Incomming Sync?

        10. user-3fd1a

          in the incoming sync - something like


          issue.customFields."Published External URL".value = replica.customFields."Published External URL".value


          Make sure that the customField is in the replica by adding in the outgoing sync

          replica.customFields."Published External URL" issue.customFields."Published External URL"



        11. Jorge Jerez Ibáñez

          Is this still working? I'm not abble to see the file ExalateEventListener.groovy but I've the same problem 

        CommentAdd your comment...