I was never able to repro the bug, but I added a test that proves that subprojects are deleted when the parent project is deleted.
Additionally, I found and fixed 4 other bugs:
1. 500 on subproject create (SFX API had changed and code was broken). Fixed and added an integration test to cover this scenario.
2. 404 on subproject delete.
3. Form validation error on project delete.
4. 500 error when creating subproject if name is not available.
To test, login as admin on a sandbox:
1. Create a subproject and make sure you don't get a 500.
2. Go to Admin -> Metadata on the subproject. Make sure the Summary field is empty and delete the subproject. Make sure you don't get a form validation error, don't get a 404, and do get a message that the project has been deleted.
3. Try to create a subproject with the same name as the one you just deleted. You should get a flash error msg about a ProjectConflict 409. (The fact that the name is not available will be fixed in another ticket - the fix here is just to stop the 500.)
4. Create a subproject with a different (available) name.
5. Go to the parent project and delete it. Now navigate directly to the subproject admin->metadata page (/p/project/subproject/admin/overview) and make sure it shows a message that it's been deleted.
status: in-progress --> code-review
assigned_to: Tim Van Steenburgh --> Kyle Adams
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
1) Create a subproject
2) Go to the parent project's admin > tools screen
3) Delete the subproject by clicking on the "Delete" link below it
4) Navigate directly to the subproject's admin/overview screen
The Removal radio button is still set to active instead of deleted.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Diff:
forge:tv/2332
forge-classic:tv/2332
I was never able to repro the bug, but I added a test that proves that subprojects are deleted when the parent project is deleted.
Additionally, I found and fixed 4 other bugs:
1. 500 on subproject create (SFX API had changed and code was broken). Fixed and added an integration test to cover this scenario.
2. 404 on subproject delete.
3. Form validation error on project delete.
4. 500 error when creating subproject if name is not available.
To test, login as admin on a sandbox:
1. Create a subproject and make sure you don't get a 500.
2. Go to Admin -> Metadata on the subproject. Make sure the Summary field is empty and delete the subproject. Make sure you don't get a form validation error, don't get a 404, and do get a message that the project has been deleted.
3. Try to create a subproject with the same name as the one you just deleted. You should get a flash error msg about a ProjectConflict 409. (The fact that the name is not available will be fixed in another ticket - the fix here is just to stop the 500.)
4. Create a subproject with a different (available) name.
5. Go to the parent project and delete it. Now navigate directly to the subproject admin->metadata page (/p/project/subproject/admin/overview) and make sure it shows a message that it's been deleted.
The only problem I ran into during testing:
1) Create a subproject
2) Go to the parent project's admin > tools screen
3) Delete the subproject by clicking on the "Delete" link below it
4) Navigate directly to the subproject's admin/overview screen
The Removal radio button is still set to active instead of deleted.
Ok, that problem is fixed now. Changes on forge:tv/2332.
Looks good.