I am trying to think of the best way to do the following:
I have a list of tasks stored in the database. A task has a priority assigned to it. You can change the priority of a task to reorder the order they should be carried out.
I am thinking of something very similar to Pivotal Tracker.
So imagine we had the following:
1 Task A
2 Task B
3 Task C
4 Task D
5 Task E
We decide that E is now the most important task
1 Task E
2 Task A
3 Task B
4 Task C
5 Task D
I need to update all 5 tasks to give them a new priority.
If Task B then becomes more important then A I would I would have
1 Task E
2 Task B
3 Task A
4 Task C
5 Task D
I need to update Task B and A only.
What ways would go about structuring this in a DB? I imagine that you would have a differnt projects stored in the same table that would have there own weight.
Would it be better to point a Task that takes place after it (a bit like a link list).
This is just a brain dump really. Just was wondering how you would go about implementing something like this.