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

TS January 23, 2018

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.

Thanks!

1 answer

1 accepted

0 votes
Answer accepted
Sebastian Kleinholz
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.
January 23, 2018

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.

TS January 23, 2018

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. :))

Sebastian Kleinholz
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.
January 23, 2018

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).

TS January 23, 2018

Thank you! :)

Suggest an answer

Log in or Sign up to answer