Skip to content

Fix sidebar labels scoped label selection bug

What does this MR do and why?

This MR fixes a bug in the sidebar labels widget.

Correct behaviour:

  • When selecting a scoped label, any existing scoped labels are unselected
  • When selecting a scoped label, any existing labels with the same title as the scoped label key are not modified

Incorrect behaviour before:

  • When selecting a scoped label, existing scoped labels might incorrectly stay selected
  • When selecting a scoped label, any existing labels with the same title as the scoped label key are incorrectly unselected

Related to #341121 (closed)

Screenshots or screen recordings

before after
Screen_Recording_2021-09-17_at_6.22.31_pm Screen_Recording_2021-09-17_at_6.33.11_pm

How to set up and validate locally

  1. Visit any group or project issues page such as http://127.0.0.1:3000/h5bp/html5-boilerplate/-/issues/1
  2. Create labels and scoped labels with the same beginning string
  3. Test the sidebar labels widget

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)

Edited by Coung Ngo

Merge request reports