Note that there is a difference between a task NUMBER and a task ID. They are both explained below.
The Task ID is the unique number of each task in the system, and this number will ALWAYS be sequential in the order that the tasks are created. It is also a number that cannot be changed, and it can always be used to find that one specific task (for example through the task input field in the bottom right).
Second, the task number is sequential when creating new tasks on a plan. It is not unique, and it is possible to edit it manually (and even create duplicate numbers).
When a task is created and a specific task number has not been supplied, the system will look at the highest existing task number on the plan, and add 1.
This means that if a plan has tasks with the task numbers 1, 2, 5, 6, 10, the next task that is created on the plan will get task number 11.
In order to remove gaps in the sequence, you can use the “sort” button, which can re-number the tasks based on certain orders.
One of these orders is Task number, which means it orders the tasks by the current task numbers, and gives the tasks new numbers in sequence (so it becomes 1, 2, 3, 4, 5, 6).
There are also other options for this sorting, for example to order by phase, then task number.
This means that if the task numbers are 1, 2, 3, 4 but task 1+4 are in phase 1, and 2+3 are in phase 2, it will be ordered as 1,4,2,3 -> 1,2,3,4 (because of the phase order).
When copying tasks from one plan to another (via templates or manual copy), or from something which is not a plan, there are different rules based on which method is used for copying.
Generally they will try to keep the original order of the tasks.
If the plan that you copy to already has tasks on it, it will most likely end up with duplicate task numbers.
In this case, you would use the “sort” button to make sure the task number duplicates are removed.