Allow issue's Internal ID (`iid`) to be set when creating via the API
It would be very useful if we could include the
iid field when creating an issue, mainly due to migration from other repositories to Gitlab.
A repo imported from other host loose references to issues.
Let's say I have a project hosted in Github and I decide to migrate to Gitlab. There, I already have my Git history referencing issues by number.
When I migrate this project from Github to Gitlab, I completely loose this reference, because issues will gain a new number (aka
iid). Far worst, issue numbers will get confusing due to this renumbering. So, an existing commit or note, will reference the wrong issue.
The same applies when I migrate from gitlab.com to a self hosted solution.
The New Issue API should include the
iid field, which would be populated with the Github issue number to keep references.
iid field should only be available through API and is optional.
Problems and concerns
- Trying to create an issue with an existing
iid: API must return error.
- The new
iidis greater than the last
issue_idin the current repo: API must adjust the "last
iid" to the new created