Do not count group level issues on usage trends
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
- Enable
:epic_creation_with_synced_work_item
feature flag - 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
- Open rails console and execute
Analytics::UsageTrends::CountJobTriggerWorker.new.perform
- Check the value of the last issue count
Analytics::UsageTrends::Measurement.where(identifier: 'issues').last
and take a note of that number - Go to any group and create a new epic, this will also create a new group-level issue
- Execute the command for step 4, the value should be unchanged