diff --git a/lib/functions/testcase.class.php b/lib/functions/testcase.class.php index 06818dcf0e..a5dad5830e 100644 --- a/lib/functions/testcase.class.php +++ b/lib/functions/testcase.class.php @@ -1726,7 +1726,7 @@ function get_linked_versions($id,$filters=null,$options=null) tcversions nodes from hierarchy testcase_script_links - + platforms */ function _blind_delete($id,$version_id=self::ALL_VERSIONS,$children=null) { $debugMsg = 'Class:' . __CLASS__ . ' - Method: ' . __FUNCTION__; @@ -1781,12 +1781,16 @@ function _blind_delete($id,$version_id=self::ALL_VERSIONS,$children=null) { WHERE testcase_id = {$id} AND tcversion_id IN ({$tcversion_list})"; + $sql[]="/* $debugMsg */ + DELETE FROM {$this->tables['testcase_platforms']} + WHERE testcase_id = {$id} + AND tcversion_id IN ({$tcversion_list})"; + $sql[]="/* $debugMsg */ DELETE FROM {$this->tables['req_coverage']} WHERE testcase_id = {$id} AND tcversion_id IN ({$tcversion_list})"; - // This has to be the last, to avoid FK issues $sql[]="/* $debugMsg */ DELETE FROM {$this->tables['tcversions']}