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

chore[Op#54459]: cleanup outdated state from merger

Kabiru Mwenja32858c8b3dbd
diff --git a/app/models/queries/filters.rb b/app/models/queries/filters.rb
index 13c01bf5436..4f5fbf38d98 100644
--- a/app/models/queries/filters.rb
+++ b/app/models/queries/filters.rb
@@ -31,7 +31,6 @@ module Queries::Filters
list: Queries::Filters::Strategies::List,
list_all: Queries::Filters::Strategies::ListAll,
list_optional: Queries::Filters::Strategies::ListOptional,
- list_contains: Queries::Filters::Strategies::ListContains,
shared_with_user_list_optional: Queries::Filters::Strategies::WorkPackages::SharedWithUser::ListOptional,
integer: Queries::Filters::Strategies::Integer,
date: Queries::Filters::Strategies::Date,
diff --git a/app/models/queries/filters/strategies/list_contains.rb b/app/models/queries/filters/strategies/list_contains.rb
deleted file mode 100644
index 4f10971d9be..00000000000
--- a/app/models/queries/filters/strategies/list_contains.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-#-- copyright
-# OpenProject is an open source project management software.
-# Copyright (C) 2012-2024 the OpenProject GmbH
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License version 3.
-#
-# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
-# Copyright (C) 2006-2013 Jean-Philippe Lang
-# Copyright (C) 2010-2013 the ChiliProject Team
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# See COPYRIGHT and LICENSE files for more details.
-#++
-
-module Queries::Filters::Strategies
- class ListContains < List
- self.supported_operators = ["~"]
- self.default_operator = "~"
- end
-end
diff --git a/spec/support/queries/filters/shared_filter_examples.rb b/spec/support/queries/filters/shared_filter_examples.rb
index 0e40e88c300..de923493c9c 100644
--- a/spec/support/queries/filters/shared_filter_examples.rb
+++ b/spec/support/queries/filters/shared_filter_examples.rb
@@ -370,54 +370,6 @@ RSpec.shared_examples_for "list_all query filter" do
end
end
-RSpec.shared_examples_for "list_contains query filter" do
- include_context "filter tests"
- let(:type) { :list_contains }
-
- describe "#scope" do
- let(:values) { valid_values }
-
- context 'for "~"' do
- let(:operator) { "~" }
-
- it "is the same as handwriting the query" do
- handwritten_scope_sql = <<-SQL.squish
- SELECT "projects".* FROM "projects"
- INNER JOIN "project_custom_field_project_mappings" ON "project_custom_field_project_mappings"."project_id" = "projects"."id"
- WHERE "project_custom_field_project_mappings"."custom_field_id" IN (#{values.join(', ')})
- SQL
-
- expect(instance.scope.to_sql).to eql handwritten_scope_sql
- end
- end
- end
-
- describe "#valid?" do
- let(:operator) { "~" }
- let(:values) { valid_values }
-
- it "is valid" do
- expect(instance).to be_valid
- end
-
- context "for an invalid operator" do
- let(:operator) { "=" }
-
- it "is invalid" do
- expect(instance).not_to be_valid
- end
- end
-
- context "for an invalid value" do
- let(:values) { ["inexistent"] }
-
- it "is invalid" do
- expect(instance).not_to be_valid
- end
- end
- end
-end
-
RSpec.shared_examples_for "boolean query filter" do |scope: true|
include_context "filter tests"
let(:attribute) { raise "needs to be defined" }