Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Filter the number of filters to only unique classes

Klaus Zandersa0867d14619c
diff --git a/app/components/filters_component.rb b/app/components/filters_component.rb
index 78c28a4fa9d..12ec01fbb0d 100644
--- a/app/components/filters_component.rb
+++ b/app/components/filters_component.rb
@@ -58,7 +58,11 @@ class FiltersComponent < ApplicationComponent
end
def filters_count
- query.filters.count
+ @filters_count ||= query
+ .filters
+ .map(&:class)
+ .uniq
+ .count
end
protected