diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-27 21:13:16 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-27 21:13:16 +0300 |
commit | 4c5b7f992f2ee3134409559e35350748425fb467 (patch) | |
tree | edabd5b6b177a0f982d27ecddd45de9dccbe6186 /app/models/analytics | |
parent | f50cb4f63fae6f02a0b8d9c3a95f29b3b4f79516 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/analytics')
-rw-r--r-- | app/models/analytics/cycle_analytics/issue_stage_event.rb | 3 | ||||
-rw-r--r-- | app/models/analytics/cycle_analytics/merge_request_stage_event.rb | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/app/models/analytics/cycle_analytics/issue_stage_event.rb b/app/models/analytics/cycle_analytics/issue_stage_event.rb index 3e6ed86d534..333bd20328c 100644 --- a/app/models/analytics/cycle_analytics/issue_stage_event.rb +++ b/app/models/analytics/cycle_analytics/issue_stage_event.rb @@ -8,6 +8,9 @@ module Analytics validates(*%i[stage_event_hash_id issue_id group_id project_id start_event_timestamp], presence: true) + alias_attribute :state, :state_id + enum state: Issue.available_states, _suffix: true + def self.issuable_id_column :issue_id end diff --git a/app/models/analytics/cycle_analytics/merge_request_stage_event.rb b/app/models/analytics/cycle_analytics/merge_request_stage_event.rb index d0ec3c4e8b9..537e45058aa 100644 --- a/app/models/analytics/cycle_analytics/merge_request_stage_event.rb +++ b/app/models/analytics/cycle_analytics/merge_request_stage_event.rb @@ -8,6 +8,9 @@ module Analytics validates(*%i[stage_event_hash_id merge_request_id group_id project_id start_event_timestamp], presence: true) + alias_attribute :state, :state_id + enum state: MergeRequest.available_states, _suffix: true + def self.issuable_id_column :merge_request_id end |