How to Sync Tempo Worklogs Between Two Jira Cloud Instances

Published: Aug 25, 2023 | Last updated: Mar 21, 2025

Table of Contents

This article was originally published on the Atlassian Community.

In today’s interconnected business environments, teams are distributed across different departments or organizations. Hence, maintaining accurate and synchronized work logs becomes essential to ensure transparency, optimize resource allocation, and enable effective decision-making. 

This use case explores the process of syncing Tempo Worklogs between two Jira Cloud instances. By implementing this synchronization, teams can bridge the gap between disparate Jira instances, harmonize work data, and unlock the full potential of their collaborative efforts.

The Use Case

To set the context, let’s envision a situation involving two Jira Cloud instances: Instance A (JCA) and Instance B (JCB). When a ticket is escalated from JCA to JCB, it appears within the latter, allowing users to engage with it. 

However, a crucial aspect of maintaining work log consistency arises when a user records time for the ticket in JCB. It becomes essential for this time entry to be accurately mirrored in JCA, ensuring uniformity.

Conversely, if a user changes a work log in JCA, the same change should be synchronized to JCB. This way, everyone involved will always have the latest information across both instances.

The advanced nature of the use case warrants an integration solution that can handle it effortlessly. 

Exalate is a customizable integration solution that supports basic to advanced use cases. 

Exalate: An Integration Solution 

Exalate connects your everyday tools to set up a flexible, bidirectional sync. It supports Jira, GitHub, Salesforce, Zendesk, Azure DevOps, ServiceNow, etc. 

In addition to a drag-and-drop interface for simple use cases, it offers a customizable Script mode that helps set up advanced use cases with ease. 

Exalate’s Script mode has Groovy-based scripts present on both integrating sides. The outgoing script controls what information leaves the platform, and the incoming script controls how to interpret information coming from the destination instance. You can control these scripts independently at both ends, as they are decentralized in nature. 

Before we discuss how to implement this use case with the help of Exalate, let’s quickly understand how Exalate handles Tempo work logs.

How Exalate Interacts with Tempo

If you have installed Tempo already, you can access it under “Apps” in your Jira Cloud instance. 

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. Furthermore, it also allows for the ongoing synchronization of worklog updates, ensuring any modifications made in one instance are accurately reflected in the other. 

Grant Exalate Access to Tempo

Exalate requires access to Tempo. To do so securely, you need to create a user access token. This access token is based on the current permissions of the Jira cloud user. 

You can generate the Access Token under the “Tempo settings > API integration” tab.

The required set of permissions for the user who generates the access token are:

Jira Permissions:
  • Create worklogs
  • View all worklogs
  • Log work for others
  • Work on issues
Tempo Permissions: 
  • View team worklogs
  • Manage team worklogs

With this groundwork, it’s time to implement the synchronization. 

How to Sync Tempo Worklogs Between Two Jira Cloud Instances

To start implementing the use case with Exalate, you must first install it on both the Jira Cloud instances. Then establish a connection in Script mode between them. 

Next, you need to configure the connection. You can do that by clicking the “Configure sync” button after establishing the connection or editing it under the “Connections” tab in the Exalate console. 

You can see the “Rules” tab here. This tab is where the Groovy-based scripts we talked about earlier reside. The “Outgoing sync” contains scripts that control what you want to send to the other Jira. The “Incoming sync” contains scripts that decide how you want to interpret the information coming from the destination Jira. 

Exalate syncing tempo worklogs between two Jira instances

Since we want a bidirectional Tempo worklogs sync between the Jira instances, we must modify both scripts at both ends. 

Outgoing Sync 

The incoming and outgoing sync scripts will remain the same on JCA and JCB. Only the token must be replaced with the actual token that you’ve generated. 

Outgoing script
TempoWorkLogSync.send(
"92mXBTLkvf7pQWHns4yJGz1Cr6d8Ao-eu", // replace the "token" with the //previously generated access token
replica,
issue,
httpClient,
nodeHelper
)

Incoming Sync

For the incoming sync, ensure the following: 

  • Add the imports at the beginning of the code.
  • Add the functions at the end of the code.
Incoming script
TempoWorkLogSync.receive(
"7a9KJZPwtV5gQMLxr3dTYq8Ns1w6Co-us", // replace the "token" with the previously generated access token
replica,
issue,
httpClient,
traces,
nodeHelper
)

Conclusion

By synchronizing Tempo worklogs between distinct Jira cloud instances using Exalate, organizations can facilitate real-time updates of Tempo worklogs. This bidirectional synchronization not only ensures consistency and accuracy of worklog data but also fosters efficient cross-instance communication, promotes transparency across teams, and elevates the overall success of their projects.

Recommended Reading:

Unlock Exclusive Content

Join +5.000 companies and get monthly integration content straight into your inbox

Shopping Basket