6.0.0-beta1
9/9/25

[#5468] Task list not displayed correctly with parent/child tasks
Summary Task list not displayed correctly with parent/child tasks
Queue Nag
Queue Version HEAD
Type Bug
State Resolved
Priority 2. Medium
Owners jan (at) horde (dot) org
Requester kaosbunny (at) gmail (dot) com
Created 06/16/2007 (6660 days ago)
Due
Updated 06/27/2007 (6649 days ago)
Assigned 06/17/2007 (6659 days ago)
Resolved 06/27/2007 (6649 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
06/27/2007 11:37:29 PM Jan Schneider Comment #8
State ⇒ Resolved
Reply to this comment
This should be fixed now.
06/22/2007 09:34:00 PM Jan Schneider Comment #7 Reply to this comment
This has something to do with the PHP version. I just tried with PHP 
5.2.3 and wasn't able to reproduce exactly your problem, but instead 
one of the sub tasks was completely missing. When I tried to create a 
stripped down version of the looping code, everything worked fine of 
course. PHP sucks.
06/22/2007 07:46:17 PM kaosbunny (at) gmail (dot) com Comment #6 Reply to this comment
I know, it's totally weird. I'm beginning to wonder if it's something 
related to my PHP version (5.1.6). The major difference before and 
after my loop is that the indices are back to being id keys instead of 
being numerical. (It's the Nag_Task::sort() that makes them numerical 
when rebuilding.)

Maybe it's related.. Don't know at all. I'm really confused over this one.
06/22/2007 04:07:46 PM Jan Schneider Comment #5 Reply to this comment
Your patch doesn't make any sense and shouldn't change anything at 
all, because what you added happens exactly the same a few a lines 
below. If not, you don't have the latest code.
06/19/2007 09:53:08 PM kaosbunny (at) gmail (dot) com Comment #4
New Attachment: list.php.patch Download
Reply to this comment
I can't reproduce this, the tree renders perfectly fine with my tasks
and sub-tasks, even in the search results.
I spent some time on this, and I'm still pretty confused, but I found 
a workaround to fix it.



Seems that creating a new Nag_Task() and adding the tasks by looping 
through $tasks resolves the issue. (Basically what is done with the 
search, but without the search params.)



I realise this is not a confirmed bug, but if anyone else has this 
problem, here is a patch for it.
06/18/2007 09:09:20 AM kaosbunny (at) gmail (dot) com Comment #3
New Attachment: pear-list.txt Download
Reply to this comment
I've spent some time trying to debug this, but I'm at loss.



Trying to use var_dump() to study object structure differences didn't 
prove extremely successful.



If AAA is ticked as "completed", all subtasks are rendered correctly.



I have tried this with a fresh cvs install, and it still fails.



Is my configuration broken in some way? Are there any PEAR packages I 
might try to upgrade?



I did

cvs update framework

cd framework

php -q install-packages.php



Without anything changing.



Server setup:

Apache 2.0.55

MySQL 5.0.24a

PHP 5.1.6

Kernel  2.6.17-10-server [Ubuntu]

(Complete list of PEAR packages attached to comment.)



We use IMP to authenticate with a Postfix/MySQL setup, and use SQL as 
datatree backend for Horde.



Please let me know if there is any more info that can be helpful in 
trying to locate why this bug appears here.



On a sidenote, and I understand this is a completely different issue 
and should be reported, but I suspect it might be related snice noone 
else seems to have noticed it:

When I try to delete a task I get the error:



Fatal error: Cannot use object of type PEAR_Error as array in 
/usr/share/colab/horde/nag/task.php on line 21



It seems that the $tasklist_id argument passed to _delete() is NULL 
(which comes from the $vars->get('old_tasklist')) when it should be 
set to my userid and makes the Nag::GetTask() to fail.



This will be posted as a separate ticket with some more debug info if 
it's found to be unrelated.



But it feels like I have broken something somewhere, I just can't 
figure out where since it's a fresh install.






06/17/2007 05:15:18 PM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
I can't reproduce this, the tree renders perfectly fine with my tasks 
and sub-tasks, even in the search results.
06/17/2007 09:04:25 AM Jan Schneider Priority ⇒ 2. Medium
 
06/17/2007 01:55:58 AM Chuck Hagenbuch State ⇒ Assigned
Assigned to Jan Schneider
 
06/16/2007 11:04:34 PM kaosbunny (at) gmail (dot) com Comment #1
Priority ⇒ 3. High
Type ⇒ Bug
Summary ⇒ Task list not displayed correctly with parent/child tasks
Queue ⇒ Nag
State ⇒ Unconfirmed
Reply to this comment
Hello



It seems that tasks are not displayed correctly when you try to assign 
parent tasks to them.



First subtask disappear in standard list view, but appears in search 
results (i.e. when searching for just a space so all tasks are matched).



However, in search results the subtasks are in the wrong order, so the 
tree/level-graphics end up being wrong.



Details:

Imagine four tasks as an example; A, B, C and D.



Now, if we make A the parent of B and C, we would expect something like



A

  |- B

  `- C

D



But the displayed result is



A

  `- C

D



However, if I search for " " (just a space to match all tasks) the 
result shown is this:



A

  `- C

  |- B

D



Unfortunately the parent data doesn't appear to be saved with CSV 
export, so no live example data can be included.



Do not hesitate to contact me for further explaination or details.

Saved Queries