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[Op#54459]: rename `Projects::Scopes::AvailableCustomFields` to include negation scope
Kabiru Mwenja952c5538f817
diff --git a/app/models/project.rb b/app/models/project.rbindex d1d644f167e..fcb9c2fd8f8 100644--- a/app/models/project.rb+++ b/app/models/project.rb@@ -156,8 +156,8 @@ class Project < ApplicationRecordfriendly_id :identifier, use: :findersscopes :allowed_to,- :visible,- :with_available_custom_fields+ :available_custom_fields,+ :visiblescope :has_module, ->(mod) {where(["#{Project.table_name}.id IN (SELECT em.project_id FROM #{EnabledModule.table_name} em WHERE em.name=?)", mod.to_s])diff --git a/app/models/projects/scopes/with_available_custom_fields.rb b/app/models/projects/scopes/available_custom_fields.rbsimilarity index 98%rename from app/models/projects/scopes/with_available_custom_fields.rbrename to app/models/projects/scopes/available_custom_fields.rbindex cac1a5a0ff1..5122b78038b 100644--- a/app/models/projects/scopes/with_available_custom_fields.rb+++ b/app/models/projects/scopes/available_custom_fields.rb@@ -27,7 +27,7 @@# ++module Projects::Scopes- module WithAvailableCustomFields+ module AvailableCustomFieldsextend ActiveSupport::Concernclass_methods dodiff --git a/spec/models/projects/scopes/with_available_custom_fields_spec.rb b/spec/models/projects/scopes/available_custom_fields_spec.rbsimilarity index 96%rename from spec/models/projects/scopes/with_available_custom_fields_spec.rbrename to spec/models/projects/scopes/available_custom_fields_spec.rbindex 83f384f5d98..8d13425d5f1 100644--- a/spec/models/projects/scopes/with_available_custom_fields_spec.rb+++ b/spec/models/projects/scopes/available_custom_fields_spec.rb@@ -28,7 +28,7 @@require "spec_helper"-RSpec.describe Projects::Scopes::WithAvailableCustomFields do+RSpec.describe Projects::Scopes::AvailableCustomFields doshared_let(:project) { create(:project) }shared_let(:project_custom_field) { create(:project_custom_field) }