Skip to content

Reset environments list when opening CI variable drawer

Mireya Andres requested to merge ma/fix-env-scope-reset-bug into master

What does this MR do and why?

Resolves #428429 (closed).

There is a bug in the environment scope dropdown

This is an existing bug that also occurs in the CI variable modal, but since we're phasing the modal out for the drawer and this bug can be , I think we can just focus on fixing the bug on the drawer.

Screenshots or screen recordings

Before After
Screen_Recording_2023-10-17_at_15.56.10 Screen_Recording_2023-10-17_at_16.08.28

How to set up and validate locally

  1. Go to Settings > CI/CD > Variables.
  2. Add a CI variable.
  3. In the environment scope dropdown, enter an environment that doesn't exist yet. This will cause a search request which returns an empty result.
  4. Close the form and re-open it.
  5. The environment scope dropdown should reset the environments list to the default (it should not be empty).

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Mireya Andres

Merge request reports