diff --git a/module/build/model.php b/module/build/model.php index 3283ec5786..b43b55adfb 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -544,10 +544,12 @@ class buildModel extends model if($type == 'browse') { $executionID = $tab == 'execution' ? $extraParams['executionID'] : $build->execution; + $execution = $this->loadModel('execution')->getByID($executionID); + $testtaskApp = (!empty($execution->type) and $execution->type == 'kanban') ? 'data-app="qa"' : "data-app='{$tab}'"; if(common::hasPriv('build', 'linkstory') and common::canBeChanged('build', $build)) $menu .= $this->buildMenu('build', 'view', "{$params}&type=story&link=true", $build, $type, 'link', '', '', '', "data-app={$tab}", $this->lang->build->linkStory); - $menu .= $this->buildMenu('testtask', 'create', "product=$build->product&execution={$executionID}&build=$build->id", $build, $type, 'bullhorn', '', '', '', "data-app='{$tab}'"); + $menu .= $this->buildMenu('testtask', 'create', "product=$build->product&execution={$executionID}&build=$build->id", $build, $type, 'bullhorn', '', '', '', $testtaskApp); if($tab == 'execution') $menu .= $this->buildMenu('execution', 'bug', "execution={$extraParams['executionID']}&productID={$extraParams['productID']}&orderBy=status&build=$build->id", $build, $type, '', '', '', '', $this->lang->execution->viewBug); if($tab == 'project') $menu .= $this->buildMenu('build', 'view', "{$params}&type=generatedBug", $build, $type, 'bug', '', '', '', "data-app='project'", $this->lang->project->bug); diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php index f0027aabb1..a5effd5d81 100644 --- a/module/common/lang/menu.php +++ b/module/common/lang/menu.php @@ -291,9 +291,15 @@ $lang->waterfall->menu->design['subMenu']->ads = array('link' => "{$lang->d $lang->waterfall->menu->design['subMenu']->bysearch = array('link' => ' ' . $lang->searchAB . ''); /* Kanban project menu. */ -$lang->kanban->menu = new stdclass(); -$lang->kanban->menuOrder = array(); -$lang->kanban->dividerMenu = ''; +$lang->kanbanProject = new stdclass(); +$lang->kanbanProject->menu = new stdclass(); +$lang->kanbanProject->menu->index = array('link' => "{$lang->kanban->common}|project|index|project=%s"); +$lang->kanbanProject->menu->build = array('link' => "{$lang->build->common}|project|build|project=%s"); + +$lang->kanbanProject->menuOrder = array(); +$lang->kanbanProject->menuOrder[5] = 'index'; +$lang->kanbanProject->menuOrder[10] = 'build'; +$lang->kanbanProject->dividerMenu = ''; /* Execution menu. */ $lang->execution->homeMenu = new stdclass(); diff --git a/module/execution/model.php b/module/execution/model.php index 5f8e1727b2..482348b260 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -67,6 +67,9 @@ class executionModel extends model if($execution and $execution->type == 'kanban') { $this->lang->execution->menu = new stdclass(); + $this->lang->execution->menu->kanban = array('link' => "{$this->lang->kanban->common}|execution|kanban|executionID=%s"); + $this->lang->execution->menu->build = array('link' => "{$this->lang->build->common}|execution|build|executionID=%s"); + $this->lang->execution->dividerMenu = ''; $this->lang->execution->accessDenied = str_replace($this->lang->executionCommon, $this->lang->execution->kanban, $this->lang->execution->accessDenied); } diff --git a/module/project/model.php b/module/project/model.php index 86027b4422..54e445c67c 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -2483,7 +2483,13 @@ class projectModel extends model $project = $this->getByID($objectID); $model = 'scrum'; - if($project) $model = $project->model; + if($project and $project->model == 'waterfall') $model = $project->model; + if($project and $project->model == 'kanban') + { + $model = $project->model . 'Project'; + + $lang->executionCommon = $lang->project->kanban; + } if(isset($lang->$model)) { diff --git a/module/testtask/control.php b/module/testtask/control.php index d295f3639d..8d29af46bc 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -248,6 +248,9 @@ class testtask extends control $executions = empty($productID) ? array() : $this->loadModel('product')->getExecutionPairsByProduct($productID, '', 'id_desc', $projectID); $builds = empty($productID) ? array() : $this->loadModel('build')->getBuildPairs($productID, 'all', 'notrunk'); + $execution = $this->loadModel('execution')->getByID($executionID); + if(!empty($execution) and $execution->type == 'kanban') $this->lang->testtask->execution = str_replace($this->lang->execution->common, $this->lang->kanban->common, $this->lang->testtask->execution); + /* Set menu. */ $productID = $this->product->saveState($productID, $this->products);