diff options
author | James Lopez <james@jameslopez.es> | 2016-12-02 17:09:29 +0100 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-01-17 11:32:55 +0100 |
commit | b214be493d9f179d4a929ee32d94a336da7b38f1 (patch) | |
tree | f669ed4d895e4e97cb050e22e210fe90cb57ba0d /lib/gitlab/cycle_analytics/plan_stage.rb | |
parent | daa4f3ded718f4144877b7f0402bd495151c28de (diff) | |
download | gitlab-ce-b214be493d9f179d4a929ee32d94a336da7b38f1.tar.gz |
big refactor based on MR feedback
Diffstat (limited to 'lib/gitlab/cycle_analytics/plan_stage.rb')
-rw-r--r-- | lib/gitlab/cycle_analytics/plan_stage.rb | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/lib/gitlab/cycle_analytics/plan_stage.rb b/lib/gitlab/cycle_analytics/plan_stage.rb index 5e6dd30d9e3..de2d5aaeb23 100644 --- a/lib/gitlab/cycle_analytics/plan_stage.rb +++ b/lib/gitlab/cycle_analytics/plan_stage.rb @@ -1,15 +1,20 @@ module Gitlab module CycleAnalytics class PlanStage < BaseStage - def description - "Time before an issue starts implementation" + def initialize(*args) + @start_time_attrs = [issue_metrics_table[:first_associated_with_milestone_at], + issue_metrics_table[:first_added_to_board_at]] + @end_time_attrs = issue_metrics_table[:first_mentioned_in_commit_at] + + super(*args) end - def median - @fetcher.median(:plan, - [Issue::Metrics.arel_table[:first_associated_with_milestone_at], - Issue::Metrics.arel_table[:first_added_to_board_at]], - Issue::Metrics.arel_table[:first_mentioned_in_commit_at]) + def stage + :code + end + + def description + "Time before an issue starts implementation" end end end |