diff --git a/module/product/control.php b/module/product/control.php index 7b9cb7df3f..c07232765c 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -973,6 +973,12 @@ class product extends control */ public function ajaxGetExecutions($productID, $projectID = 0, $branch = 0, $number = '', $executionID = 0) { + if($this->app->tab == 'execution' and $this->session->execution) + { + $execution = $this->loadModel('execution')->getByID($this->session->execution); + if($execution->type == 'kanban') $projectID = $execution->project; + } + $executions = $this->product->getExecutionPairsByProduct($productID, $branch, 'id_desc', $projectID); if($this->app->getViewType() == 'json') return print(json_encode($executions)); diff --git a/module/product/model.php b/module/product/model.php index e8686aa1ce..ae1e0d414c 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -1227,7 +1227,7 @@ class productModel extends model $executions = $this->dao->select('t2.id,t2.project,t2.name,t2.grade,t2.parent')->from(TABLE_PROJECTPRODUCT)->alias('t1') ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') ->where('t1.product')->eq($productID) - ->andWhere('t2.type')->in('stage,sprint') + ->andWhere('t2.type')->in('stage,sprint,kanban') ->beginIF($branch)->andWhere('t1.branch')->in($branch)->fi() ->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->sprints)->fi() ->andWhere('t2.deleted')->eq('0') @@ -1712,7 +1712,7 @@ class productModel extends model $executionListKey = $this->config->systemMode == 'new' ? 'project' : 'productID'; $executionList = $this->dao->select('t1.product as productID,t2.*')->from(TABLE_PROJECTPRODUCT)->alias('t1') ->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.project=t2.id') - ->where('type')->in('stage,sprint') + ->where('type')->in('stage,sprint,kanban') ->beginIF($this->config->systemMode == 'new')->andWhere('t2.project')->in(array_keys($projectList))->fi() ->beginIF(!$this->app->user->admin)->andWhere('t1.project')->in($this->app->user->view->sprints)->fi() ->andWhere('t1.product')->in(array_keys($productList))