From f1da7b8afa552dbb579d678a21afa8ad23797188 Mon Sep 17 00:00:00 2001 From: Tanmay Deep Sharma <32020192+tds-1@users.noreply.github.com> Date: Thu, 9 Apr 2026 16:14:17 +0530 Subject: [PATCH] feat: enable assignment v2 by default for new accounts (#14031) ## Description Enable assignment v2 by default for new accounts ## Type of change - [ ] New feature (non-breaking change which adds functionality) ## Checklist: - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules --- config/features.yml | 2 +- ...091202_enable_assignment_v2_for_new_accounts.rb | 14 ++++++++++++++ db/schema.rb | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20260409091202_enable_assignment_v2_for_new_accounts.rb diff --git a/config/features.yml b/config/features.yml index 00f9321b8..8a7074e71 100644 --- a/config/features.yml +++ b/config/features.yml @@ -190,7 +190,7 @@ chatwoot_internal: true - name: assignment_v2 display_name: Assignment V2 - enabled: false + enabled: true - name: twilio_content_templates display_name: Twilio Content Templates enabled: false diff --git a/db/migrate/20260409091202_enable_assignment_v2_for_new_accounts.rb b/db/migrate/20260409091202_enable_assignment_v2_for_new_accounts.rb new file mode 100644 index 000000000..c7c66bb51 --- /dev/null +++ b/db/migrate/20260409091202_enable_assignment_v2_for_new_accounts.rb @@ -0,0 +1,14 @@ +class EnableAssignmentV2ForNewAccounts < ActiveRecord::Migration[7.1] + def up + config = InstallationConfig.find_by(name: 'ACCOUNT_LEVEL_FEATURE_DEFAULTS') + return if config&.value.blank? + + features = config.value + feature = features.find { |f| f['name'] == 'assignment_v2' } + return if feature.blank? + + feature['enabled'] = true + config.update!(value: features) + GlobalConfig.clear_cache + end +end diff --git a/db/schema.rb b/db/schema.rb index d0993a55b..0067f36ff 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.1].define(version: 2026_03_24_102005) do +ActiveRecord::Schema[7.1].define(version: 2026_04_09_091202) do # These extensions should be enabled to support this database enable_extension "pg_stat_statements" enable_extension "pg_trgm"