I created a Jira project with a key earlier and later edited the project key. But later when i tries to create a new Jira project with the old project key which was edited and changed I get an error message Project 'ABC' uses this project key.
Is there any solution for this I need to create the new project with the key.
If you really want that you need to clear the old key from project_key table.
We intentionally didn't allow that because then you will break any links from within JIRA or from the outside to issues mentioned under the old key.
If you're afraid of messing with the database (or you can't) you can do another trick - create a new, temporary project (name and key doesn't matter), move issues to that project, remove the original project which will remove also all old keys for it. Then create a project with the key it should have and move back all those issues. Delete the temporary project. Now you're able to create a new project with the key you want.
Hi, according to this document: https://confluence.atlassian.com/display/JIRA/Editing+a+Project+Key
"You won't be able to create a new project with the old project key. However, you can change the renamed project back to the old project key. If you delete the project, all associated keys will be freed and you'll be able to re-use them."
So old keys are still "assigned" to project (because of filters etc.). Currently you can't create new project with the key that was already used.
Hello Michal, is it possible to delete old keys complete from the database and replace them with the new key? Or are new keys just "renaming" the old keys and the internal tracking is still based on the old keys? I am asking this regarding a project import where an old key is colliding with an exisiting key in the new jira instance. Are there options to import this project at all? Cheers, Chris
This only worked, because the Project was renamed soon after its creation, so that no edited fields, links or moved items existed under the old project name.
Use Pawels trick with the temporary project to be on the safe side to avoid meddling with the DB.
I had the same need and tested Pawels suggestion, which worked.
Database: Oracle 12.1
Here is a step-by-step description:
1) Log into your database and delete the record from the project_key table
-- sql script to delete old project name, so that it can be reused in a new project:
from project_key pk
where project_key = 'MYOLDKEY' -- replace this with your own project key
and (select count(*) from project where pkey = pk.project_key) = 0; -- security check: you don't want to delete the currently active project name
-- commit, if exactly one record was deleted:
-> this should delete one record exactly, or else you have a mistake in your logic.
2) Restart your Server
-> Note: Reindexing your project doesn't work, as the project key index is not updated in that task.
3) Create your new project in JIRA using the previously deleted project key.
Thank you! - I gather you are speaking of the table "changeitem"?
Yes, if you had moved or edited certain item content at the time where the old project-key was active, then you would probably need to edit the records to the new key there.
That didn't apply for us however, because we did the project renaming very soon after creating the project.
I guess the affected items would be:
select * from changeitem
where oldstring like 'MYOLDKEY-%'
or newstring like 'MYOLDKEY-%';
And that still leaves possible links in description and comments open.
In the end Pawels trick with the temporary project is the best solution.
I will edit my original comment as not to mislead other people.
Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...
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!
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