Handling Advanced Roadmaps for Jira issue links during DC to DC migrations
Advanced Roadmaps has been incorporated into Jira Software Data Center starting from version 8.15.0. Despite this, Configuration Manager for Jira has not yet been integrated with Advanced Roadmaps. As a result, you might come across scenarios where certain data linked to Advanced Roadmaps is not transferred along with CMJ.
In this article we will describe how you can manually handle issue links that are part of Advanced Roadmaps for Jira.
Context
The custom field Parent Link surpasses the standard Jira issue linking mechanism. It is designed to link issue types that are positioned higher in the hierarchy than the Epic issue type. It is important to note that manual handling is required for all issue links beyond the Epic level.
Consider the following scenario
You have the following hierarchy configuration:
# | Level Name | Jira Issue Types |
|---|---|---|
1 | Plan | Plan |
| Epic | Epic |
| Story | All other standard issue types |
| Sub-task | All sub-task issue types |
The relationship between Plan and Epic can be defined as follows: Plan is the parent of Epic.
Suppose you have the following list of issues created with their corresponding hierarchy:
TEST-7: Custom Plan
TEST-2: Epic #2
TEST-1: Epic #1
TEST-8: Custom Plan #2
TEST-9: Epic #3
Now, you want to transfer the issue links in order to preserve the hierarchy.
Approach
To address the potential challenge of managing numerous Jira issues linked by such relationships, we recommend a more efficient solution. Our suggestion involves streamlining the process by editing multiple issues simultaneously. This method entails systematically reviewing all parent issues and updating their respective child issues collectively.
Retrieve all parent-child relations managed by Advanced Roadmaps for Jira from the Source instance.
SELECT SUBSTRING( JSON_VALUE, LOCATE('"parent_id":"', JSON_VALUE) + LENGTH('"parent_id":"'), LOCATE('"', JSON_VALUE, LOCATE('"parent_id":"', JSON_VALUE) + LENGTH('"parent_id":"')) - (LOCATE('"parent_id":"', JSON_VALUE) + LENGTH('"parent_id":"')) ) AS PARENT_ID, GROUP_CONCAT(ENTITY_ID) AS ISSUE_IDS FROM ENTITY_PROPERTY WHERE ENTITY_NAME = 'IssueProperty' AND PROPERTY_KEY = 'jpo-issue-properties' AND JSON_VALUE LIKE '%parent_id%' GROUP BY PARENT_ID;The query will retrieve a comprehensive list of child issue IDs associated with a specific parent. An illustrative outcome is as follows:
PARENT_ID | ISSUE_IDS |
|---|---|
10015 | 10009,10010 |
10016 | 10017 |
Process the issues in batches. For instance, if you have two issues serving as parent (e.g.
10015and10016), execute the subsequent steps for each of the two batches. This action is performed on the Source instance.To retrieve the child issue keys, you can run the query below:
SELECT GROUP_CONCAT(CONCAT('TEST-', ISSUENUM) SEPARATOR ', ') AS ISSUE_KEYS FROM JIRAISSUE WHERE ID IN (10009, 10010);In the example above, substitute
TESTwith your project key from the Source instance, and replace the issue IDs with the IDs from the first batch of the initial query (for instance,10009and10010).
The query will provide the keys of all child issues associated with a parent issue having the ID10015.To retrieve the parent issue key, you can execute the query below:
SELECT GROUP_CONCAT(CONCAT('TEST-', ISSUENUM) SEPARATOR ', ') AS PARENT_KEY FROM JIRAISSUE WHERE ID IN = 10015;In the example above, substitute
TESTwith your project key from the Source instance, and replace the issue ID with the parent ID from the first batch of the initial query (for instance,10015). Here is an illustrative outcome for both steps:
ISSUE_KEYS |
|---|
TEST-1, TEST-2 |
PARENT_KEY |
|---|
TEST-7 |
These issue keys originate from your Source instance. If you deploy the project on the Target instance without altering the project key, you can utilize this outcome on the Target instance too. In case you modified the project key while deploying, you must revise this outcome with the new project key from the Target instance.
Navigate to the Jira issue navigator on the Target instance to locate and retrieve the issues associated with the provided keys.
key in (TEST-1, TEST-2)Perform a bulk operation on these issues on the Target instance by following the steps outlined in the https://confluence.atlassian.com/jirasoftwareserver/editing-multiple-issues-at-the-same-time-939938937.html. You will need to edit the issues and specify the value for the
Parent Linkfield to link them to the desired parent issue.
Repeat steps 2 through 4 for every row returned in step 1.