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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/finders/issuable_finder.rb')
-rw-r--r--app/finders/issuable_finder.rb16
1 files changed, 15 insertions, 1 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb
index 7b0cd17a761..3e436f30971 100644
--- a/app/finders/issuable_finder.rb
+++ b/app/finders/issuable_finder.rb
@@ -35,6 +35,8 @@
# updated_before: datetime
# attempt_group_search_optimizations: boolean
# attempt_project_search_optimizations: boolean
+# crm_contact_id: integer
+# crm_organization_id: integer
#
class IssuableFinder
prepend FinderWithCrossProjectAccess
@@ -59,6 +61,8 @@ class IssuableFinder
assignee_username
author_id
author_username
+ crm_contact_id
+ crm_organization_id
label_name
milestone_title
release_tag
@@ -138,7 +142,9 @@ class IssuableFinder
items = by_milestone(items)
items = by_release(items)
items = by_label(items)
- by_my_reaction_emoji(items)
+ items = by_my_reaction_emoji(items)
+ items = by_crm_contact(items)
+ by_crm_organization(items)
end
def should_filter_negated_args?
@@ -463,6 +469,14 @@ class IssuableFinder
params[:non_archived].present? ? items.non_archived : items
end
+ def by_crm_contact(items)
+ Issuables::CrmContactFilter.new(params: original_params).filter(items)
+ end
+
+ def by_crm_organization(items)
+ Issuables::CrmOrganizationFilter.new(params: original_params).filter(items)
+ end
+
def or_filters_enabled?
strong_memoize(:or_filters_enabled) do
Feature.enabled?(:or_issuable_queries, feature_flag_scope, default_enabled: :yaml)