Skip to content

Hide /remove_contacts if issue has no contacts

Lee Tickett requested to merge 2256-improve-remove-contacts-quick-action into master

What does this MR do and why?

We were displaying the /remove_contacts quick action if the feature is enabled and the group has contacts.

But it makes no sense to display the quick action if there are no contacts on the issue to remove.

This MR fixes that behaviour.

A future MR will look to only list the attached contacts in the autocomplete list

Screenshots or screen recordings

image

image

How to set up and validate locally

https://docs.gitlab.com/ee/user/crm/

  1. Enable CRM group setting for a root group
  2. Create at least 1 contact in the group (if your db hasn't already been seeded with contacts)
  3. Find an issue in the group (if it's in a subgroup, you'll need to enable CRM there too)
  4. Check the /remove_contacts quick action isn't available
  5. Add a contact to the issue using the /add_contacts quick action
  6. Check the /remove_contacts quick action is now available

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #2256

Merge request reports