diff options
author | Hiroyuki Sato <sathiroyuki@gmail.com> | 2019-01-13 19:24:31 +0300 |
---|---|---|
committer | Hiroyuki Sato <sathiroyuki@gmail.com> | 2019-01-14 06:02:55 +0300 |
commit | d32aec06fe2d6ee0b2b0c0d1ca8cfd9bab14e4e7 (patch) | |
tree | 6449d068a342509222709755177034c672f58236 /app/finders | |
parent | 1161c99e5c5a6e717127b83665de00068d810e0e (diff) |
Add 'in' filter that modifies scope of 'search' filter to issues and merge requests API
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/issuable_finder.rb | 4 | ||||
-rw-r--r-- | app/finders/issues_finder.rb | 1 | ||||
-rw-r--r-- | app/finders/merge_requests_finder.rb | 1 |
3 files changed, 5 insertions, 1 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb index 1a69ec85d18..8984cef42e9 100644 --- a/app/finders/issuable_finder.rb +++ b/app/finders/issuable_finder.rb @@ -18,6 +18,7 @@ # assignee_id: integer or 'None' or 'Any' # assignee_username: string # search: string +# in: 'title', 'description' or a string joined them with comma # label_name: string # sort: string # non_archived: boolean @@ -56,6 +57,7 @@ class IssuableFinder milestone_title my_reaction_emoji search + in ] end @@ -408,7 +410,7 @@ class IssuableFinder items = klass.with(cte.to_arel).from(klass.table_name) end - items.full_search(search) + items.full_search(search, matched_columns: params[:in]) end # rubocop: enable CodeReuse/ActiveRecord diff --git a/app/finders/issues_finder.rb b/app/finders/issues_finder.rb index 45e494725d7..bf39effa265 100644 --- a/app/finders/issues_finder.rb +++ b/app/finders/issues_finder.rb @@ -14,6 +14,7 @@ # milestone_title: string # assignee_id: integer # search: string +# in: 'title', 'description' or a string joined them with comma # label_name: string # sort: string # my_reaction_emoji: string diff --git a/app/finders/merge_requests_finder.rb b/app/finders/merge_requests_finder.rb index e190d5d90c9..3cfe9533bb6 100644 --- a/app/finders/merge_requests_finder.rb +++ b/app/finders/merge_requests_finder.rb @@ -15,6 +15,7 @@ # author_id: integer # assignee_id: integer # search: string +# in: 'title', 'description' or a string joined them with comma # label_name: string # sort: string # non_archived: boolean |