After renaming project, old key not available

On request of one of our customers, we renamed a project in JIRA from project key HRD to CONFIRM. All issues were renamed from HRD-[#] to CONFIRM-[#]. So far so good.

After this step we would like to create a new empty project with the HRD key in JIRA, but we are getting an error-message that this key is still in use by the other project. We checked the database:

  id   | project_id | project_key


 14480 |      14111 | CONFIRM

 14111 |      14111 | HRD


Is there a way that we can re-use this key again?

Reason for this is that the group is using Bitbucket with the same key and for them it's a big job to change the key for all systems that are using bitbucket.


Hope you can help us.


Kind regards,





6 answers

2 votes
Vasiliy Zverev Community Champion Mar 20, 2017

The only option: 

  1. Change issue key back to HDR
  2. Create new project with CONFIRM2 key
  3. Move all issues from HDR to CONFIRM2 
  4. You have HDR key to use.


1 vote
Thomas Schlegel Community Champion Mar 20, 2017

Hi Esther,

you can't. There is an open issue for that:

Maybe you want to vote for it.

Thank you, I voted for this also.

1 vote
Tarun Sapra Community Champion Mar 20, 2017

HI Esther,

I was facing an exact same problem which you are facing. Here's how I fixed it (with help from script runner plugin)

I had to free up the older project key "GREP" which was now "DSIT"

1) I copy the project and issues of DSIT to an temporary project with key "DSITEMP"

2)I deleted the DSIT project (only by deleting the project you can free up the older key which was "GREP"

3) Now, recreate the project with key DSIT and move all issues from DSITEMP to DSIT

4) Now since GREP key is free I can create a new project using the key which was earlier unavailable.

To copy the projects with issues I used the "copy project" built-in script from script runner plugin.

Thank you all for the quick response smile

We just figured out a solution for our case, which I like to share with you:

  1. Create a new dummy project (name and key is not important)
  2. Make a copy of the permissions of the project HRD
  3. Add your account to the permission roles of the project (otherwise the bulk move is not allowed)
  4. Open the project where the issues are stored now (CONFIRM)  and choose View all issues and filters
  5. Select Tools and all # issues
  6. Move issues
  7. Select the project where you want to move these issues (DUMMY-PROJ)
  8. Change the key of the project CONFIRM back to HRD!
  9. Delete project HRD
  10. Create project HRD
  11. Create project CONFIRM
  12. Move via bulk option the issues from DUMMY-PROJ to CONFIRM
  13. Delete the DUMMY-PROJ

Again: thanks all to share your information with us. I did vote on the JIRA-34945 Thomas.


Have a nice day!

1 vote

One extra point that previous answers miss - you also need to think about moved issues.

Imagine you've got project ABC, issues 1 to 60.  If you move ABC-42 to project DEF and it becomes DEF-123, then perform one of the above, you're going to have problems when re-using ABC as a new project code when the new ABC-42 is created.

You'll need to delete DEF-123 to prevent the problems, or choose to destroy the "issue moved" record in the database (there's an issue-moved table that simply lists ABC-42 and 'current issue id', just drop the row and do a full re-index later)

Also yet one quickly method (or hack) :)

But you need exec sql query

After (!) rename project in JIRA database:

1. Delete from table project_key record with old key

2. Update table project field ORIGINALKEY to new project key in record with renamed project

After it create and delete empty project every type - JIRA update cache and new key will be free :))))))))))))

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,716 views 17 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