Assign id to task on create