998631-task-statuses - clear task statuses references before deleting

998631-task-statuses - added comment