Skip to content

Fix sidebar labels scoped label selection bug

Coung Ngo requested to merge 341121-scoped-label-fi into master

What does this MR do and why?

This MR fixes a sidebar labels scoped label selection bug.

When a scoped label is currently selected in the label dropdown, then if another scoped label from the same set is picked then the currently selected scoped label is sometimes not unselected. This happens because currently the code finds the first scoped label and unchecks it but it doesn't check that it's a selected scoped label. The correct logic is that only one scoped label in a set of scoped labels should ever selected at one time.

A fix for this was merged recently but was reverted as it missed one scenario described in !72111 (comment 707425645) and caught in a QA test.

Screenshots or screen recordings

Screen_Recording_2021-10-20_at_12.29.08_pm

How to set up and validate locally

  1. Visit any issue page such as http://127.0.0.1:3000/h5bp/html5-boilerplate/-/issues/1
  2. Test the labels dropdown

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

Merge request reports