422 unprocessable entity when creating mr

Summary

Trying to create a mr from an issue and a 422 error occurs. http request contains '{"target_project_id":null}', seems weird.

Steps to reproduce

cannot find a way to reproduce easily

What is the current bug behavior?

mr is not created

What is the expected correct behavior?

mr should be created

Relevant logs and/or screenshots

every time bug occurs, this log pattern happends.

Processing by Projects::IssuesController#create_merge_request as JSON
  Parameters: {"target_project_id"=>nil, "branch_name"=>"862-******************", "ref"=>"master", "namespace_id"=>"*******", "project_id"=>"**************", "id"=>"862", "issue"=>{}}
Started PATCH "/api/v4/jobs/188585/trace" for 163.172.21.223 at 2019-10-28 16:52:30 +0000
Started POST "/api/v4/internal/allowed" for 127.0.0.1 at 2019-10-28 16:52:30 +0000
Started POST "/api/v4/internal/pre_receive" for 127.0.0.1 at 2019-10-28 16:52:30 +0000
Started POST "/api/v4/internal/post_receive" for 127.0.0.1 at 2019-10-28 16:52:31 +0000
Updating statistics for project 38
Completed 422 Unprocessable Entity in 627ms (Views: 0.1ms | ActiveRecord: 69.6ms | Elasticsearch: 0.0ms)

version: Gitlab-CE 12.3.1

Edited Oct 28, 2019 by Antoine Huret
Assignee Loading
Time tracking Loading