diff --git a/module/execution/control.php b/module/execution/control.php index 23e12a6ecc..b97958c31b 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1876,7 +1876,6 @@ class execution extends control $this->view->title = $this->app->tab == 'execution' ? $this->lang->execution->createExec : $this->lang->execution->create; $this->view->position[] = $this->view->title; $this->view->gobackLink = (isset($output['from']) and $output['from'] == 'global') ? $this->createLink('execution', 'all') : ''; - $this->view->executions = array('' => '') + $this->execution->getList($projectID); $this->view->groups = $this->loadModel('group')->getPairs(); $this->view->allProducts = $allProducts; $this->view->acl = $acl; @@ -1887,7 +1886,7 @@ class execution extends control $this->view->teams = array(0 => '') + $this->execution->getCanCopyObjects((int)$projectID); $this->view->allProjects = array(0 => '') + $this->project->getPairsByModel('all', 0, 'noclosed,multiple'); $this->view->copyProjects = $copyProjects; - $this->view->copyExecutions = array('' => '') + $this->execution->getList($copyProjectID); + $this->view->copyExecutions = array('' => '') + $this->execution->getList($copyProjectID, 'all', 'all', 0, 0, 0, null, false); $this->view->executionID = $executionID; $this->view->productID = $productID; $this->view->projectID = $projectID; @@ -4447,7 +4446,7 @@ class execution extends control */ public function ajaxGetCopyProjectExecutions($projectID = 0) { - $executions = $this->execution->getList($projectID); + $executions = $this->execution->getList($projectID, 'all', 'all', 0, 0, 0, null, false); echo json_encode($executions); } diff --git a/module/execution/model.php b/module/execution/model.php index dd1dc9d835..76f9b07418 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1742,10 +1742,11 @@ class executionModel extends model * @param int $productID * @param int $branch * @param object $pager + * @param bool $withChildren * @access public * @return array */ - public function getList($projectID = 0, $type = 'all', $status = 'all', $limit = 0, $productID = 0, $branch = 0, $pager = null) + public function getList($projectID = 0, $type = 'all', $status = 'all', $limit = 0, $productID = 0, $branch = 0, $pager = null, $withChildren = true) { if($status == 'involved') return $this->getInvolvedExecutionList($projectID, $status, $limit, $productID, $branch); @@ -1762,6 +1763,7 @@ class executionModel extends model ->beginIF($branch)->andWhere('t1.branch')->eq($branch)->fi() ->beginIF($status != 'all' and $status != 'undone')->andWhere('status')->in($status)->fi() ->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->sprints)->fi() + ->beginIF(!$withChildren)->andWhere('grade')->eq(1)->fi() ->orderBy('order_desc') ->page($pager) ->beginIF($limit)->limit($limit)->fi() @@ -1778,6 +1780,7 @@ class executionModel extends model ->beginIF($status == 'undone')->andWhere('status')->notIN('done,closed')->fi() ->beginIF($status != 'all' and $status != 'undone')->andWhere('status')->in($status)->fi() ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->sprints)->fi() + ->beginIF(!$withChildren)->andWhere('grade')->eq(1)->fi() ->orderBy('order_desc') ->page($pager) ->beginIF($limit)->limit($limit)->fi() diff --git a/module/execution/view/create.html.php b/module/execution/view/create.html.php index bb3d9a2e73..cb134dfd7e 100644 --- a/module/execution/view/create.html.php +++ b/module/execution/view/create.html.php @@ -309,15 +309,14 @@