Skip to content

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

  1. Run the migration bundle exec rails db:migrate
  2. Check delayed_group_deletion column is added in the application_settings table
  3. Run GDK
  4. Modify the delayed_group_deletion using API {{baseURL}}/api/v4/application/settings?delayed_group_deletion=false
  5. Check Remove group button under Group > Advanced Settings to only show the delayed deletion message and modal when both delayed_group_deletion is true and deletion_adjourned_period is >0
  6. Check when deletion_adjourned_period is updated via api and ui form it will also update delayed_group_deletion to deletion_adjourned_period > 0
  7. 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.

Related to #352959 (closed)

Edited by Harsimar Sandhu

Merge request reports

Loading