This article shows how to synchronize Tempo worklogs with external scripts.
Disclaimer
- There is no guarantee on its stability, as it didn't run through a complete validation cycle.
- The feature can evolve and even be retracted in case it doesn't meet our quality criteria.
- Please send feedback on our experimental features to support@exalate.com.
Introduction
With Exalate you can sync Tempo worklogs.
Synchronization of Tempo worklogs requires an exchange of the following data:
- worklog author
- issue
- description
- date: created at, update at, start date, start time,
- worked (time spent)
- remaining estimate
- tempo worklog id (only for Jira Cloud)
- Jira worklog id (if the remote side does not have tempo app, tempo worklogs would be synced into a Jira worklog fields)
Exalate supports only create worklog events synchronization. If the worklog has been updated or deleted these changes would not be synchronized.
You don't need to upload external scripts manually, because they are already deployed on the Exalate app server.
Worklog Author is a Jira user, this means that Exalate requires exchanging information from user fields. Jira Cloud users may have different user access on different instances using the same email address. Exalate uses Tempo Cloud REST API to get access to the tempo worklogs.
The script works only in case when the worklog author is a Jira Cloud user on both sides.
Configuration
1. 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.
2. Call the Script from the Sync Rules
Source side (Jira Cloud)
To send the data from Tempo add the code below to the Outgoing sync(data filter)
TempoWorkLogSync.send( "OM72xP3i1IxEgUT4YR1dmAHNRXcOEw", // replace OM72xP3i1IxEgUT4YR1dmAHNRXcOEw with the previously generated access token replica, issue, httpClient, nodeHelper )
Destination side (Jira Cloud)
To apply received Tempo worklogs locally when creating an issue, add the code below to the Incoming sync processor.
// the issue must be available if (!firstSync) { TempoWorkLogSync.receive( "OM72xP3i1IxEgUT4YR1dmAHNRXcOEw", // replace OM72xP3i1IxEgUT4YR1dmAHNRXcOEw with the previously generated access token replica, issue, httpClient, traces, nodeHelper ) }