diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-12 21:08:31 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-12 21:08:31 +0300 |
commit | 884a65481f9e5365329f4ba371ac5b813c45a2f9 (patch) | |
tree | cc4030d36a739eaf91543d270db9a33093f51446 /app/models/alert_management | |
parent | b17f0b91a66f2101a54dd1efed0c4973f04b1daf (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 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/alert_management/alert.rb b/app/models/alert_management/alert.rb index 44d82453c1f..71d09830d56 100644 --- a/app/models/alert_management/alert.rb +++ b/app/models/alert_management/alert.rb @@ -113,6 +113,7 @@ module AlertManagement scope :for_status, -> (status) { with_status(status) } scope :for_fingerprint, -> (project, fingerprint) { where(project: project, fingerprint: fingerprint) } scope :for_environment, -> (environment) { where(environment: environment) } + scope :for_assignee_username, -> (assignee_username) { joins(:assignees).merge(User.by_username(assignee_username)) } scope :search, -> (query) { fuzzy_search(query, [:title, :description, :monitoring_tool, :service]) } scope :open, -> { with_status(open_statuses) } scope :not_resolved, -> { without_status(:resolved) } |