Fix CRM issue filters when contacts not sourced from root group

What does this MR do and why?

Fix CRM issue filters when contacts not sourced from root group

Changelog: fixed

References

Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

MR acceptance checklist

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

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

  1. Create a root group my-company
  2. Create a subgroup contacts
  3. Set the contacts group as the contact source for my-company: https://docs.gitlab.com/ee/user/crm/#configure-the-contact-source
  4. Create a contact and linked organization in contacts
  5. Create a project product-a in my-company
  6. Create an issue in product-a and add the contact (using the /add_contacts quick action
  7. Create another issue in product-a without a contact assigned
  8. Give a user planner+ access to contacts guest+ access to product-a is required (unless it's a public project/group in which case no access is required)
  9. While impersonating the user, ensure you can filer the issue list for the contact and only the issue with that contact assigned is returned

Related to #516945 (closed)

Edited by Lee Tickett

Merge request reports

Loading