How To Sync Epics between Two Jira Instances
Tags: integration, jira, atlassian, synchronization
Published: 2024-07-03 11:13:34

Companies looking to sync Jira Epics internally or externally must use native or third-party applications. 

One third-party option is [Exalate](http://exalate.com/?utm_campaign=jiraepics_devto_03072024&utm_medium=guest_post&utm_source=DevTo), a bidirectional integration solution that syncs data between two Jira instances using simple scripts and custom triggers. It also works with Zendesk, Azure DevOps, ServiceNow, Salesforce, GitHub, etc. 

In this article, you’ll learn how to sync Epics between two Jira instances using Exalate.
## Use Cases For Two-way Jira Epic Sync

Some scenarios for syncing Jira Epics include:

- Internal teams looking to consolidate data between their Jira sites,
- Companies collaborating with MSPs, suppliers, vendors, or other companies,
- Organizations going through a merger and acquisition,
- Solopreneur connecting with an outsourcing partner.

## Potential challenges

- Unprecedented network timeouts 
- Poor data transformation
- Retries after failure
- Badly configured triggers 
- Scripting errors
- Debugging

## How Can Exalate Solve This Problem?

Exalate is the perfect solution for connecting two Jira Epics for the following reasons:

1. It allows you to sync Jira epics and issues in a few clicks.
2. Exalate’s [Groovy scripting](http://exalate.com/blog/groovy-scripting/?utm_campaign=jiraepics_devto_03072024&utm_medium=guest_post&utm_source=DevTo) engine allows you to write custom rules for advanced use cases.
3. It allows you to sync multiple epics and issues using the [Bulk Exalate](http://docs.exalate.com/docs/bulk-exalate?utm_campaign=jiraepics_devto_03072024&utm_medium=guest_post&utm_source=DevTo) option.
4. Exalate protects your data when sharing sensitive information.

## Primary Requirements 

When a user creates an Epic on one Jira Cloud instance, it should appear on the other instance without having to copy it manually. The changes should go both ways.

To get this working, the system admin needs to write sync rules to control the outgoing and incoming data. Next, [Jira Query Language (JQL) triggers](http://docs.exalate.com/docs/triggers-in-exalate?utm_campaign=jiraepics_devto_03072024&utm_medium=guest_post&utm_source=DevTo) will be set up to automate the sync.

You also need to have the Exalate App installed on both instances, whether [Jira Cloud](https://docs.exalate.com/docs/jira-cloud-fcf4517?utm_campaign=jiraepics_devto_03072024&utm_medium=guest_post&utm_source=DevTo) or [Jira On-Premise (Data Center)](https://docs.exalate.com/docs/jira-on-premise-2454d81?utm_campaign=jiraepics_devto_03072024&utm_medium=guest_post&utm_source=DevTo). 

## How to Sync Jira Epics With Exalate 
### Step 1: Establish a Connection
Start from either instance; the process is the same.

On one of your Jira instances, click “Apps” in the top menu and then select “Manage your apps.” Then click “Exalate” to open the app console.

Click “Connections”, then click “Initiate Connection” to start.

On the next screen, enter the URL of the destination instance. Then select “Script” from the configuration options that appear.


![Exalate Configuration Modes](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wyy4t38gdyysjj14oped.png)


Enter the name and description of the connection. Click “Next” to process.


![Naming Exalate Connections](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ukdh7rgboa0agqqc03om.png)

Click on “Copy invitation code”. Then head over to the other instance.

On the other instance, click “Accept invitation” and enter the invitation code. Then click “Next” to select the target project containing the Epic you want to sync.


![Accept connection invitation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/shlgmcxat8nl0gddprg1.png)

That’s all. If the connection goes through, the “Congratulations” screen will appear.

![Exalate configuration success](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/34s3f7dcu5vrn886v51m.png)

### Step 2: Edit the Connection
After setting up the local connection and accepting the invitation on the remote side, click the “Edit connection” icon (on the local side). 

Go to the “Rules” tab and look for the “Outgoing sync” text field. Add the function `Epic.send()` to the console. This line of code sends out your Jira Epic and its contents to a remote instance.


![Exalate outgoing sync](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/on7k4s4bz40z1fms8efp.png)

Click “Publish” to save and implement the changes.

Repeat the same procedure by opening the “Rules” tab on the remote instance (the receiving side). This time, go to the “Incoming sync” text field and enter the function `Epic.receive()`.


![Exalate incoming sync](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tdem9yzn92z71ccz67rd.png)

The `.receive()` method tells the console to allow the remote instance to receive data from the sending instance. Click “Publish” to save the changes.

Once the connection is ready, head back to your Jira dashboard to create a new Epic — add a name and description.

![Setting up sync panel](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ev425y9v1z7sto6w9wve.png)

After creating the Epic, go to the sidebar and click “Open Exalate.” Next, click “Exalate” and choose the connection name you created earlier. 

Wait for the status to go from “Waiting for Remote” to “Synchronized.” Then, click on the Remote Link, which will take you to the epic created on the other Jira instance.


![Confirm replication success](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ipjgwhhahadomgk1h8wv.png)

You can see that the Epic has been replicated on the other Jira instance.

Afterward, go back to the local instance and add three issues. Then go back to the remote side and refresh to see the issues within the newly created epic.

### Step 3: Create Triggers to Automate the Sync
If you don’t want to manually Exalate the issue, add triggers to sync the issue automatically. So, anytime you create an epic on one side, it instantly replicates itself on the other side.

To create a trigger, click “Triggers” on the left sidebar. Click “Create Trigger” to start configuring your issue or sprint. 


![Create trigger](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ojfa35jekl7jt41uadk2.png)

You can write as many conditions as necessary. If you have instructions, you can add them as “Notes” to the trigger. Once done, click “Create” to complete the process.

Congratulations! You’ve now set rules and triggers to help you sync epics between two Jira instances. 

If you still have questions or want to see how Exalate is tailored to your specific use case, [book a demo](http://exalate.com/book-demo/?utm_campaign=jiraepics_devto_03072024&utm_medium=guest_post&utm_source=DevTo) with one of our experts.