Skip to content

VSA Apply vsa filter bar to tasks by type chart

What does this MR do and why?

Reintroduces the changes orginally introduced in !91734 (merged). With the resolution of #368994 (closed), we have a fix for selecting multiple labels.

Previously the tasks by type chart contained its filters for labels and task type (issues / merge requests). The VSA page has a filter bar, but the values in the filter bar did not apply to the chart. This MR removes the label selector and ensures:

  • We apply the VSA filter bar values to the chart data
  • We fall back to the "top ranked labels" if there are no selected labels in the filter bar
  • We dont fetch the chart data when there are no labels for the group

Notes

  • The tasks by type chart endpoint requires at least 1 label to be selected
  • This MR is blocked by !95018 (merged)

Screenshots or screen recordings

Recording

updated-task-by-type-filters

Screenshots

Before After After - multiple labels
Screen_Shot_2022-07-15_at_11.20.34_pm Screen_Shot_2022-07-15_at_11.17.46_pm Screen_Shot_2022-08-10_at_4.59.38_pm

How to set up and validate locally

Creating a group level value stream

  1. Ensure you have an EE license, or stub the cycle_analytics_for_groups license feature to true
  2. Create a group
  3. Create a project within a group (I recommend creating a project from a template such as the rails template)
  4. Create a custom value stream for the new group you created
    Note: The first time you create a value stream in a group, a data aggregation needs to run, in gdk this is usually ~10mins, proceed to make a coffee in the meantime, relax 😎

Seeding data for the chart

  1. Seed some test VSA data

    $ VSA_SEED_PROJECT_ID=<project-id> VSA_ISSUE_COUNT=10 SEED_VSA=true FILTER=cycle_analytics rake db:seed_fu
  2. Create some group labels

  3. Assign labels to the newly created issues

  4. Navigate to the group value stream you created

  5. Apply filters in the filter bar at the top of the page

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

Edited by Ezekiel Kigbo

Merge request reports

Loading