diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-07 15:09:16 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-07 15:09:16 +0300 |
commit | 0254867cf0f3341fd63cc6da07290f1da91f99ef (patch) | |
tree | 4b3fb556c1cb8cde3459e56d58d5e61eb268d9ec /app/models/alert_management | |
parent | c417764f00abaa5d2224a50b8d43a15e40ef8790 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/alert_management')
-rw-r--r-- | app/models/alert_management/alert.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/alert_management/alert.rb b/app/models/alert_management/alert.rb index 482531199d4..0af261a9358 100644 --- a/app/models/alert_management/alert.rb +++ b/app/models/alert_management/alert.rb @@ -135,6 +135,8 @@ module AlertManagement scope :counts_by_status, -> { group(:status).count } scope :counts_by_project_id, -> { group(:project_id).count } + alias_method :state, :status_name + def self.sort_by_attribute(method) case method.to_s when 'started_at_asc' then order_start_time(:asc) |