Skip to content

Labels as a facet - backend tweaks - part 1

Tomas Bulva requested to merge labels-as-a-facet-backend-tweaks into master

What does this MR do and why?

Related to #369541 (closed)

This MR is adding one small missing piece to connect the frontend part of the labels filter to the backend. Allows to filter the results based on the filter attr in the URL.

parts status
Labels as a facet - backend tweaks - part 1 merged 👈
Labels as a facet - minor visual updates - part 2 merged
Labels as a facet - state update - part 3 merged
Labels as a facet - new component - part 4 in review

Screenshots or screen recordings

This is a technical depth. There are no visible changes. The below screenshot is the final results of all parts.

header
Screenshot_2023-05-12_at_12.29.17

How to set up and validate locally

  1. Enable ff
    Feature.enable(:search_issue_label_aggregation)
  2. set up gdk for elasticsearch
  3. enable advanced search and index everything
  4. find a project where you have issues
  5. create a project label
  6. add the label to one of the issues
  7. find the label id of the newly created label (below assumes the id is 77): Project.find(7).labels
  8. http://gdk.test:3000/search?scope=issues&search=*&labels%5B%5D=77
  9. This should limit results to only issues containing tag id 77

Note: this MR contains only the backend changes so you will not be able to interact with this using the frontend (only through the URL params)

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 Tomas Bulva

Merge request reports

Loading