diff --git a/module/execution/control.php b/module/execution/control.php index 2566465bea..4ee20b733c 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -188,7 +188,7 @@ class execution extends control $this->app->session->set('taskList', $uri . "#app={$this->app->tab}", 'execution'); /* Process the order by field. */ - if(!$orderBy) $orderBy = $this->cookie->executionTaskOrder ? $this->cookie->executionTaskOrder : 'status,id_desc'; + if(!$orderBy) $orderBy = $this->cookie->executionTaskOrder ? $this->cookie->executionTaskOrder : 'status,id_asc'; setcookie('executionTaskOrder', $orderBy, 0, $this->config->webRoot, '', false, true); /* Append id for secend sort. */ diff --git a/module/execution/model.php b/module/execution/model.php index 737a77f31b..28ced4e632 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -2587,7 +2587,7 @@ class executionModel extends model ->where('deleted')->eq(0) ->andWhere('status')->notin('closed,cancel') ->andWhere('execution')->in($executionIdList) - ->orderBy('order_asc,id_desc') + ->orderBy('order_asc,id_asc') ->fetchGroup('execution', 'id'); $taskIdList = array(); diff --git a/module/programplan/model.php b/module/programplan/model.php index e46a1d95ac..3e94517efe 100755 --- a/module/programplan/model.php +++ b/module/programplan/model.php @@ -259,7 +259,7 @@ class programplanModel extends model if(empty($selectCustom)) $selectCustom = $this->loadModel('setting')->getItem("owner={$owner}&module={$module}§ion={$section}&key={$object}"); - $tasks = $this->dao->select('*')->from(TABLE_TASK)->where('deleted')->eq(0)->andWhere('execution')->in($planIdList)->orderBy('execution_asc, order_asc, id_desc')->fetchAll('id'); + $tasks = $this->dao->select('*')->from(TABLE_TASK)->where('deleted')->eq(0)->andWhere('execution')->in($planIdList)->orderBy('execution_asc, order_asc, id_asc')->fetchAll('id'); $taskTeams = $this->dao->select('task,account')->from(TABLE_TASKTEAM)->where('task')->in(array_keys($tasks))->fetchGroup('task', 'account'); $users = $this->loadModel('user')->getPairs('noletter');