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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[chore] fix excluded filters
Eric Schuberteccfce24bf48
diff --git a/lib/api/v3/queries/schemas/filter_dependency_representer_factory.rb b/lib/api/v3/queries/schemas/filter_dependency_representer_factory.rbindex 2c435624bdb..dfce9d05374 100644--- a/lib/api/v3/queries/schemas/filter_dependency_representer_factory.rb+++ b/lib/api/v3/queries/schemas/filter_dependency_representer_factory.rb@@ -49,6 +49,10 @@ module APIinstanceend+ def get_excluded_filters+ @excluded_filters+ end+private@specific_conversion = {@@ -120,6 +124,7 @@ module APIendmodule_function :create,+ :get_excluded_filters,:representer_class,:filter_specific_representer_class,:type_specific_representer_class,diff --git a/lib/api/v3/queries/schemas/query_filter_instance_schema_collection_representer.rb b/lib/api/v3/queries/schemas/query_filter_instance_schema_collection_representer.rbindex aff7d2ea691..6afcc57815f 100644--- a/lib/api/v3/queries/schemas/query_filter_instance_schema_collection_representer.rb+++ b/lib/api/v3/queries/schemas/query_filter_instance_schema_collection_representer.rb@@ -35,6 +35,18 @@ module APIclass QueryFilterInstanceSchemaCollectionRepresenter <::API::V3::Schemas::SchemaCollectionRepresenter+ def initialize(represented, self_link:, current_user:, form_embedded: false)+ without_excluded_filters = represented.select do |filter|+ ::API::V3::Queries::Schemas::FilterDependencyRepresenterFactory+ .get_excluded_filters.none? { |clazz| filter.is_a?(clazz) }+ end++ super(without_excluded_filters,+ self_link: self_link,+ current_user: current_user,+ form_embedded: form_embedded)+ end+def model_self_link(model)converted_name = API::Utilities::PropertyNameConverter.from_ar_name(model.name)