Class: IssuesFinder

Inherits:
IssuableFinder show all
Extended by:
Gitlab::Utils::Override
Defined in:
app/finders/issues_finder.rb,
app/finders/issues_finder/params.rb

Overview

Finders::Issues class

Used to filter Issues collections by set of params

Arguments:

current_user - which user use
params:
scope: 'created_by_me' or 'assigned_to_me' or 'all'
state: 'opened' or 'closed' or 'all'
group_id: integer
project_id: integer
milestone_title: string (cannot be simultaneously used with milestone_wildcard_id)
milestone_wildcard_id: 'none', 'any', 'upcoming', 'started' (cannot be simultaneously used with milestone_title)
assignee_id: integer
closed_by_id: integer
search: string
in: 'title', 'description', or a string joining them with comma
label_name: string
sort: string
my_reaction_emoji: string
due_date: date or '0', '', 'overdue', 'week', or 'month'
due_after: datetime
due_before: datetime
created_after: datetime
created_before: datetime
updated_after: datetime
updated_before: datetime
confidential: boolean
issue_types: array of strings (one of WorkItems::Type.base_types)

Direct Known Subclasses

WorkItems::WorkItemsFinder

Defined Under Namespace

Classes: Params

Constant Summary

Constants inherited from IssuableFinder

IssuableFinder::FULL_TEXT_SEARCH_TERM_PATTERN, IssuableFinder::FULL_TEXT_SEARCH_TERM_REGEX, IssuableFinder::NEGATABLE_PARAMS_HELPER_KEYS

Instance Attribute Summary

Attributes inherited from IssuableFinder

#current_user, #original_params, #params

Attributes included from FinderWithCrossProjectAccess

#should_skip_cross_project_check

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Gitlab::Utils::Override

extended, extensions, included, method_added, override, prepended, queue_verification, verify!

Methods inherited from IssuableFinder

array_params, #count_by_state, #execute, #initialize, negatable_array_params, negatable_params, negatable_scalar_params, #parent_param, #parent_param=, #row_count, #search, #should_filter_negated_args?, #use_cte_for_search?, valid_params

Methods included from UpdatedAtFilter

#by_updated_at

Methods included from CreatedAtFilter

#by_created_at

Methods included from FinderMethods

#find, #find_by, #find_by!

Methods included from FinderWithCrossProjectAccess

#can_read_cross_project?, #can_read_project?, #execute, #find, #find_by, #find_by!, #skip_cross_project_check

Constructor Details

This class inherits a constructor from IssuableFinder

Class Method Details

.scalar_paramsObject



36
37
38
# File 'app/finders/issues_finder.rb', line 36

def self.scalar_params
  @scalar_params ||= super + [:due_date]
end

Instance Method Details

#klassObject



40
41
42
# File 'app/finders/issues_finder.rb', line 40

def klass
  Issue
end

#params_classObject



44
45
46
# File 'app/finders/issues_finder.rb', line 44

def params_class
  self.class.const_get(:Params, false)
end