Resolve "Add Incident Tag to the timeline events list"
What does this MR do and why?
Timeline event list
- Fetches any tags associated with a timeline item
- Maps fetched events to have an array of tags from received object
- Passes first event tag to the list item component
Screenshots or screen recordings
before | after |
---|---|
![]() |
![]() |
How to set up and validate locally
- Navigate to Monitor > Incidents page
- Create new or open an existing incident
- Navigate to Timeline tab of the incident
- Click "Add new timeline event" button at the bottom
- If any existing event had tags saved, they should be visible next to the timestamp.
How to create a tag in the GraphQL Explorer with a query:
mutation CreateTimelineEvent($input: TimelineEventCreateInput!) {
timelineEventCreate(input: $input) {
timelineEvent {
id
note
noteHtml
action
occurredAt
createdAt
timelineEventTags {
nodes {
id
name
}
}
}
errors
}
}
variables:
{
"input": {
"incidentId": "gid://gitlab/Issue/449",
"note": "test",
"occurredAt": "2022-12-16T04:51:00.000Z",
"timelineEventTagNames": ["Start time"]
}
}
Also note that you'll have to update the incidentId to an id that exists on a project in your gdk
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.
Related to #373854 (closed)
Edited by Paulina Sedlak-Jakubowska