How do I delete or reuse the project key?

Anandan Narayanaswamy August 25, 2016

This question is in reference to Atlassian Documentation: Editing a project key

I ran into a problem were I composed a project which created the project key I had also changed the key. I need to delete the project key associated with this project the reason being I had to create another project with identical name but the project key was conflicting as it said I was trying to use the project key that already existed. Any help with this?

2 answers

9 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 25, 2016

I'm afraid Ravi's answer here is not correct.

Any project keys you create are recorded and kept for historical reasons.  JIRA will prevent you from creating a project with an existing key, that makes perfect sense, as you already have a project with that key. 

But it will still prevent you from using a key that existed before, even if you change the project key or even delete the original project.  It needs a record of removed projects for the history search, so it stops you creating projects with keys that have existed before.

The only workaround is to go into the database and remove the old project key from the table it is stored in.  That is only safe to do if you have never created any issues in the dead project, or you have deleted all of the issues that have ever been in it, remembering that it is possible to move issues out of a project and into another one.  If you have moved issues out, there's another table you can remove records from, but that does break the history search.

Ravi Sagar _Sparxsys_
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.
August 26, 2016

I agree with Nic.

The Atlassian documentation is little unclear on this point though: https://confluence.atlassian.com/adminjiracloud/editing-a-project-key-776636293.html

Like Abhi Singh likes this
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 26, 2016

That's true - the doc is fine for telling you how to change a key, but doesn't make it clear that there's a "hang over" of some data.

Like # people like this
GestAdmin September 26, 2016

The only workaround is to go into the database and remove the old project key from the table it is stored in.

Seems like that my first-choice database place for keeping the old key (project_key table, project.originalkey field) is not the right place to look for.

Additional ref:https://jira.atlassian.com/browse/JRA-34945

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 26, 2016

Correct, it's completely the wrong place.

Danno
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 31, 2020

Rats! I was creating a new project and wanted to keep the issue prefix. I just got through the Jira admin part 1 and 2 video training modules and swear I saw in there somewhere that you could reuse the prefix in multiple projects. The example was such that all the projects for the DEV team at TIS could use the prefix for each individual project. I will go back through the documentation to see if I can find it.

Danno
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 31, 2020

I don't know what hallucinogen I was on while taking the training. NVM my weird ramblings. It's these 50+ hours per week I've been doing.

Prasanth Mukundan November 13, 2020

One cannot change the 'next gen project' to 'classic' one. The only option is to create a new project and move the tickets over.
Drawback (not that there is none yet), we lose the 'key' but have to pick another :-(

Note: Realize that, jira uses this old key to auto reroute to the new key..
i.e. oldticket-1 would now re-route automatically to newticket-1

4 votes
Ravi Sagar _Sparxsys_
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.
August 25, 2016

Anandan,

The old project key will be freed only when you delete the old project.

Ravi

Thomas Bithell August 14, 2018

Confirmed this does work. If the prior project using key = PROJECTX is Deleted, all issues etc. then the key can be reused for a new project. 

If PROJECTX is simply rekeyed to, say, PROJECTZ the PROJECTX key will still be attached to the issues. You can run a JQL query "Project = PROJECTX" and it will return a list of issues still associated with the PROJECTX key. 

Tested this a couple of times as it is good to know. We could not find clear documentation on this either.

Like # people like this
Tarun Sapra December 12, 2018

This approach works for me, Jira version 7.11.2

Like # people like this
Abhi Singh November 17, 2020

Hello, will this work in Jira Cloud if prior to deleting the old project, we move all items, including historically closed ones, to a new project space? Thanks!

Pavol Harvanka May 13, 2021

@Abhi Singh 
just in case you did not find the answer or if someone else stumbles onto your question, here a post from atlassian:

https://community.atlassian.com/t5/Jira-Software-questions/Can-t-rename-a-project/qaq-p/1405218?utm_source=atlcomm&utm_medium=email&utm_campaign=immediate_general_answer&utm_content=topic 

Feature request that can be upvoted/followed:

https://jira.atlassian.com/browse/JRACLOUD-34945

Like Abhi Singh likes this

Suggest an answer

Log in or Sign up to answer