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
This commit is contained in:
committed by
GitHub
parent
bd14e96ed9
commit
f1da7b8afa
@@ -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
|
||||
Reference in New Issue
Block a user