Finding issues that have moved projects

When using the REST API to update a ticket (XML-RPC), we have a use case where the ticket may have moved to a different project, but the client still knows it having the first key. ie, the issue was created having key AD-13362 but was then move to ED-236. In the actual Jira interface you could search for AD-13362 and ED-236 would come up, however this does not work with the API.

My question is, has anyone had a use case like this? And is there a workaround to have the API know that AD-13362 is now ED-236?

4 answers

1 vote

There is nothing possible using the current APIs. If you are okay to write a plugin, you can expose it as a new REST method!

I'm having the same problem - but I think there's an answer with the REST API. The reason I say that is that i'm using CURL - and if I grab all of the data in JSON format for one of my issues, moved from another project, there is an "inward" reference to the originating project. See below, an excerpt from a CURL query - the issue moved to is ENG-4500; the issue moved from is IECCH-3, and there are relations to 2 other issues - an ENG and an AH issue.

{"id":"58944","self":"https://[our company]","type":{"id":"10010","name":"Related Issues","inward":"Related To","outward":"Related To","self":"https://[our company]"},"outwardIssue":{"id":"67188","key":"AH-1221","self":"https://[our company]","fields":{"summary":"Print Invoice","status":{"self":"https://[our company]","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"https://[our company]","name":"Closed","id":"6"},"issuetype":{"self":"https://[our company]","id":"20","description":"Bug","iconUrl":"https://[our company]","name":"Bug SubTask","subtask":true},"priority":{"self":"https://[our company]","iconUrl":"https://[our company]","name":"Major","id":"3"}}}},{"id":"58943","self":"https://[our company]","type":{"id":"10010","name":"Related Issues","inward":"Related To","outward":"Related To","self":"https://[our company]"},"outwardIssue":{"id":"83303","key":"ENG-4134","self":"https://[our company]"...


there's a reference to "inwardIssue":{"id":"81331","key":"IECCH-3","self":"https://[our company]",..

So there are references that can be accessed using the keys - extracting them easily seems to be the challenge at the moment. If I could craft a JSON and use a GET properly, I believe I could extract this info.

Jobin, am I mistaken? Or is it that it's not possible to craft a JSON entry that way?

inward and outward are used to show linking between the issues. It can be absent if there are no links. And it doesn't give you anything to show the old issue key. So you are looking at the wrong thing!

Ah, got it - because we are actually cloning the original issue and then moving the clone to another project. So the original issue is tracking the clone, and when we use the move issue wizard, JIRA substitutes the new project issue with the original cloned issue.

You're saying that if we moved the original issue, there would be no "track-back"? Clearly, there's some way for JIRA to do it - it's just that the REST API can't do so, if I understand correctly.

That's right! it is just the REST API can't do it, yet!

This should be resolved in JIRA 5.0 according to JRA-26806. Since I am still on JIRA 4.4.5 I have developed a workaround:

curl -I -sS -X GET --user username:password | grep Location

If the issue has been moved you will get a Location back and it will contain the new issue key.

Can you search for issues that have changed projects in the GUI? So I want to search for projects that have moved from PROJA to PROJB on the search issues screen.

JQL Tricks plugin has a movedIssues function to do this. Might help.

I found I could use the the jira browse web interface and parse the html for the new ID.

will return an entry with the either the same JIRA ID or the actual JIRA ID:

<meta name="ajs-issue-key" content="ANOTHERPROJECT-567">

In Java using JSoup to parse the HTML it looks like this:

// returns the actual JIRA ID or null if the JIRA ID wasn't found

String actualJiraID(String jiraId){

String url = "";

String username = "user";

String password = "password";

String login = username + ":" + password;

String base64login = new String(Base64.encodeBase64(login.getBytes()));

Document doc = Jsoup.connect(url+jiraId).header("Authorization", "Basic " + base64login).timeout(10000).get();

// <meta name="ajs-issue-key" content="JIRAPROJECT-123">

Element element ="meta[name=ajs-issue-key]").first();

if (null == element){

return null;


String issuekey = element.attributes().get("content");

return issuekey;


Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,670 views 18 21
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you