Skip to content

Fix suggested approvers on MR update

This was three issues combining:

  1. didn't apply the same coercion of the approvals_before_merge param to editing an existing MR as there was for creating a new MR. This meant that creating a new MR with the same number of approvers as the target project, editing it, not changing anything, and clicking Save would produce a validation error.
  2. set_suggested_approvers wasn't called in a couple of places where we render the MR edit form (like the above).
  3. The number of approvals used for clamping the approvals_before_merge param was based on the source project, not the target project (unlike the model validation).

Closes, closes, and closes

Merge request reports