diff --git a/module/execution/control.php b/module/execution/control.php index 30dda425ab..f4280d8ba4 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2655,8 +2655,12 @@ class execution extends control $actionURL = $this->createLink('execution', 'all', "status=bySearch&orderBy=$orderBy&productID=$productID¶m=myQueryID"); $this->execution->buildSearchForm($queryID, $actionURL); + $sort = $orderBy; + if(strpos($sort, 'rawID_') !== false) $sort = str_replace('rawID_', 'id_', $sort); + if(strpos($sort, 'nameCol_') !== false) $sort = str_replace('nameCol_', 'name_', $sort); + $this->view->title = $this->lang->execution->allExecutions; - $this->view->executionStats = $this->execution->getStatData(0, $status, $productID, 0, false, $queryID, $orderBy, $pager); + $this->view->executionStats = $this->execution->getStatData(0, $status, $productID, 0, false, $queryID, $sort, $pager); $this->view->productList = $this->loadModel('product')->getProductPairsByProject(0); $this->view->productID = $productID; $this->view->pager = $pager; diff --git a/module/execution/ui/all.html.php b/module/execution/ui/all.html.php index 8432a86417..d8c45ca8c4 100644 --- a/module/execution/ui/all.html.php +++ b/module/execution/ui/all.html.php @@ -91,6 +91,8 @@ dtable set::customCols(true), set::footToolbar($footToolbar), set::onRenderCell(jsRaw('window.onRenderCell')), + set::orderBy($orderBy), + set::sortLink(createLink('execution', 'all', "status={$status}&orderBy={name}_{sortType}&productID={$productID}¶m=$param&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&page={$pager->pageID}")), set::footPager(usePager(array ( 'linkCreator' => helper::createLink('execution', 'all', "status={$status}&orderBy={$orderBy}&productID={$productID}¶m=$param&recTotal={recTotal}&recPerPage={recPerPage}&page={page}")