Class: Projects::BatchOpenIssuesCountService

Inherits:
BatchCountService show all
Defined in:
app/services/projects/batch_open_issues_count_service.rb

Instance Method Summary collapse

Methods inherited from BatchCountService

#initialize, #project_ids, #refresh_cache

Constructor Details

This class inherits a constructor from Projects::BatchCountService

Instance Method Details

#count_serviceObject

rubocop: enable CodeReuse/ActiveRecord


16
17
18
# File 'app/services/projects/batch_open_issues_count_service.rb', line 16

def count_service
  ::Projects::OpenIssuesCountService
end

#global_countObject

rubocop: disable CodeReuse/ActiveRecord


9
10
11
12
13
# File 'app/services/projects/batch_open_issues_count_service.rb', line 9

def global_count
  @global_count ||= begin
    count_service.query(project_ids).group(:project_id).count
  end
end