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.
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
We just figured out a solution for our case, which I like to share with you:
Again: thanks all to share your information with us. I did vote on the JIRA-34945 Thomas.
Have a nice day!
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 :))))))))))))
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)
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...
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