Skip to content

Resolve "Display Incident Tag badge in timeline"

What does this MR do and why?

  • Add a badge for timeline event tag that is optional and displayed only when provided
  • refactor spec/frontend/issues/show/components/incidents/timeline_events_item_spec.js to use mountComponent(); in beforeEach() instead of each it() statement

Screenshots or screen recordings

before after
before after_badge_not_visible
before after_badge_visible

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. Provide the timeline text as a single word with a long length (for example 280 characters)
  6. Click "Save" button
  7. To display the tag locally go to app/assets/javascripts/issues/show/components/incidents/timeline_events_list.vue and add :event-tag="Start time" to incident-timeline-event-item component (there is no mechanism for actually adding a tag yet):
<incident-timeline-event-item
  v-else
  :key="event.id"
  :action="event.action"
  :occurred-at="event.occurredAt"
  :note-html="event.noteHtml"
  :event-tag="`Start time`"
  @delete="handleDelete(event)"
  @edit="handleEditSelection(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 #373854 (closed)

Edited by Paulina Sedlak-Jakubowska

Merge request reports