Module: Analytics::CycleAnalytics::StageEventModel

Extended by:
ActiveSupport::Concern
Included in:
IssueStageEvent, MergeRequestStageEvent
Defined in:
app/models/concerns/analytics/cycle_analytics/stage_event_model.rb

Instance Method Summary collapse

Instance Method Details

#issuable_idObject


43
44
45
# File 'app/models/concerns/analytics/cycle_analytics/stage_event_model.rb', line 43

def issuable_id
  attributes[self.class.issuable_id_column.to_s]
end

#total_timeObject


47
48
49
# File 'app/models/concerns/analytics/cycle_analytics/stage_event_model.rb', line 47

def total_time
  read_attribute(:total_time) || (end_event_timestamp - start_event_timestamp).to_f
end