Skip to content

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
before_timeline_list after_incident_tags_timeline_list

How to set up and validate locally

  1. Navigate to Monitor > Incidents page
  2. Create new or open an existing incident
  3. Navigate to Timeline tab of the incident
  4. Click "Add new timeline event" button at the bottom
  5. 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.

Related to #373854 (closed)

Edited by Paulina Sedlak-Jakubowska

Merge request reports