Skip to content

Move OnCall Schedules timezone to the shared Timezone Dropdown

What does this MR do and why?

  1. Migrates custom GlDropdown in creating oncall schedule modal, to a shared TimezoneDropdown. There is a slight difference in formatting ([] instead of () for UTM) - I decided to keep it as is for consistency across application (see CI/CD > Schedules > New Schedule for reference).
  2. Adds a dropdownClass property to customise shared dropdown. In case of oncall form, extra margin did not allow to display validation message directly under the box. Hence the addition and reset to 0px.
  3. Adds a unit test to TimezoneDropdown for marking selected timezone.

Screenshots or screen recordings

before after
before_empty_form after_empty_form
before_validation_error after_validation_error
before_timezone_selected_dropdown_close after_timezone_selected_dropdown_close
before_timezone_selected_dropdown_open after_timezone_selected_dropdown_open
before_search_no_results after_search_no_results
before_search_results after_search_results

How to set up and validate locally

Prerequisite:

  • This is a premium feature
  • You must have at least the Maintainer role.

To open create an on-call schedule modal:

  1. On the top bar, select Main menu > Projects and find your project.
  2. On the left sidebar, select Monitor > On-call Schedules.
  3. Select Add a schedule.
  4. Enter the schedule’s name and description and select a time zone.

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 #378631 (closed)

Edited by Paulina Sedlak-Jakubowska

Merge request reports