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
path: root/app
diff options
context:
space:
mode:
authorRiccardo Padovani <riccardo@rpadovani.com>2019-06-18 10:45:47 +0300
committerSean McGivern <sean@gitlab.com>2019-06-18 10:45:47 +0300
commitb33fb07ef9d2fdf0ce983ded13f9c36ed02e2fd8 (patch)
tree5d0676ce69d41323197f9dd86e7d58fe52127fad /app
parenta25c637c1e55b3fb94277ac94c4a1ef592cb825d (diff)
Search issuables by iids
Diffstat (limited to 'app')
-rw-r--r--app/controllers/concerns/issuable_collections.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/concerns/issuable_collections.rb b/app/controllers/concerns/issuable_collections.rb
index 9cf25915e92..88a0690938a 100644
--- a/app/controllers/concerns/issuable_collections.rb
+++ b/app/controllers/concerns/issuable_collections.rb
@@ -104,6 +104,12 @@ module IssuableCollections
# Used by view to highlight active option
@sort = options[:sort]
+ # When a user looks for an exact iid, we do not filter by search but only by iid
+ if params[:search] =~ /^#(?<iid>\d+)\z/
+ options[:iids] = Regexp.last_match[:iid]
+ params[:search] = nil
+ end
+
if @project
options[:project_id] = @project.id
options[:attempt_project_search_optimizations] = true