Sometimes we just have to dig through the Jira Server or Datacenter database to find what we’re looking for. In this case, we want to know the old references of the moved tickets and extract a list. How do we do it? We will query the database as there is no other way through the Jira REST API. Let’s see how it’s done:
SELECT concat(project.pkey, '-', jiraissue.issuenum) as KEY,
moved_issue_key.old_issue_key as OLD
FROM
moved_issue_key,
project,
jiraissue
WHERE
project.id = jiraissue.project
and jiraissue.id = moved_issue_key.issue_id
You have to consult the table moved_issue_key
More public examples:
- To find or view a Jira issue from the database using SQL
- Jira Database IssueFields
- Old Jira project key reference still exists after creating new project and moving issues
By MrAddon
.