Skip to content

Fix label filter by name for search

Terri Chu requested to merge 497148-fix-label-search-by-name into master

What does this MR do and why?

Related to #497148 (closed)

This MR fixes a bug in how labels are looked up by name.

The bug occurs when a project within a subgroup is searched with a group label from an ancestor.

Additionally search has a unique problem where an array of group_ids or project_ids is passed in. Handling an array of ids isn't supported by LabelsFinder.

The MR changes to call LabelsFinder for each ID passed in the group_ids array and each ID in the project_ids array.

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

N/A

How to set up and validate locally

  1. setup elasticsearch for gdk
  2. add a top level group, a sub group, and a project within the subgroup (Group A - Group B - Project B)
  3. create a group label in Group A
  4. add 2 issues in project B
  5. label one issue with the label
  6. perform an issues search at all levels and filter by the label
  • global
  • group
  • project
  1. verify only the labeled issue comes back in search results at all levels
Edited by Terri Chu

Merge request reports

Loading