Skip to content

Support contact quick actions in issue description

Lee Tickett requested to merge 2256-fix-crm-contact-quick-actions into master

What does this MR do and why?

We only currently support crm contact quick action in notes. This MR adds support for issue description on create and update.

Screenshots or screen recordings

contact_quick_action_in_issue_description

How to set up and validate locally

From rails console:
1. Enable feature flag:
Feature.enable(:customer_relations)
From GraphiQL (http://gdk.test:3000/-/graphql-explorer):
2. Pick an issue (I used http://gdk.test:3000/flightjs/Flight/-/issues/30)
4. Create a few contacts for the group the issue belongs to (attaching them to the organizations you just created):
mutation {
  customerRelationsContactCreate(input:
    {
      groupId: "gid://gitlab/Group/26"
      firstName: "Lee"
      lastName: "Tickett"
      email: "example@gitlab.com"
    }) {
    contact {
      id
      firstName
      lastName
    }
    errors
  }
}
6. Attempt to create an issue using quick action /add_contacts email1 email2
7. Attempt to edit an issue using quick action /add_contacts email1 email2
8. Attempt to edit an issue using quick action /remove_contacts email1 email2

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

Edited by Lee Tickett

Merge request reports