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:

By MrAddon

.

.'s avatar
Posted by:.

Leave a comment