Display issue crm contacts in UI
What does this MR do and why?
This MR adds a new "real-time" widget to the issue page to display the attached crm contacts.
For now we are just display a comma separated list of names with a popover when hovering to show email/phone/description etc if they exist.
Screenshots or screen recordings
Collapsed state without contacts
Collapsed state with contacts
Expanded without contacts
Expanded with contacts
Help text
Realtime amazingness (old video from before component was moved, but ultimately still works in the same "magical" way)
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 a an issue (I used http://gdk.test:3000/flightjs/Flight/-/issues/30)
3. Create a few contacts for the group the issue belongs to:
mutation {
customerRelationsContactCreate(input:
{
groupId: "gid://gitlab/Group/26"
firstName: "Lee"
lastName: "Tickett"
email: "example@gitlab.com"
}) {
contact {
id
firstName
lastName
}
errors
}
}
4. Attempt to add/remove those contacts from your issue:
mutation {
issueSetCrmContacts(input:
{
projectPath: "flightjs/Flight"
iid: "30"
operationMode: REPLACE
crmContactIds: [
"gid://gitlab/CustomerRelations::Contact/14",
"gid://gitlab/CustomerRelations::Contact/12"
]
}) {
issue {
id
customerRelationsContacts {
nodes {
id
firstName
lastName
}
}
}
errors
}
}
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.
Edited by Lee Tickett