diff --git a/app/models/cycle_analytics.rb b/app/models/cycle_analytics.rb index 78aebd828d7..37ac56310ef 100644 --- a/app/models/cycle_analytics.rb +++ b/app/models/cycle_analytics.rb @@ -32,7 +32,7 @@ class CycleAnalytics def stats_per_stage STAGES.map do |stage_name| - self[stage_name].new(project: @project, options: @options).median_data + self[stage_name].median_data end end end diff --git a/lib/gitlab/cycle_analytics/issue_event_fetcher.rb b/lib/gitlab/cycle_analytics/issue_event_fetcher.rb index 0d8da99455e..69ba7c3cc9c 100644 --- a/lib/gitlab/cycle_analytics/issue_event_fetcher.rb +++ b/lib/gitlab/cycle_analytics/issue_event_fetcher.rb @@ -1,23 +1,6 @@ module Gitlab module CycleAnalytics class IssueEventFetcher < BaseEventFetcher - include IssueAllowed - - def initialize(*args) - @projections = [issue_table[:title], - issue_table[:iid], - issue_table[:id], - issue_table[:created_at], - issue_table[:author_id]] - - super(*args) - end - - private - - def serialize(event) - AnalyticsIssueSerializer.new(project: @project).represent(event).as_json - end end end end diff --git a/lib/gitlab/cycle_analytics/production_event_fetcher.rb b/lib/gitlab/cycle_analytics/production_event_fetcher.rb index b7eff7d22f4..882e780874f 100644 --- a/lib/gitlab/cycle_analytics/production_event_fetcher.rb +++ b/lib/gitlab/cycle_analytics/production_event_fetcher.rb @@ -1,6 +1,6 @@ module Gitlab module CycleAnalytics - class ProductionEventFetcher < BaseEventFetcher + class ProductionEventFetcher < IssueEventFetcher include IssueAllowed def initialize(*args)