How will code merges/branches be affected when a Jira issue key is changed?

I made a mistake.

I accidentally moved a Jira issue (with subtasks) from one project to a new project (ex. Project1-500 was the original issue key).

When doing so, naturally, Jira auto-generated a new issue key (ex. Project2-1).

I realized I shouldn't have moved it, since code is actively being developed against that issue and merged into our development branch. So I moved it back to the original project, but of course, Jira reassigned a NEW issue key (Ex. Project1-501).

From my reading it appears that there is no easy way to fix this and restore the orginal issue key of Project1-500.

If I search for Project1-500 in Jira (the original issue key), it does redirect to Project1-501, but how will this affect the developers' merges/branching? All of the subtasks (which they create pull requests from, merge into the branch, etc.) were renumbered when I moved the parent issue back.


1 answer

1 accepted

This should be not a problem. Jira is saving the old key in the DB. Try to call your issue with its old key, you will be redirected to the moved one. Same should happen to resolving commit comments. Because the old key is still found.

Thanks, Sebasian! So, just so I'm clear...if the developers have already merged code today on several of the subtasks under the OLD issue id, then they later go to merge code on the same development task (but with the NEW sub-task id), that shouldn't create any problems/conflicts?

(Disclosure: I'm not a techie. :))

From the moment you move an issue from project A to project B, this issue has two issue keys. Merging at all is not affected. Commit comments (in your repo) of the past will not change, so these issue keys inside will as long point to the right issue unless you delete the issue or the project (or Jira).

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,825 views 12 18
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot