Scope project participants by current organization

What does this MR do and why?

When querying project participants the groups were not scoped by Organization. This MR scopes the groups by the project's Organization.

Query Changes

Before, without WHERE organization_id = 1 - https://postgres.ai/console/gitlab/gitlab-production-main/sessions/41521/commands/127532

After, with WHERE organization_id = 1 - https://postgres.ai/console/gitlab/gitlab-production-main/sessions/41521/commands/127531

Screenshots or screen recordings

Before After
Screenshot_2025-07-08_at_1.12.34_PM Screenshot_2025-07-08_at_1.13.04_PM

How to set up and validate locally

Enable the following feature flags in development:

Feature.enable :allow_organization_creation
Feature.enable :organization_switching
Feature.enable :ui_for_organizations
  1. Create an Organization
  2. Visit the Organization by selecting it in the sidebar dropdown (near the top)
  3. Create a group within that Organization
  4. Create a project within that group
  5. Within the project visit the new issue form
  6. Type @ in the issue description and note the listed participants are very limited

You can do the same in the Default Organization and you will see a much larger list of participants.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Closes #553917 (closed)

Edited by Alex Pooley

Merge request reports

Loading