Inactive CRM contacts are still available on the quick action
Summary
A CRM contact marked as inactive can still be found when using the /add_contacts
quick action.
Steps to reproduce
- Enable the CRM feature on the root group
- Add some contacts
- Mark a contact as inactive
- Go to an issue and use the
/add_contacts
quick action - The suggestions will show all the contacts, including the inactive ones
What is the current bug behavior?
A CRM contact marked as inactive can still be found when using the /add_contacts
quick action.
What is the expected correct behavior?
Inactive CRM contacts should not be present in the /add_cotnacts
quick action suggestions
Possible fixes
Change the call to Crm::ContactsFinder
in https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/services/projects/autocomplete_service.rb#L37 to filter the contacts by their status.