Skip to content

Extend drill-down functionality to all `issuables` Insights charts

What does this MR do and why?

Extends drill-down functionality to all Insights charts whose query.data_source is issuables. Initially, as an MVC, the only charts that had this functionality were "Bugs created per month by Priority" and "Bugs created per month by Severity" on the Issues Dashboard - Bugs created per month report on the Insights page using the default config.

Note: The drill-through pages currently only inherit labels. Inheriting date ranges will be addressed in follow-up issue(s) (e.g., #438652).

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

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screen Recording 2024-01-26 at 6.08.20 PM.mov Screen Recording 2024-01-26 at 6.09.53 PM.mov

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Make sure you have a GitLab Ultimate license
  2. Seed Insights data: NEW_PROJECT=1 bin/rake gitlab:seed:insights:issues
  3. Grab the ID for the new project returned in the terminal by the seeder above and seed Merge Request Analytics: FILTER=productivity_analytics SEED_PRODUCTIVITY_ANALYTICS=1 PROJECT_ID={YOUR_PROJECT_ID} bundle exec rake db:seed_fu
  4. Visit the Issues Dashboard on the Insights page for the your group/project: http://{LOCAL_INSTANCE}/groups/{GROUP_PATH}/-/insights/#/issues or http://{LOCAL_INSTANCE}/{GROUP_PATH}/{PROJECT_PATH}/insights/#/issues
  5. Drill down into all of the charts on both the Issues and Merge Requests dashboards and verify that all is well.
    1. To test a line chart and a bar chart that is not using group_by, please apply the patch below.
    2. Optionally, configure your own Insights charts

Additional Charts

Patch for additional charts
diff --git a/ee/fixtures/insights/default.yml b/ee/fixtures/insights/default.yml
index 8d657ad1d2d1..6c0745a4ec8c 100644
--- a/ee/fixtures/insights/default.yml
+++ b/ee/fixtures/insights/default.yml
@@ -49,6 +49,34 @@ issues:
- S::4
group_by: month
period_limit: 3
+    - title: Bugs created per week by Severity
+      type: line
+      query:
+        data_source: issuables
+        params:
+          issuable_type: issue
+          filter_labels:
+            - bug
+          collection_labels:
+            - S::1
+            - S::2
+            - S::3
+            - S::4
+          group_by: week
+          period_limit: 3
+    - title: Bugs created by Severity
+      type: bar
+      query:
+        data_source: issuables
+        params:
+          issuable_type: issue
+          filter_labels:
+            - bug
+          collection_labels:
+            - S::1
+            - S::2
+            - S::3
+            - S::4
mergeRequests:
title: Merge requests dashboard
charts:

Related to #436704 (closed)

Edited by Rudy Crespo

Merge request reports