Fixed sub-task handling

The previous implementation of sub-tasks did not work as expected: it
was possible to mark sub-tasks as completed before the parent task's
dependencies were satisfied. In addition, it was impossible to retrieve
a task's path from the database without running a recursive query.

Full paths to sub-tasks added to views, since it is now possible to
obtain them.
This commit is contained in:
Emmanuel BENOîT 2012-02-15 10:04:11 +01:00
parent 91ae4f81fd
commit 2051303262
13 changed files with 1023 additions and 224 deletions
includes/t-items

View file

@ -48,9 +48,12 @@ class View_ItemsTree
->appendElement( HTML::make( 'a' )
->setAttribute( 'href' , $this->base . '/items/view?id=' . $item->id )
->appendText( $item->name ) ) )
->appendElement( HTML::make( 'td' )
->appendElement( $tasks = HTML::make( 'td' )
->setAttribute( 'class' , 'align-right' )
->appendRaw( (int) $item->activeTasks ) ) );
->appendRaw( $item->activeTasks ) ) );
if ( $item->activeTasksTotal != $item->activeTasks ) {
$tasks->appendText( " ({$item->activeTasksTotal})" );
}
foreach ( $children as $child ) {
$this->renderItem( $table , $child );