Closed jpalumickas closed 8 years ago
Thanks @jpalumickas. A great fix! I thought of another potential problem that probably needs its own PR. What if we have 1, 2, [2], 2, 3, 4 and we pick out the one in brackets and move the rest lower. We'll end up with 1, 2, 3, 3, 4, 5. Ideally we'd want 1, 2, 3, 4, 5, 6.
I suppose that's a harder problem to fix though. Unless we renumber all of the lower items explicitly instead of relying on their current position with SQL. Maybe something like this: http://stackoverflow.com/questions/15930514/mysql-auto-increment-temporary-column-in-select-statement
Currently, when we're trying to move up and down items with same positions, they are not found in scope, because they have the same id. We need to show all items with the same id but exclude current one.
@brendon can you take a look ?