Description of problem: If attempting to delete a sub-component that has sub-components causes mysql to respond with a foreign key constraint error. Presumably Bugzilla should either recursively delete the child sub-components first, or only present the Delete link for sub-components that have no children. Version-Release number of selected component (if applicable): 4.4.1013 How reproducible: Always Steps to Reproduce: 1. Go to Administration->Components, choose a Product and click the "Add" link under the Sub-Components heading for a some component. 2. Create a sub-component A and then create a sub-component B with parent A. 3. Click the "Delete" link for sub-component A, and press the confirm button. Actual results: DBD::mysql::db do failed: Cannot delete or update a parent row: a foreign key constraint fails (`bugs/rh_sub_components`, CONSTRAINT `fk_rh_sub_components_parent_id_rh_sub_components_id` FOREIGN KEY (`parent_id`) REFERENCES `rh_sub_components` (`id`) ON UPDATE CASCADE) [for Statement "DELETE FROM rh_sub_components WHERE id = ?"] at Bugzilla/Object.pm line 411 Expected results: Entire tree below sub-component A is deleted successfully, or I only get the option to delete sub-components that have no children. Additional info: none
only present the Delete link for sub-components that have no children <-- this. I thought I had a check for this already,
This change is now live. If there are any issues, do not reopen this bug. Instead, you should create a new bug and reference this bug.