diff options
Diffstat (limited to 'lib/gitlab/cycle_analytics/summary/issue.rb')
-rw-r--r-- | lib/gitlab/cycle_analytics/summary/issue.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/gitlab/cycle_analytics/summary/issue.rb b/lib/gitlab/cycle_analytics/summary/issue.rb index 7d62164aae3..008468f24b9 100644 --- a/lib/gitlab/cycle_analytics/summary/issue.rb +++ b/lib/gitlab/cycle_analytics/summary/issue.rb @@ -2,12 +2,18 @@ module Gitlab module CycleAnalytics module Summary class Issue < Base + def initialize(project:, from:, current_user:) + @project = project + @from = from + @current_user = current_user + end + def title 'New Issue' end def value - @value ||= @project.issues.created_after(@from).count + @value ||= IssuesFinder.new(@current_user, project_id: @project.id).execute.created_after(@from).count end end end |