Note

We've packed up and moved from Confluence to Discourse to bring you a better, more interactive space. Out of courtesy we didn't migrate your user account so - you will have to signup again

The Exalate team will be on holiday for the coming days - returning Jan 4
Enjoy & stay safe

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

Introduction


I'm excited to present this tutorial, where we will explore the seamless synchronization of Tempo Worklogs between two Jira Cloud instances using Exalate. 


To set the stage, let's consider a scenario where we have Jira Cloud instance A (JCA) and Jira Cloud instance B (JCB). When a ticket is exalated from JCA to JCB, it is seamlessly populated within JCB, allowing users to interact with it. However, a critical aspect of worklog synchronization arises when a user adds time to the ticket in JCB. It is imperative that this time entry is reflected in JCA to maintain consistency and facilitate effective project tracking.


Conversely, if a user adds or modifies a worklog in JCA, it should be automatically synchronized with JCB to ensure that all stakeholders have up-to-date information across both instances.


This bidirectional synchronization enables teams working on different Jira Cloud instances to collaborate seamlessly, regardless of their physical location or the specific instance they are using.

By implementing Exalate as the integration solution, organizations can establish a robust and reliable connection between JCA and JCB, facilitating real-time updates of Tempo Worklogs.

Tempo Worklogs


After installing Tempo Worklogs, you will see it getting added under your apps selection. 

Exalate uses Tempo Cloud REST API to get access to the tempo worklogs.


The use of the Tempo Cloud REST API enables Exalate to retrieve worklogs from the source instance and transfer them to the target instance seamlessly. It also allows for the synchronization of worklog updates, ensuring that any modifications made in one instance are accurately reflected in the other.


Generate Access Token


Exalate requires access to Tempo. To grant secure, temporary access to Tempo you need to create a user access token. This access token is based on current permissions of the Jira Cloud user.

Required permissions

The user who generated the access token must have the following permissions:

  • Jira permissions:
    • Create worklogs
    • View all worklogs
    • Log work for others
    • Work on issues
  • Tempo permissions:
    • view team worklogs
    • manage team worklogs

Generate the Access Token under Tempo settings - API integration tab in your Jira Cloud settings.




The Scripts

Jira Cloud 


Outgoing Sync Jira Cloud 


Outgoing Sync
replica.timeSpent          = issue.timeSpent
replica.originalEstimate   = issue.originalEstimate
replica.remainingEstimate  = issue.remainingEstimate

replica.workLogs = issue.workLogs

//change the tempo worklog integration token
TempoWorkLogSync.send(
    "vykOUXzZvZo5fufy3TX7gAJKrs3ORx-eu")



Incoming Sync Jira Cloud 


Add the imports in the beginning of the code.

Add the functions at the end of the code.

Incoming Sync
issue.originalEstimate   = replica.originalEstimate
issue.remainingEstimate  = replica.remainingEstimate

if(firstSync){
	//change the project Key
    issue.projectKey  = "MAT"
    issue.typeName    = nodeHelper.getIssueType(replica.type?.name, issue.projectKey)?.name ?: "Task"
    issue.summary      = replica.summary
    store(issue)
}

issue.summary      = replica.summary
issue.description  = replica.description
issue.comments     = commentHelper.mergeComments(issue, replica)
issue.attachments  = attachmentHelper.mergeAttachments(issue, replica)
issue.labels       = replica.labels

//change the tempo integration token
TempoWorkLogSync.receive("4E5Gha3JVKspLkjueXh2CIAq1Xs4G-eu",replica,issue,httpClient,traces,nodeHelper)






Please be sure to change the tokens, to the correct TEMPO tokens.



Video






Questions