<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet href="http://bugs.horde.org/themes/feed-rss.xsl" type="text/xsl"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 <channel>
  <title>Task list not displayed correctly with parent/child tasks</title>
  <pubDate>Fri, 21 Nov 2008 18:33:31 -0500</pubDate>
  <link>http://bugs.horde.org/ticket/5468</link>
  <atom:link rel="self" type="application/rss+xml" title="Task list not displayed correctly with parent/child tasks" href="http://bugs.horde.org/ticket/5468/rss" />
  <description>Task list not displayed correctly with parent/child tasks</description>

  
  
  <item>
   <title>Hello 

It seems that tasks are not displayed correctly wh</title>
   <description>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 &quot; &quot; (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.</description>
   <pubDate>Sat, 16 Jun 2007 19:04:34 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/5468#t34277</link>
  </item>
  <item>
   <title>I can't reproduce this, the tree renders perfectly fine with</title>
   <description>I can't reproduce this, the tree renders perfectly fine with my tasks and sub-tasks, even in the search results.</description>
   <pubDate>Sun, 17 Jun 2007 13:15:18 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/5468#t34321</link>
  </item>
  <item>
   <title>I've spent some time trying to debug this, but I'm at loss.</title>
   <description>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 &quot;completed&quot;, 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-&gt;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.


</description>
   <pubDate>Mon, 18 Jun 2007 05:09:20 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/5468#t34348</link>
  </item>
  <item>
   <title>&gt; I can't reproduce this, the tree renders perfectly fine wi</title>
   <description>&gt; I can't reproduce this, the tree renders perfectly fine with my tasks 
&gt; 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.</description>
   <pubDate>Tue, 19 Jun 2007 17:53:08 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/5468#t34446</link>
  </item>
  <item>
   <title>Your patch doesn't make any sense and shouldn't change anyth</title>
   <description>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.</description>
   <pubDate>Fri, 22 Jun 2007 12:07:46 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/5468#t34576</link>
  </item>
  <item>
   <title>I know, it's totally weird. I'm beginning to wonder if it's </title>
   <description>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.</description>
   <pubDate>Fri, 22 Jun 2007 15:46:17 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/5468#t34577</link>
  </item>
  <item>
   <title>This has something to do with the PHP version. I just tried </title>
   <description>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.</description>
   <pubDate>Fri, 22 Jun 2007 17:34:00 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/5468#t34581</link>
  </item>
  <item>
   <title>This should be fixed now.</title>
   <description>This should be fixed now.</description>
   <pubDate>Wed, 27 Jun 2007 19:37:29 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/5468#t34787</link>
  </item>
  

 </channel>
</rss>
