Skip to content

Do not count group level issues on usage trends

Felipe Artur requested to merge issue_451280 into master

What does this MR do and why?

Do not count group-level issues on usage trends. Prevents users from having spikes on their reports when we backfill epics into issues table. This MR does not change the current behavior as group-level issues are not GA yet.

related to #451280 (closed)

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.

How to set up and validate locally

  1. Enable :epic_creation_with_synced_work_item feature flag
  2. Apply the diff below to your local environment
--- a/app/workers/analytics/usage_trends/count_job_trigger_worker.rb
+++ b/app/workers/analytics/usage_trends/count_job_trigger_worker.rb
@@ -27,7 +27,7 @@ def perform
 
         perform_in = DEFAULT_DELAY.minutes.from_now
         worker_arguments.each do |args|
-          CounterJobWorker.perform_in(perform_in, *args)
+          CounterJobWorker.new.perform(*args)
 
           perform_in += DEFAULT_DELAY
         end
  1. Open rails console and execute Analytics::UsageTrends::CountJobTriggerWorker.new.perform
  2. Check the value of the last issue count Analytics::UsageTrends::Measurement.where(identifier: 'issues').last and take a note of that number
  3. Go to any group and create a new epic, this will also create a new group-level issue
  4. Execute the command for step 4, the value should be unchanged

Merge request reports