Reviewer is removed when adding new reviewer when at MAX_NUMBER_OF_ASSIGNEES_OR_REVIEWERS limit

Summary

Steps to reproduce

-Change MAX_NUMBER_OF_ASSIGNEES_OR_REVIEWERS = 4 in /gitlab/app/models/merge_request.rb

[5] pry(main)> Feature.enable(:limit_reviewer_and_assignee_size)

-restart gdk

-Open MR with 4 reviewers

-In the right-hand side side bar select an additional reviewer. OR -In the edit dialog page for a MR select an additional reviewer.

Example Project

What is the current bug behavior?

-New reviewer is added, a (arbitrary?) user is removed from the review. Screen_Recording_2022-08-30_at_10.47.11

What is the expected correct behavior?

Error stating that the MR has reached the maximum number of reviewers, similar to the error that occurs with quick actions Screen_Shot_2022-08-30_at_10.46.09

Results of GitLab environment info

Using version 1ca77cd9

Edited by Jay McCure