summaryrefslogtreecommitdiff
path: root/app/controllers/concerns/issuable_collections.rb
diff options
context:
space:
mode:
authorJan Provaznik <jprovaznik@gitlab.com>2018-02-28 22:58:36 +0100
committerJan Provaznik <jprovaznik@gitlab.com>2018-03-02 08:50:00 +0100
commit911fd7c252dd6c43b9771b2833460f1605dc99a2 (patch)
tree0425fde7869d0fc9c6d1d74decd6e4c685f95930 /app/controllers/concerns/issuable_collections.rb
parentf29dbaf55cc0c8a4b80c153454a2f7e22fd7a827 (diff)
downloadgitlab-ce-911fd7c252dd6c43b9771b2833460f1605dc99a2.tar.gz
Support additional LabelsFinder parameters for group labels
In some situations (listing labels for epics) we want to list only group ancestor labels, this is already supported in LabelsFinder we just need to enable additional parameters. Also `set_issuables_index` method now loads project labels only if @project is set (which is not used for epic group labels).
Diffstat (limited to 'app/controllers/concerns/issuable_collections.rb')
-rw-r--r--app/controllers/concerns/issuable_collections.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/concerns/issuable_collections.rb b/app/controllers/concerns/issuable_collections.rb
index f7ba305a59f..4114ca6bf7c 100644
--- a/app/controllers/concerns/issuable_collections.rb
+++ b/app/controllers/concerns/issuable_collections.rb
@@ -17,7 +17,7 @@ module IssuableCollections
set_pagination
return if redirect_out_of_range(@total_pages)
- if params[:label_name].present?
+ if params[:label_name].present? && @project
labels_params = { project_id: @project.id, title: params[:label_name] }
@labels = LabelsFinder.new(current_user, labels_params).execute
end