diff --git a/module/build/js/create.js b/module/build/js/create.js index f74d9ca74e..96516eb760 100644 --- a/module/build/js/create.js +++ b/module/build/js/create.js @@ -14,6 +14,12 @@ $().ready(function() if(data) $('#buildBox').html(data); $('#builds').attr('data-placeholder', multipleSelect).chosen(); }); + + $.get(createLink('product', 'ajaxGetProductById', 'produtID=' + productID), function(data) + { + console.log(data.branchName) + $('#branchBox').closest('tr').find('th').text(data.branchName); + }, 'json'); }); $('input[name=isIntegrated]').change(function() @@ -69,6 +75,11 @@ function loadProducts(executionID) loadBranches($("#product").val()); } }); + + $.get(createLink('product', 'ajaxGetProductById', 'produtID=' + $("#product").val()), function(data) + { + $('#branchBox').closest('tr').find('th').text(data.branchName); + }, 'json'); loadLastBuild(); } diff --git a/module/build/view/create.html.php b/module/build/view/create.html.php index d2b96aadc9..40269a87dd 100644 --- a/module/build/view/create.html.php +++ b/module/build/view/create.html.php @@ -45,7 +45,7 @@ '> - build->branch;?> + type == 'normal' ? '' : $lang->product->branchName[$product->type]?>
branches), "class='form-control chosen' multiple required"); ?> diff --git a/module/product/control.php b/module/product/control.php index c1d0f08da2..f4bcefe82b 100755 --- a/module/product/control.php +++ b/module/product/control.php @@ -356,7 +356,7 @@ class product extends control $this->view->productName = $productName; $this->view->moduleID = $moduleID; $this->view->stories = $stories; - $this->view->plans = $this->loadModel('productplan')->getPairs($productID, ($branch === 'all' or empty($branch)) ? '' : $branch, '', true); + $this->view->plans = $this->loadModel('productplan')->getPairs($productID, ($branch === 'all' or empty($branch)) ? '' : $branch, 'unexpired', true); $this->view->productPlans = isset($productPlans) ? array(0 => '') + $productPlans : array(); $this->view->summary = $this->product->summary($stories, $storyType); $this->view->moduleTree = $moduleTree; diff --git a/module/projectrelease/css/browse.css b/module/projectrelease/css/browse.css index 8f2f032ebf..f9c5e49f9e 100644 --- a/module/projectrelease/css/browse.css +++ b/module/projectrelease/css/browse.css @@ -2,6 +2,7 @@ #releaseList tr:hover {background-color:unset;} td {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} -.c-build {width: 250px;} +.c-build {width: 300px;} +.c-branch {width: 200px;} td.c-build {padding-left:8px !important;} .c-product, .c-execution {width: 120px;} diff --git a/module/projectrelease/model.php b/module/projectrelease/model.php index ee948df18b..57dc9aed5d 100644 --- a/module/projectrelease/model.php +++ b/module/projectrelease/model.php @@ -85,7 +85,20 @@ class projectreleaseModel extends model { $release->project = trim($release->project, ','); $release->branch = trim($release->branch, ','); - $release->build = trim($release->build, ','); + + $branchName = ''; + if($release->branch != 'normal') + { + foreach(explode(',', $release->branch) as $releaseBranch) + { + $branchName .= $this->loadModel('branch')->getById($releaseBranch); + $branchName .= ','; + } + $branchName = trim($branchName, ','); + } + $release->branchName = empty($branchName) ? $this->lang->branch->main : $branchName; + $release->build = trim($release->build, ','); + $buildIdList = array_merge($buildIdList, explode(',', $release->build)); } diff --git a/module/projectrelease/view/browse.html.php b/module/projectrelease/view/browse.html.php index e33a987c22..39e62aca76 100644 --- a/module/projectrelease/view/browse.html.php +++ b/module/projectrelease/view/browse.html.php @@ -53,6 +53,7 @@ projectrelease->product;?> release->includedBuild;?> + release->branch;?> release->status;?> release->date;?> createLink($build->execution ? 'build' : 'projectbuild', 'view', "buildID=$buildID"), $build->name, '', "data-app='project' title='{$build->name}'");?> processStatus('release', $release);?> + class='c-branch text-center'>branchName; ?> class='c-status text-center' title=''> diff --git a/module/release/model.php b/module/release/model.php index 87aa0a513d..ad4bd7fa29 100644 --- a/module/release/model.php +++ b/module/release/model.php @@ -236,7 +236,11 @@ class releaseModel extends model if($linkedBuilds) $builds += $this->dao->select('id,project,branch,builds,stories,bugs')->from(TABLE_BUILD)->where('id')->in($linkedBuilds)->fetchAll('id'); foreach($builds as $build) { - $branches[$build->branch] = $build->branch; + foreach(explode(',', $build->branch) as $buildBranch) + { + if(!isset($branches[$buildBranch])) $branches[$buildBranch] = $buildBranch; + } + $projects[$build->project] = $build->project; if($this->post->sync)