Here is a description how normal synchronization process executes:
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.
FYI if the issues are totally different they might and they will (when the synchronization will take place, e.g on issue update) override their field values!!!* *only those which are defined in contract AND only those which has been changed after this synchronization set up |
You will need:
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:
What you need to do is: just add new entity to the database, which will correspond to your desired mapping.
Glossary:
Explenation:
CASE 1:
You want to map only selected issues, just do it manually by providing ids:
INSERT INTO <JIRA-A-DB>.ao_6d516b_sync_issue ( CONTRACT_ID, ISSUE_ID, REMOTE_ISSUE_ID, REMOTE_ISSUE_KEY ) VALUES ( {(JIRA-A) contract_id-1}, {(JIRA-A) issue_id-1}, {(JIRA-B) issue_id-1}, {(JIRA-B) issue_key-1} ), ( {(JIRA-A) contract_id-2}, {(JIRA-A) issue_id-2}, {(JIRA-B) issue_id-2}, {(JIRA-B) issue_key-2} ), ( {(JIRA-A) contract_id-3}, {(JIRA-A) issue_id-3}, {(JIRA-B) issue_id-3}, {(JIRA-B) issue_key-3} ) |
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.
INSERT INTO <JIRA-A-DB>.ao_6d516b_sync_issue ( CONTRACT_ID, ISSUE_ID, REMOTE_ISSUE_ID, REMOTE_ISSUE_KEY ) SELECT contract.CONTRACT_ID AS CONTRACT_ID, issue.ID AS ISSUE_ID, issue.ID AS REMOTE_ISSUE_ID, concat(contract.PROJECT_KEY, "-", issue.issuenum) AS PROJECT_KEY FROM ( SELECT c.ID AS CONTRACT_ID, proj.PROJECT_ID AS PROJECT_ID, proj.PROJECT_KEY AS PROJECT_KEY FROM <JIRA-A-DB>.ao_6d516b_contract c JOIN <JIRA-A-DB>.project_key proj ON c.PROJECT_ID = proj.PROJECT_ID ) AS contract JOIN <JIRA-A-DB>.jiraissue issue ON contract.PROJECT_ID = issue.PROJECT |
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!