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
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-04-13 13:05:10 +0300
committerJacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home>2016-04-13 23:10:49 +0300
commitdc13f7c31dee2c0515c36fba2398bc8b843a8108 (patch)
treed2c33e183fb9f7d83f763c7f16ed8fea1e9d5bd6 /app/finders/issuable_finder.rb
parent42e0625dfb2a791affd592df1f879083702e6f86 (diff)
Return unique issues when using multiple labels
This ensures that IssuableFinder returns a collection of unique issues, even when filtering issues using multiple labels.
Diffstat (limited to 'app/finders/issuable_finder.rb')
-rw-r--r--app/finders/issuable_finder.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb
index f1df6832bf6..d7c5b0a598c 100644
--- a/app/finders/issuable_finder.rb
+++ b/app/finders/issuable_finder.rb
@@ -278,7 +278,9 @@ class IssuableFinder
end
end
- items
+ # When filtering by multiple labels we may end up duplicating issues (if one
+ # has multiple labels). This ensures we only return unique issues.
+ items.distinct
end
def label_names