Skip to content

Alert user when no users were added to group/project.

What does this MR do?

Show an alert to the user when no users were selected for adding to a group/project.

Are there points in the code the reviewer needs to double check?

I had to do some trickery with user/member in the tests, I mimicked the style from the same file with find_by_id etc. Also, I made a small change to window.disableButtonIfEmptyField, which shouldn't affect other code but is worth an extra look.

Why was this MR needed?

There was an inconsistent, confusing UI when signalling the adding of users to a group/project. It is mitigated by improving the feedback to make it more consistent and similar in groups and projects, as well as alleviating the need for later feedback by disabling the submit button unless users are added. Also, there were gaps in the test coverage which this MR improves.

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #22967 (closed) and #23270 (closed).

Merge request reports