Add: getting the ID of the first task should also consider sort