Post Title Change

<?php

function dankq_save_post($data,$postarr){
if($data['post_type'] == 'question'){
$data['post_content'] = 'id = ' . $_POST['ID']. '<br>title = ' . $data['post_title'] . '<br>name = ' . $data['post_name'] ; //Print to the content, use for testing then delete
$data['post_title'] = 'Q-' . $_POST['post_ID'];
$data['post_name'] = 'q-' . $_POST['post_ID'];
return $data;
}
else return $data;
}

//Action
add_filter('wp_insert_post_data','dankq_save_post',1000,2);
?>