MR approval policy from previous parent (sub)group continues to be enforced to move projects

Summary

A project that is moved to a different subgroup is being affected by MR approval policies from the subgroup it was moved from. The policy doesn't show in the policy settings but shows on MRs.

Adding the project's ID as an explicit exclusion in the policy that is incorrectly enforce, has no effect.

Steps to reproduce

Example Project

What is the current bug behavior?

An MR approval policy is inherited when there shouldn't be an inheritance.

What is the expected correct behavior?

Removal of the policy when the project is moved to a different subgroup.

Relevant logs and/or screenshots

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

 (For installations with omnibus-gitlab package run and paste the output of: \`sudo gitlab-rake gitlab:env:info\`)  (For installations from source run and paste the output of: \`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production\`)  

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:check SANITIZE=true`)

(For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true`)

(we will only investigate if the tests are passing)

Possible fixes

Edited by 🤖 GitLab Bot 🤖