How can I change a Project Key?

John Simonson February 15, 2012

I realize that the Project Key is being used practically everywhere in JIRA as a form of foreign key (the database is not exactly in normal form, is it?).

But maybe someone has a means of changing a key (e.g. from JIRA2011 to JIRA2012), so that all the Issues and Histories and whatever stay with the project.

Or is this another example of "backup to XML, search and replace in XML, restore from XML"?

We are currently running JIRA 4.4.0.

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

8 votes
Answer accepted
vkharisma
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 22, 2013

Hi All,

Just a quick update, it is now possible to rename the project key via UI in JIRA 6.1

https://confluence.atlassian.com/display/JIRA/Editing+a+Project+Key?from=SvEC

Cheers,

5 votes
Alex Suslin
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.
February 15, 2012

It is not currently possible to change the project key through JIRA's interface. The best way to do this is to:

  1. Export your JIRA data to XML.
  2. Go through the file and replace the instances of the project's key:
    • in the 'key' attribute of the Project entity
    • in the 'key' attribute of all Issue entities.
  3. Search for the project key in the whole XML file. You should not find too many references. Change any that you find.
  4. Rename all attachment folders, as the folder name depends on the project key. This includes one folder for each issue with an attachment, plus one top-level folder for the project.
  5. Reimport your data.
  6. Reindex the data by navigating to Administration -> System -> Indexing and selecting 'Re-Index'.

refered: http://confluence.atlassian.com/display/JIRA/Changing+the+Project+Key

There is a ticket in JIRA for that: https://jira.atlassian.com/browse/JRA-2703

However you can create another project and move all the issues to it, than delete the old one.

Alex Suslin
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.
February 15, 2012

Yes and you will find in issue history that previously the issue was in other project with different project key.

John Simonson February 15, 2012

Thanks Thomas and Alex - that is what I was afraid of (detour through XML).

Alex, will creating a new project, moving issues, then deleting the old project leave the histories intact?

Sorin Sbarnea (Citrix)
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.
February 26, 2013

Does moving the issues from one project to another keep their numbers? It's easy to create a redirection on nginx frontend for fixing old links but the real question is the numbers kept? Remember that you can have spaces between ticket numbers due issues that were removed.

1 vote
Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 15, 2012
TAGS
AUG Leaders

Atlassian Community Events