* code for task#1043.
This commit is contained in:
@@ -639,7 +639,7 @@ class taskModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getUserTasks($account, $type = 'assignedto', $limit = 0, $pager = null)
|
||||
public function getUserTasks($account, $type = 'assignedto', $limit = 0, $pager = null, $orderBy="id_desc")
|
||||
{
|
||||
$type = strtolower($type);
|
||||
$tasks = $this->dao->select('t1.*, t2.id as projectID, t2.name as projectName, t3.id as storyID, t3.title as storyTitle, t3.status AS storyStatus, t3.version AS latestStoryVersion')
|
||||
@@ -654,7 +654,7 @@ class taskModel extends model
|
||||
->beginIF($type == 'finishedby')->andWhere('t1.finishedby')->eq($account)->fi()
|
||||
->beginIF($type == 'closedby')->andWhere('t1.closedby')->eq($account)->fi()
|
||||
->beginIF($type == 'canceledby')->andWhere('t1.canceledby')->eq($account)->fi()
|
||||
->orderBy('id desc')
|
||||
->orderBy($orderBy)
|
||||
->beginIF($limit > 0)->limit($limit)->fi()
|
||||
->page($pager)
|
||||
->fetchAll();
|
||||
|
||||
Reference in New Issue
Block a user