Skip to content

Marking a group as 'pending deletion' should mark all subgroups and projects as 'pending deletion' as well

Problem

When marking a group as pending deletion, the subgroups and projects that the group contains are currently not marked as pending deletion. We should ensure that all content of a group that is marked for deletion is also displayed as pending deletion to the user.

Proposal

  • When marking a group as pending deletion, all subgroups and projects should display the pending deletion badge in the group and project lists.
  • When marking a group as pending deletion, all subgroups and projects should display the banner on the group or project overview page that the project is pending deletion. Resolved in #397032 (closed)
  • When recovering a group that is pending deletion, all subgroups and projects should remove the pending deletion badge in the group and project lists.
  • When recovering a group that is pending deletion, all subgroups and projects should not display the banner on the group and project overview page that the project is pending deletion. Resolved in #397032 (closed)

Implementation Guide

Group deletion state is handled by the group_deletion_schedules table:

CREATE TABLE group_deletion_schedules (
    group_id bigint NOT NULL,
    user_id bigint NOT NULL,
    marked_for_deletion_on date NOT NULL
);

It should be possible to cross reference with some_group.self_and_ancestors to determine pending deletion state.

Edited by Zack Cuddy