Merge pull request #977 from cbattarel/3.3

[ bug #806 ] Tasks are ordered alphabetically instead of chronological order
This commit is contained in:
Laurent Destailleur 2013-05-28 15:14:02 -07:00
commit 6d2db1c09f
2 changed files with 3 additions and 3 deletions

View File

@ -33,7 +33,7 @@ English Dolibarr ChangeLog
- Fix: [ bug #866 ] Standing order from an invoice suggests invoice total amount instead of remaining to pay
- Fix: [ bug #788 ] Date of linked interventions are not shown
- Fix: external users should not see costprice and margin infos
- Fix: [ bug #806 ] Tasks are ordered alphabetically instead of chronological order
***** ChangeLog for 3.3.1 compared to 3.3 *****
- Fix: [ bug #733 ] Mass emailing tools do not support <style HTML tag

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 title 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.label";
$sql.= " ORDER BY p.ref, t.rang, t.dateo";
//print $sql;
dol_syslog(get_class($this)."::getTasksArray sql=".$sql, LOG_DEBUG);