Open Alanaktion opened 7 years ago
An implementation of this is working on the v1.7-new-backlog
branch, but has negative side effects where sort indexes can get incorrectly adjusted.
To reproduce this invalid behavior:
This could be fixed by doing something like checking that all items in the sprint/backlog have issue_backlog
entries every time an item is updated. A performant way to do that would be sending an array of items without an index with each AJAX call to the update endpoint, and using a bulk insert query to add them. It would also be necessary to support splitting that array if the moved item triggering the AJAX call was dropped in the middle of the unindexed items.
This allows us to save backlog sort orders on an individual level, which helps prevent conflicts from multiple users updating the backlog at the same time. This could be implemented by running an
UPDATE ... WHERE sort > ?
query, moving any items below the new item's position down by 1.