tasks/includes/t-data/item.inc.php
Emmanuel BENOîT 2051303262 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.
2012-02-15 10:48:11 +01:00

44 lines
611 B
PHP

<?php
class Data_Item
{
public $id;
public $name;
public $description;
public $hasParent;
public $parent;
public $children;
public $depth;
public $lineage;
public $activeTasks = 0;
public $activeTasksTotal = 0;
public $inactiveTasks;
public function __construct( $id , $name )
{
$this->id = $id;
$this->name = $name;
}
public function getIdentifier( )
{
return $this->id;
}
public function getName( )
{
return $this->name;
}
public function getDepth( )
{
if ( $this->depth === null ) {
throw new Exception( "Method not implemented" );
}
return $this->depth;
}
}