Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-07 15:09:16 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-07 15:09:16 +0300
commit0254867cf0f3341fd63cc6da07290f1da91f99ef (patch)
tree4b3fb556c1cb8cde3459e56d58d5e61eb268d9ec /app/models/alert_management
parentc417764f00abaa5d2224a50b8d43a15e40ef8790 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/alert_management')
-rw-r--r--app/models/alert_management/alert.rb2
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)