Developer get error 500 when editing MR with approval rule
Summary
When a developer try to edit an MR that is created from an issue page where the MR has approval rule, the developer will get the error 500 page after clicking Save
Steps to reproduce
- Create a
group1 - Create a
subgroupAfor the approvers - Add a project1 within group1
group1/project1 - create master branch
- Go to project Settings > General > Merge request approvals > Add
group1/subgroupAas approver - Add a user (userA) as member to the project with
developerpermission -
From here onward complete the actions as
userA, create an issue within the project - Go to the created issue > click on
Create merge request - Go to the newly created merge > click
Edit - Either
userAedit or not,userAwill get 500 error page when clickSave
Note:
- This only happens when adding subgroup as approvers
- When others (project owners) edit the MR, it will remove approval rules when click
Save, potentially another bug? This leads to develop can edit the MR.
Example Project
https://gitlab.com/gitlab-silver/group-testmr/test-mr/
What is the current bug behavior?
Developer get 500 error when trying to edit an MR.
What is the expected correct behavior?
Give an error message as to why the developer cannot edit the MR instead of error 500. It could be reasonable because editing MR could possibly edit approval rule but maybe editing approval rule could be edited separately?
Output of checks
This bug happens on GitLab.com, GitLab Enterprise Edition 12.7.0-pre e5c967cc
Sentry link: https://sentry.gitlab.net/gitlab/gitlabcom/issues/1157216/?query=is:unresolved%20correlation_id:NEZcpr5hIs1
Affecting Silver customer with 10 seats: https://gitlab.zendesk.com/agent/tickets/143159