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

Fix active role filter method

Aaron Contreras17e3dc56bb4f
diff --git a/app/components/shares/modal_body_component.rb b/app/components/shares/modal_body_component.rb
index 0df017788b0..72cfc850351 100644
--- a/app/components/shares/modal_body_component.rb
+++ b/app/components/shares/modal_body_component.rb
@@ -117,7 +117,9 @@ module Shares
return false if role_filter_value.nil?
- find_role_ids(_option[:value]).first == role_filter_value.to_i
+ selected_role = @available_roles.find { _1[:value] == _option[:value] }
+
+ selected_role[:value] == role_filter_value.to_i
end
def filter_url(type_option: nil, role_option: nil)