Support label_name in addition to labels param
What does this MR do and why?
Related to #467387 (closed)
Add backend support for issues label filter param label_name
. The old param labels
still works but will prefer label_name
if provided.
The labels
param will be removed in #470402 (closed)
A few things to note:
- label name in the URL is case sensitive
- no differentiation in selecting project or group label if the name is identical
- project level searches will also return issues with group labels if the name matches
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
No UI difference, but here is a few screenshots of it working
labels
passed
label_name
passed
label_name
and labels
passed
How to set up and validate locally
I tested a few variations of labels:
- group label named
GroupLabel
- project label named
ProjectLabel
- group and project label both named
Duplicate
-
setup elasticsearch for gdk, enable, and index everything
-
create group and project labels in a group/project
-
add group and project labels to issue(s)
-
perform a group issues search (search or go to). the labels filter will populate.
-
select one or more labels and apply
-
run the same search but replace in the URL
labels
with thelabel_name
param. Note: the label name is case sensitive -
run the same search with both params (will need one of the label ids)