Skip to content
Snippets Groups Projects
Commit 00e3c2e0 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre
Browse files

Fix replace label references with links for group labels

parent 1fd84700
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -39,7 +39,13 @@ module Banzai
end
 
def find_labels(project)
LabelsFinder.new(user, project_id: project.id).execute
label_ids = []
label_ids << project.group.labels.select(:id) if project.group.present?
label_ids << project.labels.select(:id)
union = Gitlab::SQL::Union.new(label_ids)
Label.where("labels.id IN (#{union.to_sql})")
end
 
# Parameters to pass to `Label.find_by` based on the given arguments
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment