[Tickets #5480] Parent lost when completing via checkbox image
bugs at bugs.horde.org
bugs at bugs.horde.org
Tue Jun 19 21:48:13 UTC 2007
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/?id=5480
-----------------------------------------------------------------------
Ticket | 5480
Created By | kaosbunny at gmail.com
Summary | Parent lost when completing via checkbox image
Queue | Nag
Version | HEAD
Type | Bug
State | Unconfirmed
Priority | 1. Low
Owners |
-----------------------------------------------------------------------
kaosbunny at gmail.com (2007-06-19 14:48) wrote:
When completing a task with a parent_task the parent gets lost when the
task completion is updated.
>From what I could see, this stems from some confusion between
$task->parent and $task->parent_id when loading/saving/merging the task.
The problem is probably in Nag_Driver_sql::_buildTree() but can also be
seen in Nag_Task::merge() in the lines 562-565:
} elseif ($key == 'parent') {
$key = 'parent_id';
}
$this->$key = $val;
parent contains the data from parent_task, but the substitution above
becomes a problem, since both parent and parent_id are already present in
the task being merged, which results in it being overwritten when the $key
is actually 'parent_id' (which comes after $key == 'parent') in the order
of the properties.
I felt that tasks being passed around like this requires a more solid
understanding of the framework, so I haven't studied it much further than
this.
More information about the bugs
mailing list