Skip to content

Include ancestors when checking if a group/project is marked for deletion

What does this MR do and why?

When scheduling a group for deletion, the sub groups / projects will also be deleted. On the group and project pages, we show a warning for that. But in the list views, we don't show it.

This MR will add the "pending deletion" badges if the parent of a group or project is scheduled for deletion.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
image image

How to set up and validate locally

Ensure GDK is activated with an Ultimate license. If you don't have that, groups are deleted immediately so there are no pending groups.

  1. Create a new sub group in Toolbox group (/groups/toolbox => Button 'New subgroup')
  2. Create a new sub group in the newly created subgroup (so we have a parent, a sub group and a sub sub group)
  3. Schedule deleting the parent group (/groups/toolbox/-/edit -> 'Advanced')
  4. Now, go to the group overview page (/toolbox). It should show "pending deletion" badges
  5. Restore the parent group (/groups/toolbox/-/edit -> 'Advanced'), this will cancel the deletion schedule.
  6. The badges should now be gone on the Group overview page (/toolbox)

On master branch, only the parent group has the 'pending deletion' badges. On this branch, the projects and group in the parent group will also have the badges.

Related to #457718 (closed)

Edited by Rutger Wessels

Merge request reports

Loading