diff options
author | Małgorzata Ksionek <mksionek@gitlab.com> | 2019-07-04 19:11:20 +0300 |
---|---|---|
committer | Małgorzata Ksionek <mksionek@gitlab.com> | 2019-07-10 15:57:20 +0300 |
commit | 0251316ac28984994ac045861e1ca7ee264f8142 (patch) | |
tree | cb0c536c9bfe283acf278c541e2dc3fd96d11e81 | |
parent | 8f04f316ab29ec52f65ebf1886ff7a183eab311f (diff) |
Update plan and review stage
-rw-r--r-- | lib/gitlab/cycle_analytics/plan_event_fetcher.rb | 5 | ||||
-rw-r--r-- | lib/gitlab/cycle_analytics/plan_helper.rb | 1 | ||||
-rw-r--r-- | lib/gitlab/cycle_analytics/review_event_fetcher.rb | 5 |
3 files changed, 7 insertions, 4 deletions
diff --git a/lib/gitlab/cycle_analytics/plan_event_fetcher.rb b/lib/gitlab/cycle_analytics/plan_event_fetcher.rb index 49a6b099f34..90605b5aa16 100644 --- a/lib/gitlab/cycle_analytics/plan_event_fetcher.rb +++ b/lib/gitlab/cycle_analytics/plan_event_fetcher.rb @@ -10,7 +10,8 @@ module Gitlab issue_table[:iid], issue_table[:id], issue_table[:created_at], - issue_table[:author_id]] + issue_table[:author_id], + projects_table[:name]] super(*args) end @@ -18,7 +19,7 @@ module Gitlab private def serialize(event) - AnalyticsIssueSerializer.new(project: project).represent(event) + AnalyticsIssueSerializer.new(serialization_context).represent(event) end def allowed_ids_finder_class diff --git a/lib/gitlab/cycle_analytics/plan_helper.rb b/lib/gitlab/cycle_analytics/plan_helper.rb index ae578d45ad5..95662b0c165 100644 --- a/lib/gitlab/cycle_analytics/plan_helper.rb +++ b/lib/gitlab/cycle_analytics/plan_helper.rb @@ -5,6 +5,7 @@ module Gitlab module PlanHelper def stage_query(project_ids) query = issue_table.join(issue_metrics_table).on(issue_table[:id].eq(issue_metrics_table[:issue_id])) + .join(projects_table).on(issue_table[:project_id].eq(projects_table[:id])) .project(issue_table[:project_id].as("project_id")) .where(issue_table[:project_id].in(project_ids)) .where(issue_table[:created_at].gteq(options[:from])) diff --git a/lib/gitlab/cycle_analytics/review_event_fetcher.rb b/lib/gitlab/cycle_analytics/review_event_fetcher.rb index d31736e755d..aa3752a3c29 100644 --- a/lib/gitlab/cycle_analytics/review_event_fetcher.rb +++ b/lib/gitlab/cycle_analytics/review_event_fetcher.rb @@ -11,7 +11,8 @@ module Gitlab mr_table[:id], mr_table[:created_at], mr_table[:state], - mr_table[:author_id]] + mr_table[:author_id], + projects_table[:name]] super(*args) end @@ -19,7 +20,7 @@ module Gitlab private def serialize(event) - AnalyticsMergeRequestSerializer.new(project: project).represent(event) + AnalyticsMergeRequestSerializer.new(serialization_context).represent(event) end def allowed_ids_finder_class |