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

0 votes
Accepted answer

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
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,299 views 12 19
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