Draft: Add CurrentUserTodos widget
What does this MR do and why?
Related issue: #393784 (closed)
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
-
Feature.enable(:multiple_todos)
if you want to test with multiple todos for a work item - Create an OKR, or any other work item (like Tasks) and get the global Work Item ID
- Use the following GraphQL queries and mutations to test the feature:
query pendingTodos {
workItem(id: "gid://gitlab/WorkItem/740") {
id
workItemType {
id
name
}
widgets {
... on WorkItemWidgetCurrentUserTodos {
currentUserTodos(state:pending) {
edges {
node {
id
state
}
}
}
}
}
}
}
query doneTodos {
workItem(id: "gid://gitlab/WorkItem/740") {
id
workItemType {
id
name
}
widgets {
... on WorkItemWidgetCurrentUserTodos {
currentUserTodos(state:done) {
edges {
node {
id
state
}
}
}
}
}
}
}
mutation markAllTodosAsDone {
workItemUpdate(input:{
id:"gid://gitlab/WorkItem/740",
currentUserTodosWidget:{
action:MARK_AS_DONE
}
}) {
clientMutationId
}
}
mutation markTodoAsDone {
workItemUpdate(input:{
id:"gid://gitlab/WorkItem/740",
currentUserTodosWidget:{
todo_id: "gid://gitlab/Todo/40",
action:MARK_AS_DONE
}
}) {
clientMutationId
}
}
mutation addNewTodo {
workItemUpdate(input:{
id:"gid://gitlab/WorkItem/740",
currentUserTodosWidget:{
action:ADD
}
}) {
clientMutationId
}
}
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 Nicolas Dular