Creating a new MR approval rule in a new project duplicates entry
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=536584) </details> <!--IssueSummary end--> <!--- Please read this! Before opening a new issue, make sure to search for keywords in the issues filtered by the "regression" or "type::bug" label: - https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=regression - https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=type::bug and verify the issue you're about to submit isn't a duplicate. ---> ### Summary When creating a new MR approval rule in a new project with `Approvals required` greater than `0`, the current row gets duplicated. This row disappears after a refresh of the page. ### Steps to reproduce - Create a new project - Go to `Settings` -> `Merge Requests` -> `Merge request approvals`, and change the value for `Approvals required` from `0` to `1`. This will create a duplicate line, which will disappear when refreshing the browser. ### Example Project This happened for my example project with project ID `69064828`, but also for all other new projects in the same subgroup. However, as the duplicate line disappears after a refresh of the page, it is no longer visible. See screenshot attached to this ticket of when it happened. ### What is the current *bug* behavior? See above. When creating a new MR approval rule in a new project with `Approvals required` greater than `0`, the current row gets duplicated. This row disappears after a refresh of the page. ### What is the expected *correct* behavior? When creating a new MR approval rule in a new project with `Approvals required` greater than `0`, the current row should not get duplicated. ### Relevant logs and/or screenshots <!-- Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise. --> ![Screenshot_2025-04-17_at_14.49.39](/uploads/5aff4a457aaab34eec27b39ad3e0a928/Screenshot_2025-04-17_at_14.49.39.png) ### Output of checks <!-- If you are reporting a bug on GitLab.com, uncomment below --> This bug happens on GitLab.com <!-- and uncomment below if you have /label privileges --> <!-- /label ~"reproduced on GitLab.com" --> <!-- or follow up with an issue comment of `@gitlab-bot label ~"reproduced on GitLab.com"` if you do not --> <!-- If you don't have /label privileges, follow up with an issue comment of `@gitlab-bot label ~"type::bug"` -->
issue