IID is incremented even if issue/mr is not created
Summary
IID counter seems to be incremented on issue/mr creation even if issue/mr is invalid.
Steps to reproduce
test project: https://gitlab.com/ahuret/iids-bug-reproduction
- create an issue and check for its IID =>
$issueIID1
- then do
curl -X POST https://gitlab.com/api/v4/projects/11639386/merge_requests\?title\= -H 'PRIVATE-TOKEN: YOURPRIVATETOKEN'
(see title is blank) - error message says
{"message":{"title":["can't be blank"]}}
- create an issue and check for its IID =>
$issueIID2
- see that IID is not following first one you checked - result :
($issueIID2 - $issueIID1) != 1
Example Project
https://gitlab.com/ahuret/iids-bug-reproduction/
What is the current bug behavior?
result : ($issueIID2 - $issueIID1) != 1
What is the expected correct behavior?
result : ($issueIID2 - $issueIID1) == 1
Results of GitLab environment info
tested on https://gitlab.com
Results of GitLab application Check
Expand for output related to the GitLab application check
tested on https://gitlab.com
Edited by Antoine Huret