summaryrefslogtreecommitdiff
path: root/lib/gitlab/cycle_analytics/plan_stage.rb
blob: 0b27d114f521757d761de09e2a8e6939d137f180 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# frozen_string_literal: true

module Gitlab
  module CycleAnalytics
    class PlanStage < BaseStage
      include PlanHelper

      def start_time_attrs
        @start_time_attrs ||= [issue_metrics_table[:first_associated_with_milestone_at],
                               issue_metrics_table[:first_added_to_board_at]]
      end

      def end_time_attrs
        @end_time_attrs ||= issue_metrics_table[:first_mentioned_in_commit_at]
      end

      def name
        :plan
      end

      def title
        s_('CycleAnalyticsStage|Plan')
      end

      def legend
        _("Related Issues")
      end

      def description
        _("Time before an issue starts implementation")
      end
    end
  end
end