diff --git a/include/class.dept.php b/include/class.dept.php index 36ffd2ffb00f07258426aa1c9b3f819bc949f297..3c2e442e398922b442aca271d8aece0c3bee19b6 100644 --- a/include/class.dept.php +++ b/include/class.dept.php @@ -388,6 +388,11 @@ implements TemplateVariable { ->filter(array('dept_id' => $id)) ->update(array('dept_id' => $cfg->getDefaultDeptId())); + // Move tasks + Task::objects() + ->filter(array('dept_id' => $id)) + ->update(array('dept_id' => $cfg->getDefaultDeptId())); + //Move Dept members: This should never happen..since delete should be issued only to empty Depts...but check it anyways Staff::objects() ->filter(array('dept_id' => $id))