Draft: Add available widgets per type
What does this MR do and why?
Adds more information about the widgets that are ssociated with any work item type through the GraphQL API
How to set up and validate locally
Group level
{
group(fullPath: "flightjs") {
workItemTypes {
nodes {
id
name
widgets {
type
... on WorkItemWidgetDefinitionAssignees {
allowsMultipleAssignees
canInviteMembers
}
... on WorkItemWidgetDefinitionLabels {
allowsScopedLabels
}
}
}
}
}
}
Project level
{
project(fullPath: "flightjs/flight") {
workItemTypes {
nodes {
id
name
widgets {
type
... on WorkItemWidgetDefinitionAssignees {
allowsMultipleAssignees
canInviteMembers
}
... on WorkItemWidgetDefinitionLabels {
allowsScopedLabels
}
}
}
}
}
}
Example response
{
"data": {
"project": {
"workItemTypes": {
"nodes": [
{
"id": "gid://gitlab/WorkItems::Type/8",
"name": "Epic",
"widgets": [
{
"type": "ASSIGNEES",
"allowsMultipleAssignees": true,
"canInviteMembers": true
},
{
"type": "DESCRIPTION"
},
{
"type": "HIERARCHY"
},
{
"type": "LABELS",
"allowsScopedLabels": true
},
{
"type": "NOTES"
},
{
"type": "START_AND_DUE_DATE"
},
{
"type": "HEALTH_STATUS"
},
{
"type": "STATUS"
},
{
"type": "NOTIFICATIONS"
},
{
"type": "AWARD_EMOJI"
},
{
"type": "CURRENT_USER_TODOS"
},
{
"type": "LINKED_ITEMS"
}
]
},
{
"id": "gid://gitlab/WorkItems::Type/2",
"name": "Incident",
"widgets": [
{
"type": "ASSIGNEES",
"allowsMultipleAssignees": true,
"canInviteMembers": true
},
{
"type": "DESCRIPTION"
},
{
"type": "HIERARCHY"
},
{
"type": "NOTES"
},
{
"type": "NOTIFICATIONS"
},
{
"type": "CURRENT_USER_TODOS"
},
{
"type": "AWARD_EMOJI"
},
{
"type": "LINKED_ITEMS"
}
]
},
{
"id": "gid://gitlab/WorkItems::Type/1",
"name": "Issue",
"widgets": [
{
"type": "ASSIGNEES",
"allowsMultipleAssignees": true,
"canInviteMembers": true
},
{
"type": "LABELS",
"allowsScopedLabels": true
},
{
"type": "DESCRIPTION"
},
{
"type": "HIERARCHY"
},
{
"type": "START_AND_DUE_DATE"
},
{
"type": "MILESTONE"
},
{
"type": "NOTES"
},
{
"type": "ITERATION"
},
{
"type": "WEIGHT"
},
{
"type": "HEALTH_STATUS"
},
{
"type": "NOTIFICATIONS"
},
{
"type": "CURRENT_USER_TODOS"
},
{
"type": "AWARD_EMOJI"
},
{
"type": "LINKED_ITEMS"
}
]
},
{
"id": "gid://gitlab/WorkItems::Type/7",
"name": "Key Result",
"widgets": [
{
"type": "ASSIGNEES",
"allowsMultipleAssignees": true,
"canInviteMembers": true
},
{
"type": "LABELS",
"allowsScopedLabels": true
},
{
"type": "DESCRIPTION"
},
{
"type": "HIERARCHY"
},
{
"type": "START_AND_DUE_DATE"
},
{
"type": "NOTES"
},
{
"type": "HEALTH_STATUS"
},
{
"type": "PROGRESS"
},
{
"type": "NOTIFICATIONS"
},
{
"type": "CURRENT_USER_TODOS"
},
{
"type": "AWARD_EMOJI"
},
{
"type": "LINKED_ITEMS"
}
]
},
{
"id": "gid://gitlab/WorkItems::Type/6",
"name": "Objective",
"widgets": [
{
"type": "ASSIGNEES",
"allowsMultipleAssignees": true,
"canInviteMembers": true
},
{
"type": "LABELS",
"allowsScopedLabels": true
},
{
"type": "DESCRIPTION"
},
{
"type": "HIERARCHY"
},
{
"type": "MILESTONE"
},
{
"type": "NOTES"
},
{
"type": "HEALTH_STATUS"
},
{
"type": "PROGRESS"
},
{
"type": "NOTIFICATIONS"
},
{
"type": "CURRENT_USER_TODOS"
},
{
"type": "AWARD_EMOJI"
},
{
"type": "LINKED_ITEMS"
}
]
},
{
"id": "gid://gitlab/WorkItems::Type/4",
"name": "Requirement",
"widgets": [
{
"type": "DESCRIPTION"
},
{
"type": "NOTES"
},
{
"type": "STATUS"
},
{
"type": "REQUIREMENT_LEGACY"
},
{
"type": "TEST_REPORTS"
},
{
"type": "NOTIFICATIONS"
},
{
"type": "CURRENT_USER_TODOS"
},
{
"type": "AWARD_EMOJI"
},
{
"type": "LINKED_ITEMS"
}
]
},
{
"id": "gid://gitlab/WorkItems::Type/5",
"name": "Task",
"widgets": [
{
"type": "ASSIGNEES",
"allowsMultipleAssignees": true,
"canInviteMembers": true
},
{
"type": "LABELS",
"allowsScopedLabels": true
},
{
"type": "DESCRIPTION"
},
{
"type": "HIERARCHY"
},
{
"type": "START_AND_DUE_DATE"
},
{
"type": "MILESTONE"
},
{
"type": "NOTES"
},
{
"type": "ITERATION"
},
{
"type": "WEIGHT"
},
{
"type": "NOTIFICATIONS"
},
{
"type": "CURRENT_USER_TODOS"
},
{
"type": "AWARD_EMOJI"
},
{
"type": "LINKED_ITEMS"
}
]
},
{
"id": "gid://gitlab/WorkItems::Type/3",
"name": "Test Case",
"widgets": [
{
"type": "DESCRIPTION"
},
{
"type": "NOTES"
},
{
"type": "NOTIFICATIONS"
},
{
"type": "CURRENT_USER_TODOS"
},
{
"type": "AWARD_EMOJI"
},
{
"type": "LINKED_ITEMS"
}
]
},
{
"id": "gid://gitlab/WorkItems::Type/9",
"name": "Ticket",
"widgets": [
{
"type": "ASSIGNEES",
"allowsMultipleAssignees": true,
"canInviteMembers": true
},
{
"type": "DESCRIPTION"
},
{
"type": "HIERARCHY"
},
{
"type": "LABELS",
"allowsScopedLabels": true
},
{
"type": "MILESTONE"
},
{
"type": "NOTES"
},
{
"type": "START_AND_DUE_DATE"
},
{
"type": "HEALTH_STATUS"
},
{
"type": "WEIGHT"
},
{
"type": "ITERATION"
},
{
"type": "NOTIFICATIONS"
},
{
"type": "AWARD_EMOJI"
},
{
"type": "CURRENT_USER_TODOS"
},
{
"type": "LINKED_ITEMS"
}
]
}
]
}
}
}
}
Work item level
{
workItem(id: "gid://gitlab/WorkItem/<gid>") {
id
namespace {
fullName
}
workItemType {
name
widgets {
type
... on WorkItemWidgetDefinitionAssignees {
allowsMultipleAssignees
canInviteMembers
}
... on WorkItemWidgetDefinitionLabels {
allowsScopedLabels
}
}
}
}
}
Example response
{
"data": {
"workItem": {
"id": "gid://gitlab/WorkItem/680",
"namespace": {
"fullName": "Flightjs"
},
"workItemType": {
"name": "Issue",
"widgets": [
{
"type": "ASSIGNEES",
"allowsMultipleAssignees": true,
"canInviteMembers": false
},
{
"type": "LABELS",
"allowsScopedLabels": true
},
{
"type": "DESCRIPTION"
},
{
"type": "HIERARCHY"
},
{
"type": "START_AND_DUE_DATE"
},
{
"type": "MILESTONE"
},
{
"type": "NOTES"
},
{
"type": "ITERATION"
},
{
"type": "WEIGHT"
},
{
"type": "HEALTH_STATUS"
},
{
"type": "NOTIFICATIONS"
},
{
"type": "CURRENT_USER_TODOS"
},
{
"type": "AWARD_EMOJI"
},
{
"type": "LINKED_ITEMS"
}
]
}
}
}
}
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 Mario Celi