|---------------|---------------|
| name | position |
|---------------|---------------| +---- inserting here will give "BM"
| kek | "B" | |
|---------------|---------------| <---+
| ciao | "C" |
|---------------|---------------|
...
|---------------|---------------| +---- inserting here will give "DT"
| miao | "DM" | |
|---------------|---------------| <---+
| miao | "F" |
|---------------|---------------|
Solution 1
Positionfield to be aintxincrement by 1 the position of every taks which has a position greater or equal then theiSolution 2
edit the
Positionfield to be astringstill order by it
when a new task is added at position
xdo the following:task[x+1].Position - task[x].Positionex:
0x00000as min and0xFFFFFas maxmaxandminvalue are off limits to leave space for appending to the head and tail