diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
commit | 0c872e02b2c822e3397515ec324051ff540f0cd5 (patch) | |
tree | ce2fb6ce7030e4dad0f4118d21ab6453e5938cdd /app/finders/environments/environments_finder.rb | |
parent | f7e05a6853b12f02911494c4b3fe53d9540d74fc (diff) |
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'app/finders/environments/environments_finder.rb')
-rw-r--r-- | app/finders/environments/environments_finder.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/finders/environments/environments_finder.rb b/app/finders/environments/environments_finder.rb index f2dcba04349..85cd37c267e 100644 --- a/app/finders/environments/environments_finder.rb +++ b/app/finders/environments/environments_finder.rb @@ -41,7 +41,13 @@ module Environments def by_search(environments) if params[:search].present? - environments.for_name_like(params[:search], limit: nil) + if Feature.enabled?(:enable_environments_search_within_folder, project) + Environment.from_union( + environments.for_name_like(params[:search], limit: nil), + environments.for_name_like_within_folder(params[:search], limit: nil)) + else + environments.for_name_like(params[:search], limit: nil) + end else environments end @@ -57,7 +63,7 @@ module Environments def by_ids(environments) if params[:environment_ids].present? - environments.for_id(params[:environment_ids]) + environments.id_in(params[:environment_ids]) else environments end |