How to get old Jira issue key based on the new Key value

Gopinath Velayudhan February 10, 2014

Hi -

I have a situation where I want to find the old key of the ticket that have been moved to a new project. For example

tiket AAA-123 was moved to BBB-456. I have BBB-456 and how do I get the old key value. Is there any query GUI or Database that i can use to get this information out. I have about 500 tickets so I eally do not want to go to the history tab to find the old key value.

any help is very much appreciated.

3 answers

1 accepted

2 votes
Answer accepted
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 10, 2014

You can find it from the "ChangeItem" table in JIRA. Look for rows where the field name is "Key".

Matt Doar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 6, 2018

In 7.2 it's not in the history tab of an issue, so I'm not sure it is recorded in ChangeItem. The old project keys are recorded in the project_key database table though

3 votes
Henning Tietgens
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 11, 2014
0 votes
sanjay mishra April 15, 2019

You can use Curl  to get the New Key value 

ex: old key  ABC-123 is moved to new key  XYZ-123

curl -D- -u user:password -X GET -H "Content-Type: application/json" https://url.com/rest/api/2/issue/ABC-123

command  will give the new key  here is sample response

 

HTTP/1.1 200
Cache-Control: private
Expires: Wed, 31 Dec 1969 19:00:00 EST
X-AREQUESTID: 719x18566421x5
X-ASEN: SEN-2060384
Set-Cookie: JSESSIONID=97D7E069C110FDE95E3A7CD6BE3A4B80;path=/;Secure;HttpOnly
X-Seraph-LoginReason: OK
Set-Cookie: atlassian.xsrf.token=BEJ7-XRGE-Y44Y-ZOG4|9e2281670790ee533bc67671f88518a8c4ca28f5|lin;path=/;Secure
X-ASESSIONID: we53k
X-AUSERNAME: user
Cache-Control: no-cache, no-store, no-transform
X-Content-Type-Options: nosniff
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Mon, 15 Apr 2019 15:59:02 GMT

{"expand":"renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations","id":"960187","self":"https://url.com/rest/api/2/issue/960187","key":"XYZ-123","fields":

Victor Peters June 8, 2020

I've used the REST API to extract issue information, but of all issue information retrieved by the REST API, the previous issue key of a moved (to another project, during which process the issue key has changed) was not among the information supplied bij de REST API call.

Suggest an answer

Log in or Sign up to answer