debian-mirror-gitlab/lib/gitlab/cycle_analytics/production_stage.rb

39 lines
823 B
Ruby
Raw Normal View History

2019-02-15 15:39:39 +05:30
# frozen_string_literal: true
2017-08-17 22:00:37 +05:30
module Gitlab
module CycleAnalytics
class ProductionStage < BaseStage
include ProductionHelper
def start_time_attrs
@start_time_attrs ||= issue_table[:created_at]
end
def end_time_attrs
@end_time_attrs ||= mr_metrics_table[:first_deployed_to_production_at]
end
def name
:production
end
def title
2020-03-13 15:44:24 +05:30
s_('CycleAnalyticsStage|Total')
2017-08-17 22:00:37 +05:30
end
def legend
_("Related Issues")
end
def description
_("From issue creation until deploy to production")
end
def query
# Limit to merge requests that have been deployed to production after `@from`
query.where(mr_metrics_table[:first_deployed_to_production_at].gteq(@from))
end
end
end
end