Task predecessor/dependencies logic for task management application
Posted
by Serge
on Stack Overflow
See other posts from Stack Overflow
or by Serge
Published on 2010-04-09T17:55:59Z
Indexed on
2010/04/09
18:03 UTC
Read the original article
Hit count: 302
Hey guys,
I'm trying to figure out the logic for creating tasks that have dependencies. In short I'm building a dynamic task management system and each tasks has several options one of them is to have the task start after a predecessor.
Users can add/remove/re-order (by drag&drop) tasks so I'm wondering how can I make the predecessors dynamic, here's an example of what I mean
- Task 1
- Task 2
- Task 3 -> dependent of task 2
- Task 4 -> dependent of task 2
Tasks get renamed on delete and/or re-order. If task 1 gets deleted then 3 and 4 should become dependent of task 1 (which is the old task 2). I've been banging my head for the past few hours trying to figure out how to do that.
I'm using jQuery right now and each task is contained in a div with an incremental id (ie id="task1") that gets renamed whenever a task is removed or re-ordered and I'm using a dynamically populated drop down for selecting a predecessor.
What would be the easiest way to get this done??
by the way, I'm not necessarily asking for code, just trying to figure out the best way to tackle this
© Stack Overflow or respective owner