@@ -91,7 +93,7 @@ js::set('isCNLang', !$this->loadModel('common')->checkNotCN())
diff --git a/module/execution/config.php b/module/execution/config.php index f9b0af12cf..46880f681f 100644 --- a/module/execution/config.php +++ b/module/execution/config.php @@ -119,6 +119,39 @@ $config->execution->search['params']['canceledDate'] = array('operator' => '=' $config->execution->search['params']['lastEditedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); $config->execution->search['params']['activatedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); +$app->loadLang('execution'); +$config->execution->all = new stdclass(); +$config->execution->all->search['module'] = 'execution'; +$config->execution->all->search['fields']['name'] = $lang->execution->execName; +$config->execution->all->search['fields']['id'] = $lang->execution->execId; +$config->execution->all->search['fields']['status'] = $lang->execution->execStatus; +$config->execution->all->search['fields']['project'] = $lang->execution->project; +$config->execution->all->search['fields']['PM'] = $lang->execution->owner; +$config->execution->all->search['fields']['openedBy'] = $lang->execution->openedBy; +$config->execution->all->search['fields']['openedDate'] = $lang->execution->openedDate; +$config->execution->all->search['fields']['begin'] = $lang->execution->begin; +$config->execution->all->search['fields']['end'] = $lang->execution->end; +$config->execution->all->search['fields']['realBegan'] = $lang->execution->realBegan; +$config->execution->all->search['fields']['realEnd'] = $lang->execution->realEnd; +$config->execution->all->search['fields']['closedBy'] = $lang->execution->closedBy; +$config->execution->all->search['fields']['lastEditedDate'] = $lang->execution->lastEditedDate; +$config->execution->all->search['fields']['closedDate'] = $lang->execution->closedDate; + +$config->execution->all->search['params']['name'] = array('operator' => 'include', 'control' => 'input', 'values' => ''); +$config->execution->all->search['params']['id'] = array('operator' => '=', 'control' => 'input', 'values' => ''); +$config->execution->all->search['params']['status'] = array('operator' => '=', 'control' => 'select', 'values' => array('') + $lang->execution->statusList); +$config->execution->all->search['params']['project'] = array('operator' => '=', 'control' => 'select', 'values' => ''); +$config->execution->all->search['params']['PM'] = array('operator' => '=', 'control' => 'select', 'values' => 'users'); +$config->execution->all->search['params']['openedBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users'); +$config->execution->all->search['params']['openedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); +$config->execution->all->search['params']['begin'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); +$config->execution->all->search['params']['end'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); +$config->execution->all->search['params']['realBegan'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); +$config->execution->all->search['params']['realEnd'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); +$config->execution->all->search['params']['closedBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users'); +$config->execution->all->search['params']['lastEditedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); +$config->execution->all->search['params']['closedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); + $config->printKanban = new stdClass(); $config->printKanban->col['story'] = 1; $config->printKanban->col['wait'] = 2; diff --git a/module/execution/control.php b/module/execution/control.php index d1b3a9c8f4..48b54df4d1 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -3678,13 +3678,14 @@ class execution extends control * @param int $projectID * @param string $orderBy * @param int $productID + * @param string $param * @param int $recTotal * @param int $recPerPage * @param int $pageID * @access public * @return void */ - public function all($status = 'undone', $projectID = 0, $orderBy = 'order_asc', $productID = 0, $recTotal = 0, $recPerPage = 100, $pageID = 1) + public function all($status = 'undone', $projectID = 0, $orderBy = 'order_asc', $productID = 0, $param = '', $recTotal = 0, $recPerPage = 100, $pageID = 1) { $this->app->loadLang('my'); $this->app->loadLang('product'); @@ -3714,10 +3715,14 @@ class execution extends control $this->app->loadClass('pager', $static = true); $pager = new pager($recTotal, $recPerPage, $pageID); + $queryID = ($status == 'bySearch') ? (int)$param : 0; + $actionURL = $this->createLink('execution', 'all', "status=bySearch&projectID=$projectID&orderBy=$orderBy&productID=$productID¶m=myQueryID"); + $this->execution->buildSearchFrom($queryID, $actionURL); + $this->view->title = $this->lang->execution->allExecutions; $this->view->position[] = $this->lang->execution->allExecutions; - $executionStats = $this->project->getStats($projectID, $status, $productID, 0, 30, $orderBy, $pager); + $executionStats = $this->project->getStats($projectID, $status, $productID, 0, 30, $orderBy, $pager, false, $queryID); $parentIdList = array(); foreach($executionStats as $execution) @@ -3742,6 +3747,7 @@ class execution extends control $this->view->users = $this->loadModel('user')->getPairs('noletter'); $this->view->status = $status; $this->view->from = $from; + $this->view->param = $param; $this->view->isStage = (isset($project->model) and $project->model == 'waterfall') ? true : false; $this->display(); diff --git a/module/execution/lang/de.php b/module/execution/lang/de.php index e2c713bd1e..0ee79e91a9 100644 --- a/module/execution/lang/de.php +++ b/module/execution/lang/de.php @@ -137,6 +137,7 @@ $lang->execution->batchCreateTask = 'Batch create task'; $lang->execution->kanbanNoLinkProduct = "Kanban not linked {$lang->productCommon}"; $lang->execution->myTask = "My Task"; $lang->execution->list = "{$lang->executionCommon} List"; +$lang->execution->allProject = 'All'; /* Fields of zt_team. */ $lang->execution->root = 'Root'; diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index ee0fd4982f..cce5e775fa 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -137,11 +137,12 @@ $lang->execution->batchCreateTask = 'Batch create task'; $lang->execution->kanbanNoLinkProduct = "Kanban not linked {$lang->productCommon}"; $lang->execution->myTask = "My Task"; $lang->execution->list = 'List'; +$lang->execution->allProject = 'All'; /* Fields of zt_team. */ $lang->execution->root = 'Root'; -$lang->execution->estimate = 'estimate'; -$lang->execution->consumed = 'consumed'; +$lang->execution->estimate = 'Estimate'; +$lang->execution->consumed = 'Consumed'; $lang->execution->left = 'Left'; if($this->config->systemMode == 'new') $lang->execution->copyTeamTip = "copy Project/{$lang->execution->common} team members"; diff --git a/module/execution/lang/fr.php b/module/execution/lang/fr.php index 9915245c72..6e586431fd 100644 --- a/module/execution/lang/fr.php +++ b/module/execution/lang/fr.php @@ -137,6 +137,7 @@ $lang->execution->batchCreateTask = 'Batch create task'; $lang->execution->kanbanNoLinkProduct = "Kanban not linked {$lang->productCommon}"; $lang->execution->myTask = "My Task"; $lang->execution->list = "{$lang->executionCommon} List"; +$lang->execution->allProject = 'Tous'; /* Fields of zt_team. */ $lang->execution->root = 'Root'; diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index ea81fd5260..e74392e1c6 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -137,6 +137,7 @@ $lang->execution->batchCreateTask = '批量建任务'; $lang->execution->kanbanNoLinkProduct = "看板没有关联{$lang->productCommon}"; $lang->execution->myTask = "我的任务"; $lang->execution->list = '列表'; +$lang->execution->allProject = '全部项目'; /* Fields of zt_team. */ $lang->execution->root = '源ID'; diff --git a/module/execution/model.php b/module/execution/model.php index 7ad77afc90..0f62b516f5 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -4722,4 +4722,23 @@ class executionModel extends model echo ''; } } + + /* + * Build search form + * + * @param int $queryID + * @param string $actionURL + * @return void + * */ + public function buildSearchFrom($queryID, $actionURL) + { + $this->config->execution->all->search['queryID'] = $queryID; + $this->config->execution->all->search['actionURL'] = $actionURL; + + $projectPairs = array(0 => ''); + $projectPairs += $this->loadModel('project')->getPairsByProgram(); + $this->config->execution->all->search['params']['project']['values'] = $projectPairs + array('all' => $this->lang->execution->allProject); + + $this->loadModel('search')->setSearchParams($this->config->execution->all->search); + } } diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php index 2cca80f2ba..547fec517a 100644 --- a/module/execution/view/all.html.php +++ b/module/execution/view/all.html.php @@ -58,6 +58,7 @@ js::set('isCNLang', !$this->loadModel('common')->checkNotCN()) execution->selectProject}'");?> + execution->byQuery;?>
@@ -91,7 +93,7 @@ js::set('isCNLang', !$this->loadModel('common')->checkNotCN())