Skip to content

Add total flow items for groups VSD

Felipe Cardozo requested to merge isseu_396963_draft into master

What does this MR do and why?

Backend part to include total flow items metrics for groups value streams dashboard.

The metric is the sum of:

  1. total open issues
  2. total issues closed
  3. total open mrs
  4. count total mrs merged

More details at #396963

How to set up and validate locally

The metric is not present in the UI yet, but it is possible to verify it by opening a group VSD page and checking the browser API calls responses.

  1. Make sure to have an ultimate license
  2. Create a group with a project
  3. Open some issues and MRs within the project
  4. Close some of the opened issues and merge some of the MRs and run Analytics::CycleAnalytics::ReaggregationWorker.new.perform on rails console
  5. Execute the following query at GraphiQL explorer:
 query groupTotalFlow{
  group(fullPath: "GROUP_PATH") {
    flowMetrics {
      totalFlow(from: "2023-03-1", to: "2023-06-1") { // make sure dates match issuables creation/closing
        value
        identifier
        title
        unit
      }
     }
   }
 }

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 Felipe Cardozo

Merge request reports