Commit 65fb8ca1 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Prevent duplicates in issue finder when filter by label

Signed-off-by: default avatarDmitriy Zaporozhets <>
parent 54183ccf1289
......@@ -125,7 +125,13 @@
def by_label(items)
if params[:label_name].present?
items = items.joins(:labels).where("labels.title in (?)", params[:label_name].split(","))
label_names = params[:label_name].split(",")
item_ids = LabelLink.joins(:label).
where('labels.title in (?)', label_names).
items = items.where(id: item_ids)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment