Align usages of Project#marked_for_deletion? to account for ancestors
Background
Follow-up from #457718 (comment 2174193752).
In Marking a group as 'pending deletion' should ma... (#457718 - closed) we changed projects to be pending deletion if the parent group is also pending deletion. There are a number of places we are still using Project#marked_for_deletion? but that method doesn't account for the parent group being pending deletion.
Proposal
Maybe we should rename self_or_ancestor_marked_for_deletion into pending_delete? or something like that?
We then have:
-
marked_for_deletion?(true if user marked the group or project for deletion) -
pending_deletion?(true if the group or project will be deleted because a parent group ismarked_for_deletion) -
marked_for_deletion_onshould return a date for ancestor groups and projects when parent is marked for deletion. Currently it returnsnil.
Implementation guide
Needs refinement
Edited by Peter Hegman