Skip to content

Add a Tag Name filter to the Incident Timeline API

What does this MR do and why?

Adds a 'Tag Name' filter to the Incident Timeline GraphQL API.

Query plan: !109293 (comment 1325355202)

Issue: #360009

Screenshots or screen recordings

No visual changes.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Set up data:

  1. Navigate to -> Monitor -> Incidents
  2. Create or edit an incident.
  3. Navigate to the Timeline tab.
  4. Add a few timeline items, including one with the tag 'Start Time'.

Query the API:

  1. Navigate to the graphql explorer
  2. Paste in the following query and data:
    • Click to expand Query
      query timelineQueryWithTagFilter($fullPath: ID!, $incidentId: IssueID!, $tagName: String) {
        project(fullPath: $fullPath) {
          id
          incidentManagementTimelineEvents(incidentId: $incidentId, tagName: $tagName) {
            nodes {
              id
              note
              timelineEventTags {
                nodes {
                  id
                  name
                }
              }
            }
          }
        }
      }
    • Click to expand Query Variables
      {
        "fullPath": "flightjs/Flight (Project  ID)",
        "incidentId": "gid://gitlab/Issue/<issue id",
        "tagName": "Start time"
      }
  3. Ensure the result includes the 'Start Time' incident timeline event.

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 #360009

Edited by Tristan Read

Merge request reports