Add delayed group deletion application setting
What does this MR do and why?
Add a new instance setting for delayed_group_deletion
(default true
) which is used to enable/disable delayed group deletion.
How to set up and validate locally
- Run the migration
bundle exec rails db:migrate
- Check delayed_group_deletion column is added in the
application_settings
table - Run GDK
- Modify the delayed_group_deletion using API {{baseURL}}/api/v4/application/settings?delayed_group_deletion=false
- Check Remove group button under Group > Advanced Settings to only show the delayed deletion message and modal when both
delayed_group_deletion
istrue
anddeletion_adjourned_period
is>0
- Check when
deletion_adjourned_period
is updated via api and ui form it will also updatedelayed_group_deletion
todeletion_adjourned_period > 0
- Check the documentation changes
Local Migration Logs
❯ rake db:migrate:up VERSION=20220406133049
== 20220406133049 AddDelayedGroupDeletionToApplicationSettings: migrating =====
-- add_column(:application_settings, :delayed_group_deletion, :boolean, {:default=>true, :null=>false})
-> 0.0069s
== 20220406133049 AddDelayedGroupDeletionToApplicationSettings: migrated (0.0069s)
❯ rake db:migrate:up VERSION=20220413054910
== 20220413054910 BackfillDelayedGroupDeletion: migrating =====================
== 20220413054910 BackfillDelayedGroupDeletion: migrated (0.1933s) ============
❯ rake db:migrate:down VERSION=20220413054910
== 20220413054910 BackfillDelayedGroupDeletion: reverting =====================
== 20220413054910 BackfillDelayedGroupDeletion: reverted (0.0719s) ============
❯ rake db:migrate:down VERSION=20220406133049
== 20220406133049 AddDelayedGroupDeletionToApplicationSettings: reverting =====
-- remove_column(:application_settings, :delayed_group_deletion)
-> 0.0015s
== 20220406133049 AddDelayedGroupDeletionToApplicationSettings: reverted (0.0015s)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #352959 (closed)
Edited by Harsimar Sandhu