Add toggle action to award emoji update mutation
What does this MR do and why?
As discussed in this comment, we need to add the toggle action to our award emoji update mutation, in order to be able to consume
it when we add an /award
quick action for work items (#412275 (closed))
Screenshots or screen recordings
Screen_Recording_2023-09-11_at_22.02.15
How to set up and validate locally
- Using the rails console, create a work item:
user = User.first
project = Project.first
WorkItem.create!(project: project, author: user, title: 'Test Work Item Emoji Award')
- Visit
GDK_URL/-/graphql-explorer
and enter the following query:
mutation toggleWorkItemEmojiAward {
workItemUpdate(input: {id: "gid://gitlab/WorkItem/$WORK_ITEM_ID", awardEmojiWidget: { action: TOGGLE, name: "rocket"}}) {
workItem {
id
widgets{
... on WorkItemWidgetAwardEmoji {
upvotes
downvotes
awardEmoji {
edges {
node {
name
user {
id
}
}
}
}
}
}
}
errors
}
}
- Visit the work item and verify that the
🚀 emoji award is toggled on/off when the graphql query is executed repeatedly
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 Joseph Wambua