Updating the status of a task