Include field `iid` when adding an issue
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.
Motivation
A repo imported from other host loose references to issues.
Example
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.
Solution
The New Issue API should include the iid
field, which would be populated with the Github issue number to keep references.
Note: the 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
iid
is greater than the lastissue_id
in the current repo: API must adjust the "lastiid
" to the new creatediid
.