BigW Consortium Gitlab

issue.rb 490 Bytes
Newer Older
1 2 3 4
module Gitlab
  module CycleAnalytics
    module Summary
      class Issue < Base
James Lopez committed
5 6 7 8 9 10
        def initialize(project:, from:, current_user:)
          @project = project
          @from = from
          @current_user = current_user
        end

11
        def title
12
          n_('New Issue', 'New Issues', value)
13 14 15
        end

        def value
James Lopez committed
16
          @value ||= IssuesFinder.new(@current_user, project_id: @project.id).execute.created_after(@from).count
17 18 19 20 21
        end
      end
    end
  end
end