tree view... / #1702

I the admin view should be fixed.

Seen no tasks if there are no folders is definately a bug. I never would have thought that writing a clever hierarchical sort function for a list is that complecated. The current monster does ony make problems. Maybe somebody has another idea.

What's needed is this:
  • We have the result of a query to the database (like all tasks of a certain milestone) as a list of tasks. Some of those tasks can be folders.
  • Each of those tasks has an id and a parent field which points to the parent task.
  • We need to add missing parent folders to this list (but only the missing ones. Empty folders should be ignored).
  • We need so sort the complete list in a tree view with a member level for the indention.
e.g. list of tasks...

id type parent
01 task 02
12 folder 13
02 task 12
10 task 0
11 task 0
should be sorted as
  • 10
  • 13
    • 12
      • 02
  • 17
    • 16
      • 11

Sounds easy. Then give it a try. ;-)

I will try to have a look on the display issues, though.

tom