Skip to content

Prevent modification of MR-level approval rules after MR is merged

Summary

Once an MR has been merged, a user can modify the MR-level approval rules, leaving the MR in a state where the approval rules differ to the rules at the time of merging.

Steps to reproduce

  1. Create an MR with an MR-level approval rule e.g. requires 1 approvals
  2. Satisfy rule and merge MR
  3. After merge, edit MR and change number of approvals required
  4. Save MR

Example Project

jay_mccure/test2target!119 (merged)

What is the current bug behavior?

Can change rules after merging

What is the expected correct behavior?

Cannot change rules after merging

Relevant logs and/or screenshots

MR requires 1 approval: Screenshot_2023-11-28_at_13.27.39

MR approved: Screenshot_2023-11-28_at_13.27.52

MR merged: Screenshot_2023-11-28_at_13.28.06

Edit MR to require 20 approvals: Screenshot_2023-11-28_at_13.28.34

Possible fixes