sort tasks by start date

This commit is contained in:
Christophe Battarel 2013-05-25 11:49:05 +02:00
parent 5de7f77a09
commit b8c51e3760

View File

@ -479,7 +479,7 @@ class Task extends CommonObject
/**
* Return list of tasks for all projects or for one particular project
* Sort order is on project, then on position of task, and last on creation date of first level task
* Sort order is on project, then on position of task, and last on start date of first level task
*
* @param User $usert Object user to limit tasks affected to a particular user
* @param User $userp Object user to limit projects of a particular user and public projects
@ -519,7 +519,7 @@ class Task extends CommonObject
if ($projectid) $sql.= " AND p.rowid in (".$projectid.")";
}
if ($filteronprojref) $sql.= " AND p.ref LIKE '%".$filteronprojref."%'";
$sql.= " ORDER BY p.ref, t.rang, t.datec";
$sql.= " ORDER BY p.ref, t.rang, t.dateo";
//print $sql;
dol_syslog(get_class($this)."::getTasksArray sql=".$sql, LOG_DEBUG);