diff options
author | Adam Hegyi <ahegyi@gitlab.com> | 2019-08-23 20:28:11 +0000 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2019-08-23 20:28:11 +0000 |
commit | 60e33885269bdae71e9710b17f199708b9b7c9e0 (patch) | |
tree | fce6fa4f2c779c4b3c5088577cc4fb26196da182 /app/models/analytics/cycle_analytics | |
parent | 0a94aac8a291ef8432dadfb4cbd70ecae62becff (diff) | |
download | gitlab-ce-60e33885269bdae71e9710b17f199708b9b7c9e0.tar.gz |
Implement validation logic to ProjectStage
- Introducting StageEvents to define the available events
- Define the event pairing rules, since some events are not compatible
- Express default Cycle Analytics stages with the event structure
Diffstat (limited to 'app/models/analytics/cycle_analytics')
-rw-r--r-- | app/models/analytics/cycle_analytics/project_stage.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/analytics/cycle_analytics/project_stage.rb b/app/models/analytics/cycle_analytics/project_stage.rb index 88c8cb40ccb..a312bd24e78 100644 --- a/app/models/analytics/cycle_analytics/project_stage.rb +++ b/app/models/analytics/cycle_analytics/project_stage.rb @@ -3,7 +3,12 @@ module Analytics module CycleAnalytics class ProjectStage < ApplicationRecord + include Analytics::CycleAnalytics::Stage + + validates :project, presence: true belongs_to :project + + alias_attribute :parent, :project end end end |