Use cp_get_project_for_task()