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 Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

64 views 0 5
Read article

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