Skip to content

Resolve "Add Incident Tag to the 'add item' and 'edit item' forms"

What does this MR do and why?

Create timeline event form

  • Adds a dropdown with multiple select options for event tags
  • Fills event note with default note, when tag is selected and note is empty
  • Allows for creating an event with or without tags

Edit timeline event form

  • Allows for changing tags per event

Timeline event list

  • Passes first event tag to the list item component

Notes

I decided to allow multi select option on the dropdown, even though we now have only "Start time" and "End time" on the list and they may be contradictory. However, dropdown returns a different data structure with multi select option and this will save us going back to all occurrences and unit tests, when adding more option. Whats more, adding more options will probably come in the following milestone anyways.

I also decided not to manipulate the event note, as there would be too many edge cases. This means that it is possible to create event with default event after selecting "Start time" tag. Then change the tag to "End time" but still have the default start note.

Since I used a new dropdown component - GlListbox - it looks a bit different than the one on design.

Screenshots or screen recordings

description before after
create event form before_create_event_without_select after_create_event_with_select
+ select one tag & default note added after_create_event_with_one_option
+ select multiple tags after_create_event_with_multiple_options
event added to the list before_timeline_event_without_badge after_timeline_event_with_badge
edit event form before_edit_event_without_tag_select after_edit_event_with_deselected_options

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. Select an event tag. You can than customise the event note and/or select another tag.
  6. Click "Save" button
  7. For newly created event item, click "More" button and choose "Edit"
  8. Change event tags, by selecting/deselecting them within the dropdown.
  9. Click "Save" button

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