diff --git a/module/execution/control.php b/module/execution/control.php index 677e65c7b3..dc0dd1e534 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2591,10 +2591,12 @@ class execution extends control $executionID = $execution->id; } $this->session->set('executionList', $this->app->getURI(true)); + $projectID = 0; } elseif($from == 'project') { $this->lang->navGroup->execution = 'project'; + $projectID = $this->session->PRJ; } /* Load pager and get tasks. */ @@ -2604,7 +2606,7 @@ class execution extends control $this->view->title = $this->lang->execution->allExecutions; $this->view->position[] = $this->lang->execution->allExecutions; - $this->view->executionStats = $this->project->getStats($this->session->PRJ, $status, $productID, 0, 30, $orderBy, $pager); + $this->view->executionStats = $this->project->getStats($projectID, $status, $productID, 0, 30, $orderBy, $pager); $this->view->products = array(0 => $this->lang->product->select) + $this->loadModel('product')->getProductPairsByProject($this->session->PRJ); $this->view->productID = $productID; $this->view->executionID = $executionID; diff --git a/module/execution/model.php b/module/execution/model.php index a619d51013..f7547627c6 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -896,6 +896,8 @@ class executionModel extends model */ public function getSwitcher($executionID, $currentModule, $currentMethod) { + if($currentMethod == 'index' or $currentMethod == 'all') return; + $this->session->set('moreExecutionLink', $this->app->getURI(true)); $currentExecutionName = $this->lang->execution->common; diff --git a/module/project/model.php b/module/project/model.php index 67505c5ab8..b026b0c13e 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1439,7 +1439,8 @@ class projectModel extends model if(empty($productID)) { $executions = $this->dao->select('*')->from(TABLE_EXECUTION) - ->where('project')->eq($projectID) + ->where('type')->in('sprint,stage') + ->beginIF($projectID != 0)->andWhere('project')->eq($projectID)->fi() ->beginIF($status == 'undone')->andWhere('status')->notIN('done,closed')->fi() ->beginIF($status != 'all' and $status != 'undone')->andWhere('status')->eq($status)->fi() ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->sprints)->fi()