Exalate Script Mode – How to Migrate an Entire Jira Project (Epics → Stories/Tasks → Sub-tasks) and Keep Hierarchy

Hi everyone,

I’m trying to migrate a full Jira project from Jira A to Jira B using Exalate in Script Mode.
Project A already contains existing issues — Epics with Stories/Tasks, and those Stories have Sub-tasks.

My goal:

  • Migrate all existing issues from Jira A to Jira B

  • Preserve the full hierarchy (Epic → Story/Task → Sub-task)

  • Keep them synchronized afterwards

I’ve configured both outgoing and incoming sync rules, but I’m still facing problems with authentication and hierarchy preservation (Epic links and sub-task parent relationships).

Can someone share a working example or best-practice script for a one-time migration and continuous sync between two Jira Cloud projects?

Thanks in advance!

Great question! Migrating a full Jira project with Epics, Stories/Tasks, and Sub-tasks while preserving hierarchy and enabling ongoing sync is a classic use case for Exalate Script Mode. Here’s a practical overview and some best practices to help you get this working smoothly:

1. Hierarchy Preservation (Epics, Stories, Sub-tasks):

  • Exalate can sync the full hierarchy, but you need to handle Epic links and parent relationships explicitly in your sync scripts.
  • For Epics and Stories, use the issue.epicKey and issue.parentKey properties to maintain relationships.
  • When syncing, ensure that parent issues (Epics, Stories) are created before their children (Stories, Sub-tasks) to avoid broken links.

2. Script Mode Example for Jira Cloud:

Outgoing Sync (on Jira A):

// Outgoing sync - Jira A
replica.key            = issue.key
replica.type           = issue.type
replica.summary        = issue.summary
replica.description    = issue.description
replica.labels         = issue.labels
replica.status         = issue.status
replica.epicKey        = issue.epicKey
replica.parentKey      = issue.parent?.key
// Add other fields as needed

Incoming Sync (on Jira B):

// Incoming sync - Jira B
issue.type        = replica.type
issue.summary     = replica.summary
issue.description = replica.description
issue.labels      = replica.labels
issue.status      = replica.status

if (replica.epicKey) {
  issue.setEpicKey(replica.epicKey)
}
if (replica.parentKey) {
  issue.setParentKey(replica.parentKey)
}
// Add other fields as needed

3. Migration Steps:

  • Start by syncing Epics first, then Stories/Tasks, and finally Sub-tasks. This ensures that parent issues exist before their children are created.
  • You can use JQL to filter and trigger the sync in batches (e.g., Epics first: issuetype = Epic).

4. Authentication Issues:

  • Make sure the Exalate connection uses an account with sufficient permissions on both Jira instances.
  • Double-check that the Exalate app is installed and authorized on both sides.

5. Continuous Sync:

  • Once the initial migration is done, Exalate will keep issues in sync based on your rules.
  • You can refine your sync scripts to control which fields and updates are synchronized.

6. Documentation & Examples:

Tips:

  • Test your scripts on a small set of issues before running a full migration.
  • Use logging in your scripts to debug any hierarchy or field mapping issues.

This approach should get you on track for a smooth migration and ongoing sync. Good luck with your project!

Hi,

I wonder what the authentication issues are that you mentioned., but for the hierarchies, I believe you will need to need to send out the parentId field from A and then process it on B to find the correct parent, and link it.

This should be a good starting point (concentrate on the Jira incoming piece here): Jira Cloud Azure DevOps: Bi-directional hierarchy sync

For tasks-subtasks this should help: How to Sync Tasks and Subtasks in Jira Cloud

Please provide the scripts you have on B incoming and maybe I can point you in the right direction if you get stuck.

Thanks
Majid

Hi @Dovydas ,

Just checking in to see if you had a chance to review our last message and whether you need any further help with the hierarchy setup?

Thank you,

Ashar

Hello. We actually decided to go the other way and work without exalate. Thank you for your time.