Premising that, when you create a sub-projectWhen you permanently destroy a specific project from the command line, the following things still happen:
- the parent project is flagged as "has sub-projects"
- the members in the parent projects are moved to the childadditional good things now happen:
After this change, when you delete the last sub-project of a parent project,- the direct orhpan milestones are removed too
finally the above things are reverted back to (instead of leaving their original status.m orphan, broken, So:
- the parentinvisible forever)
- all children project is flagged as "without sub-projects"s emerge like cute bubbles by one level
- the members in the child project are moved to the parent project (instead of having them orphan, broken, invisible forever)
- the parent project is eventually restored as "without sub-projects"
(instead of having a broken root-project with bugged memberships)
ExampleThis change has nothing to do with archived projects.
This change will only affect future usages of the destroy workflow, that is:
./bin/remove destroy PHID-OF-YOUR-PROJECT-TO-BE-DESTROYED
Example initial situation:
```
Project A (hasSubprojects: 1
[projectDepth: 0]
[hasSubprojects: 1]
[members: *automatic*, foo, bar]
> Project B
[projectDepth: 1]
[hasSubprojects: 1]
[members: *automatic*, projectDepth: 0foo, members: automatic)bar]
> Project B (C
[hasSubprojects: 0, ]
[projectDepth:: 2]
[members: foo, 1, members: yes)bar]
```
ASituation after deleting Pstroying only project B:A:
P```
Project B
[project A (tDepth: 0]
[hasSubprojects: 0,s: 1]
[members: *automatic*, foo, bar]
> Project C
[projectDepth: 0h: 1]
[hasSubprojects: 0]
[members: foo, members: yes)bar]
```
Additionally, when you delete a parent project, the direct children becomes
root-Situation after destroying only projects, and their depth is decreased by one.t B:
```
Project A (
[projectDepth: 0]
[hasSubprojects: 1]
[members: *automatic*, foo, projectDepth: 0,bar]
members: automatic)> Project C child of project B
> Project B (hasSubprojects: 1, [projectDepth:, 1, members: automatic) 1]
> Project C ([hasSubprojects: 0, projectDepth:]
[members: foo, 2, members: yes)bar]
```
ASituation after deleting Pstroying only project A:C:
> P```
Project A
[project B (tDepth: 0]
[hasSubprojects: 1]
[members: *automatic*, projectDepth:foo, 0,bar]
members: automatic)> Project B
[projectDepth: 1]
[hasSubprojects: 0]
> Project C (hasSubprojects: 0, projectDepth:, 1[members: foo, members: yes)bar]
```