Hide /remove_contacts if issue has no contacts
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
How to set up and validate locally
https://docs.gitlab.com/ee/user/crm/
- Enable CRM group setting for a root group
- Create at least 1 contact in the group (if your db hasn't already been seeded with contacts)
- Find an issue in the group (if it's in a subgroup, you'll need to enable CRM there too)
- Check the
/remove_contacts
quick action isn't available - Add a contact to the issue using the
/add_contacts
quick action - 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #2256