Cloned JIRA Instance Synchronization
Basic behavior
Here is a description how normal synchronization process executes:
- You have issue in JIRA A instance, you click on create remote ( it can be made automatically when you set up the triggers in contract configuration e.g onCreatedIssue or onUpdatedIssue)
- The request is send to JIRA B instance to create issue ( corresponding to the contract, which caused the request )
- Issue is created, response to JIRA A is sent.
- Your issues are now synchronized.
Clone JIRA instance
Let's assume you already have issues on both JIRA instances, which you want to synchronize between instances but you don't want to trigger create new remote issues. In other words you want to synchronize issues that already exists.
*only those which are defined in contract AND only those which has been changed after this synchronization set up
You will need:
- Basic / Intermediate knowledge of SQL
- Access to the database will privileges to insert data
DB mapping explanation:
Information about which issue from JIRA A is synchronized to one from JIRA B is stored in sync_issue table (ao_6d516b_sync_issue).
This table has 5 columns CONTRACT_ID, ID, ISSUE_ID, REMOTE_ISSUE_ID, REMOTE_ISSUE_KEY.
As you might expect:
- contract_id - relates to contract you have already set up e.g: 1
- id - is just an id of the current entity ( mapping information ) e.g: 1
- issue_id - relates to internal issue id (JIRA A) e.g: 10100
- remote_issue_id - relates to external issue id (JIRA B) e.g: 10101
- remote_issue_key - relates to external issue key (JIRA B) e.g: PRO-12
What you need to do is: just add new entity to the database, which will correspond to your desired mapping.
Step-by-step guide
Glossary:
- <JIRA-A-DB> - is the pointer to the JIRA A database scheme
- {} - provide a value here
Explenation:
- You may omit id column, because it isn't referencing to any external source at the moment
- You need to run this SQL queries both on JIRA A and JIRA B (values may be different or identical if your instances are cloned)
- Queries has been made for mySQL
CASE 1:
You want to map only selected issues, just do it manually by providing ids:
CASE 2:
You have dumped your database and imported it as is. In this case you must copy the attachments from JIRA A installation directory to JIRA B installation directory (if you have them and want to use them) after you start the JIRA first thing to do is reindex.
Because those databases are identical, the query can be simplified and run on both instances.
Treat this as a tutorial. If you want to perform this operations please verify if they are working on you database.
If you are trying to perform a more complex mapping and you struggle with that, contact with us!