PCJ-After an Import the moved issue keys are missing

Problem

After migrating a complete project between two instances then the data in the MOVED_ISSUE_KEY table is not present and searching for historical issue keys is not working.

Reason

Project Configurator does not support the migration of the moved issue keys.

The reason for this is that Project Configurator uses the project import functionality provided by Atlassian to import incomplete projects and this functionality provided by Atlassian does not maintain the historical issue keys for moved issues.

The JRASERVER-36583 Atlassian ticket confirms that this functionality is not supported. There is not a REST API that can be used for the moved issue keys migration. However, there is an open Atlassian ticket that can be tracked for the same - JRASERVER-72164.

Solution

To migrate the moved issue keys after the project import, you need to manually move the desired content from the MOVED_ISSUE_KEY table from the source to the target Jira instance. Note that is it recommended to do a backup of the database before any modifications in it.

Open the MOVED_ISSUE_KEY table and select all rows related to the migrated projects (you also need to use the PROJECT and JIRAISSUE tables). The result will contain the historic keys of the moved issues in the migrated projects. Import the result into the MOVED_ISSUE_KEY table on the target instance. Note that there might be historic issue keys on the source instance conflicting with a project key on the target instance. If the data do have conflicts you need to decide how to handle this - you can skip the conflicting rows or change some keys.