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

open_issues_count_service.rb « projects « services « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a975a06a05c7cc0b4a004989b3727543db5e4c3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module Projects
  # Service class for counting and caching the number of open issues of a
  # project.
  class OpenIssuesCountService < Projects::CountService
    def cache_key_name
      'open_issues_count'
    end

    def self.query(project_ids)
      # We don't include confidential issues in this number since this would
      # expose the number of confidential issues to non project members.
      Issue.opened.public_only.where(project: project_ids)
    end
  end
end