| comment;?> |
@@ -56,4 +56,8 @@
+product);
+js::set('releasedBuild', $lang->build->releasedBuild);
+?>
diff --git a/module/bug/view/batchcreate.html.php b/module/bug/view/batchcreate.html.php
index c93fe27e54..eb34d2370a 100755
--- a/module/bug/view/batchcreate.html.php
+++ b/module/bug/view/batchcreate.html.php
@@ -13,6 +13,8 @@
bug->create->requiredFields);
+js::set('productID', $productID);
+js::set('releasedBuild', $lang->build->releasedBuild);
?>
bug->create->requiredFields) as $field)
|
projectBox' style='overflow:visible'> |
executionBox' style='overflow:visible'> |
- |
+ |
@@ -163,7 +165,7 @@ foreach(explode(',', $config->bug->create->requiredFields) as $field)
|
projectBox' style='overflow:visible'> |
executionBox' style='overflow:visible'> |
- |
+ |
@@ -224,7 +226,7 @@ foreach(explode(',', $config->bug->create->requiredFields) as $field)
|
projectBox' style='overflow:visible'> |
executionBox' style='overflow:visible'> |
- |
+ |
@@ -267,7 +269,7 @@ foreach(explode(',', $config->bug->create->requiredFields) as $field)
|
projectBox' style='overflow:visible'> |
executionBox' style='overflow:visible'> |
- |
+ |
diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php
index 79c85912a5..0a665ed306 100644
--- a/module/bug/view/browse.html.php
+++ b/module/bug/view/browse.html.php
@@ -328,7 +328,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
{
$actionLink = $this->createLink('bug', 'batchResolve', "resolution=fixed&resolvedBuild=$key");
echo " ";
- echo html::a('javascript:;', $build, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin', '#bugList')\"");
+ echo html::a('javascript:;', (in_array($key, $releasedBuilds) ? "{$lang->build->releasedBuild} " : '') . $build, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin', '#bugList')\"");
echo "";
}
echo "";
diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php
index 1ff2b23c25..3cb9f567a2 100644
--- a/module/bug/view/create.html.php
+++ b/module/bug/view/create.html.php
@@ -30,6 +30,8 @@ js::set('tab', $this->app->tab);
js::set('requiredFields', $config->bug->create->requiredFields);
js::set('showFields', $showFields);
js::set('projectExecutionPairs', $projectExecutionPairs);
+js::set('productID', $productID);
+js::set('releasedBuild', $lang->build->releasedBuild);
if($this->app->tab == 'execution') js::set('objectID', zget($execution, 'id', ''));
if($this->app->tab == 'project') js::set('objectID', $projectID);
?>
@@ -128,7 +130,7 @@ if($this->app->tab == 'project') js::set('objectID', $projectID);
diff --git a/module/bug/view/edit.html.php b/module/bug/view/edit.html.php
index f2411a486b..5abdec20a3 100644
--- a/module/bug/view/edit.html.php
+++ b/module/bug/view/edit.html.php
@@ -30,6 +30,8 @@ js::set('bugID' , $bug->id);
js::set('bugBranch' , $bug->branch);
js::set('isClosedBug' , $bug->status == 'closed');
js::set('projectExecutionPairs' , $projectExecutionPairs);
+js::set('productID' , $product->id);
+js::set('releasedBuild' , $lang->build->releasedBuild);
if($this->app->tab == 'execution') js::set('objectID', $bug->execution);
if($this->app->tab == 'project') js::set('objectID', $bug->project);
?>
@@ -100,7 +102,7 @@ if($this->app->tab == 'project') js::set('objectID', $bug->project);
| bug->product;?> |
-
+ id, "onchange='loadAll(this.value)' class='form-control chosen'");?>
type != 'normal') echo html::select('branch', $branchTagOption, $bug->branch, "onchange='loadBranch();' class='form-control'");?>
|
@@ -114,9 +116,9 @@ if($this->app->tab == 'project') js::set('objectID', $bug->project);
if(count($moduleOptionMenu) == 1)
{
echo " ";
- echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=bug¤tModuleID=0&branch=$bug->branch", '', true), $lang->tree->manage, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'");
+ echo html::a($this->createLink('tree', 'browse', "rootID={$product->id}&view=bug¤tModuleID=0&branch=$bug->branch", '', true), $lang->tree->manage, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'");
echo ' ';
- echo html::a("javascript:void(0)", $lang->refreshIcon, '', "class='refresh' title='$lang->refresh' onclick='loadProductModules($productID)'");
+ echo html::a("javascript:void(0)", $lang->refreshIcon, '', "class='refresh' title='$lang->refresh' onclick='loadProductModules($product->id)'");
echo '';
}
?>
@@ -240,7 +242,7 @@ if($this->app->tab == 'project') js::set('objectID', $bug->project);
bug->openedBuild;?> |
- openedBuild, 'size=4 multiple=multiple class="chosen form-control"');?>
+ openedBuild, 'size=4 multiple=multiple class="picker-select form-control"');?>
bug->allBuilds, "class='btn' onclick='loadAllBuilds(this)'")?>
|
@@ -257,7 +259,7 @@ if($this->app->tab == 'project') js::set('objectID', $bug->project);
bug->resolvedBuild;?> |
- resolvedBuild, "class='form-control chosen'");?>
+ resolvedBuild, "class='form-control picker-select'");?>
bug->allBuilds, "class='btn' onclick='loadAllBuilds(this)'")?>
|
diff --git a/module/bug/view/resolve.html.php b/module/bug/view/resolve.html.php
index aea25327aa..b284f83a5c 100644
--- a/module/bug/view/resolve.html.php
+++ b/module/bug/view/resolve.html.php
@@ -14,8 +14,9 @@
product);
+js::set('page', 'resolve');
+js::set('productID', $bug->product);
+js::set('releasedBuild', $lang->build->releasedBuild);
?>
@@ -49,7 +50,7 @@ js::set('productID' , $bug->product);
|
-
+
bug->placeholder->newBuildName}'");?>
|
diff --git a/module/build/control.php b/module/build/control.php
index a479bdba7e..f2772a442f 100644
--- a/module/build/control.php
+++ b/module/build/control.php
@@ -385,32 +385,38 @@ class build extends control
* @param string|int $branch
* @param int $index the index of batch create bug.
* @param string $type get all builds or some builds belong to normal releases and executions are not done.
+ * @param string $extra
* @access public
* @return string
*/
- public function ajaxGetProductBuilds($productID, $varName, $build = '', $branch = 'all', $index = 0, $type = 'normal')
+ public function ajaxGetProductBuilds($productID, $varName, $build = '', $branch = 'all', $index = 0, $type = 'normal', $extra = '')
{
$isJsonView = $this->app->getViewType() == 'json';
if($varName == 'openedBuild' )
{
- $params = ($type == 'all') ? 'noempty,withbranch' : 'noempty,noterminate,nodone,withbranch';
+ $params = ($type == 'all') ? 'noempty,withbranch,noreleased' : 'noempty,noterminate,nodone,withbranch,noreleased';
$builds = $this->build->getBuildPairs($productID, $branch, $params, 0, 'project', $build);
if($isJsonView) return print(json_encode($builds));
return print(html::select($varName . '[]', $builds, $build, 'size=4 class=form-control multiple'));
}
if($varName == 'openedBuilds' )
{
- $builds = $this->build->getBuildPairs($productID, $branch, 'noempty', 0, 'project', $build);
+ $builds = $this->build->getBuildPairs($productID, $branch, 'noempty,noreleased', 0, 'project', $build);
if($isJsonView) return print(json_encode($builds));
return print(html::select($varName . "[$index][]", $builds, $build, 'size=4 class=form-control multiple'));
}
if($varName == 'resolvedBuild')
{
- $params = ($type == 'all') ? 'withbranch' : 'noterminate,nodone,withbranch';
+ $params = ($type == 'all') ? 'withbranch,noreleased' : 'noterminate,nodone,withbranch,noreleased';
$builds = $this->build->getBuildPairs($productID, $branch, $params, 0, 'project', $build);
if($isJsonView) return print(json_encode($builds));
return print(html::select($varName, $builds, $build, "class='form-control'"));
}
+
+ $builds = $this->build->getBuildPairs($productID, $branch, $type, 0, 'project', $build);
+ if(strpos($extra, 'multiple') !== false) $varName .= '[]';
+ if($isJsonView) return print(json_encode($builds));
+ return print(html::select($varName, $builds, $build, "class='form-control chosen' $extra"));
}
/**
@@ -434,7 +440,7 @@ class build extends control
{
if(empty($projectID)) return $this->ajaxGetProductBuilds($productID, $varName, $build, $branch, $index, $type);
- $params = ($type == 'all') ? 'noempty,withbranch' : 'noempty,noterminate,nodone,withbranch';
+ $params = ($type == 'all') ? 'noempty,withbranch,noreleased' : 'noempty,noterminate,nodone,withbranch,noreleased';
$builds = $this->build->getBuildPairs($productID, $branch, $params, $projectID, 'project', $build);
if($isJsonView) return print(json_encode($builds));
return print(html::select($varName . '[]', $builds , '', 'size=4 class=form-control multiple'));
@@ -443,13 +449,13 @@ class build extends control
{
if(empty($projectID)) return $this->ajaxGetProductBuilds($productID, $varName, $build, $branch, $index, $type);
- $params = ($type == 'all') ? 'withbranch' : 'noterminate,nodone,withbranch';
+ $params = ($type == 'all') ? 'withbranch,noreleased' : 'noterminate,nodone,withbranch,noreleased';
$builds = $this->build->getBuildPairs($productID, $branch, $params, $projectID, 'project', $build);
if($isJsonView) return print(json_encode($builds));
return print(html::select($varName, $builds, $build, "class='form-control'"));
}
- if(empty($projectID)) return $this->ajaxGetProductBuilds($productID, $varName, $build, $branch, $index, $type);
+ if(empty($projectID)) return $this->ajaxGetProductBuilds($productID, $varName, $build, $branch, $index, $type, $extra);
$builds = $this->build->getBuildPairs($productID, $branch, $type, $projectID, 'project', $build, false);
if(strpos($extra, 'multiple') !== false) $varName .= '[]';
if($isJsonView) return print(json_encode($builds));
@@ -478,7 +484,7 @@ class build extends control
{
if(empty($executionID)) return $this->ajaxGetProductBuilds($productID, $varName, $build, $branch, $index, $type);
- $params = ($type == 'all') ? 'noempty' : 'noempty,noterminate,nodone';
+ $params = ($type == 'all') ? 'noempty,noreleased' : 'noempty,noterminate,nodone,noreleased';
$builds = $this->build->getBuildPairs($productID, $branch, $params, $executionID, 'execution', $build);
if($isJsonView) return print(json_encode($builds));
@@ -489,7 +495,7 @@ class build extends control
{
if(empty($executionID)) return $this->ajaxGetProductBuilds($productID, $varName, $build, $branch, $index, $type);
- $builds = $this->build->getBuildPairs($productID, $branch, 'noempty', $executionID, 'execution', $build);
+ $builds = $this->build->getBuildPairs($productID, $branch, 'noempty,noreleased', $executionID, 'execution', $build);
if($isJsonView) return print(json_encode($builds));
return print(html::select($varName . "[$index][]", $builds , $build, 'size=4 class=form-control multiple'));
}
@@ -497,14 +503,14 @@ class build extends control
{
if(empty($executionID)) return $this->ajaxGetProductBuilds($productID, $varName, $build, $branch, $index, $type);
- $params = ($type == 'all') ? '' : 'noterminate,nodone';
+ $params = ($type == 'all') ? ',noreleased' : 'noterminate,nodone,noreleased';
$builds = $this->build->getBuildPairs($productID, $branch, $params, $executionID, 'execution', $build);
if($isJsonView) return print(json_encode($builds));
return print(html::select($varName, $builds, $build, "class='form-control'"));
}
if($varName == 'testTaskBuild')
{
- $builds = $this->build->getBuildPairs($productID, $branch, 'noempty,notrunk', $executionID, 'execution');
+ $builds = $this->build->getBuildPairs($productID, $branch, 'noempty,notrunk', $executionID, 'execution', '', false);
if($isJsonView) return print(json_encode($builds));
if(empty($builds))
@@ -543,7 +549,7 @@ class build extends control
{
$lastBuild = $this->build->getLast($executionID, $projectID);
if($lastBuild)
- {
+ {
echo "";
}
else
@@ -714,7 +720,7 @@ class build extends control
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getPairsForStory($build->product, $build->branch, 'skipParent');
$this->config->bug->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($build->product, 'bug', 0, $build->branch);
$this->config->bug->search['params']['execution']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($build->product, $build->branch, 'id_desc', $this->session->project);
- $this->config->bug->search['params']['openedBuild']['values'] = $this->build->getBuildPairs($build->product, $branch = 'all', $params = '');
+ $this->config->bug->search['params']['openedBuild']['values'] = $this->build->getBuildPairs($build->product, $branch = 'all', $params = 'releasetag');
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->config->bug->search['params']['openedBuild']['values'];
unset($this->config->bug->search['fields']['product']);
diff --git a/module/build/lang/de.php b/module/build/lang/de.php
index 58e816e8fe..0164196034 100644
--- a/module/build/lang/de.php
+++ b/module/build/lang/de.php
@@ -36,6 +36,7 @@ $lang->build->execution = $lang->executionCommon;
$lang->build->integrated = 'Integrated';
$lang->build->singled = 'Singled';
$lang->build->builds = 'Included Builds';
+$lang->build->releasedBuild = 'Released Build';
$lang->build->name = 'Name';
$lang->build->date = 'Datum';
$lang->build->builder = 'Builder';
@@ -60,6 +61,7 @@ $lang->build->notice->changeProduct = "The {$lang->SRCommon}, bug, or the vers
$lang->build->notice->changeExecution = "The version of the submitted test order cannot be modified {$lang->executionCommon}";
$lang->build->notice->changeBuilds = "The version of the submitted test order cannot be modified builds";
$lang->build->notice->autoRelation = "The completed requirements, resolved bugs, and generated bugs under the relevant version will be automatically associated with the project version";
+$lang->build->notice->createTest = "The execution of this version has been deleted, and the test cannot be submitted";
$lang->build->finishStories = " %s {$lang->SRCommon} sind abgeschlossen.";
$lang->build->resolvedBugs = ' %s Bugs sind gelöst.';
diff --git a/module/build/lang/en.php b/module/build/lang/en.php
index 1de167d912..75343df3d0 100644
--- a/module/build/lang/en.php
+++ b/module/build/lang/en.php
@@ -36,6 +36,7 @@ $lang->build->execution = $lang->executionCommon;
$lang->build->integrated = 'Integrated';
$lang->build->singled = 'Singled';
$lang->build->builds = 'Included Builds';
+$lang->build->releasedBuild = 'Released Build';
$lang->build->name = 'Name';
$lang->build->date = 'Date';
$lang->build->builder = 'Builder';
@@ -60,6 +61,7 @@ $lang->build->notice->changeProduct = "The {$lang->SRCommon}, bug, or the vers
$lang->build->notice->changeExecution = "The version of the submitted test order cannot be modified {$lang->executionCommon}";
$lang->build->notice->changeBuilds = "The version of the submitted test order cannot be modified builds";
$lang->build->notice->autoRelation = "The completed requirements, resolved bugs, and generated bugs under the relevant version will be automatically associated with the project version";
+$lang->build->notice->createTest = "The execution of this version has been deleted, and the test cannot be submitted";
$lang->build->finishStories = " Finished {$lang->SRCommon} %s";
$lang->build->resolvedBugs = ' Resolved Bug %s';
diff --git a/module/build/lang/fr.php b/module/build/lang/fr.php
index 68b572a9fe..e6500fd173 100644
--- a/module/build/lang/fr.php
+++ b/module/build/lang/fr.php
@@ -36,6 +36,7 @@ $lang->build->execution = $lang->executionCommon;
$lang->build->integrated = 'Integrated';
$lang->build->singled = 'Singled';
$lang->build->builds = 'Included Builds';
+$lang->build->releasedBuild = 'Released Build';
$lang->build->name = 'Nom';
$lang->build->date = 'Date';
$lang->build->builder = 'Builder';
@@ -60,6 +61,7 @@ $lang->build->notice->changeProduct = "The {$lang->SRCommon}, bug, or the vers
$lang->build->notice->changeExecution = "The version of the submitted test order cannot be modified {$lang->executionCommon}";
$lang->build->notice->changeBuilds = "The version of the submitted test order cannot be modified builds";
$lang->build->notice->autoRelation = "The completed requirements, resolved bugs, and generated bugs under the relevant version will be automatically associated with the project version";
+$lang->build->notice->createTest = "The execution of this version has been deleted, and the test cannot be submitted";
$lang->build->finishStories = " {$lang->SRCommon} Terminées %s";
$lang->build->resolvedBugs = ' Bugs Résolus %s';
diff --git a/module/build/lang/vi.php b/module/build/lang/vi.php
index aaf8d2800b..0c493659f2 100644
--- a/module/build/lang/vi.php
+++ b/module/build/lang/vi.php
@@ -54,6 +54,7 @@ $lang->build->notice->changeProduct = "The {$lang->SRCommon}, bug, or the vers
$lang->build->notice->changeExecution = "The version of the submitted test order cannot be modified {$lang->executionCommon}";
$lang->build->notice->changeBuilds = "The version of the submitted test order cannot be modified builds";
$lang->build->notice->autoRelation = "The completed requirements, resolved bugs, and generated bugs under the relevant version will be automatically associated with the project version";
+$lang->build->notice->createTest = "The execution of this version has been deleted, and the test cannot be submitted";
$lang->build->finishStories = " {$lang->SRCommon} đã kết thúc %s";
$lang->build->resolvedBugs = ' Bug đã giải quyết %s';
diff --git a/module/build/lang/zh-cn.php b/module/build/lang/zh-cn.php
index 2f8c8ae839..fe804daf9c 100644
--- a/module/build/lang/zh-cn.php
+++ b/module/build/lang/zh-cn.php
@@ -28,7 +28,7 @@ $lang->build->confirmUnlinkBug = "您确认移除该Bug吗?";
$lang->build->basicInfo = '基本信息';
$lang->build->id = 'ID';
-$lang->build->product = $lang->productCommon;
+$lang->build->product = '所属' . $lang->productCommon;
$lang->build->project = '所属项目';
$lang->build->branch = '平台/分支';
$lang->build->branchName = '所属%s';
@@ -36,6 +36,7 @@ $lang->build->execution = '所属' . $lang->executionCommon;
$lang->build->integrated = '集成版本';
$lang->build->singled = '单一版本';
$lang->build->builds = '包含版本';
+$lang->build->releasedBuild = '发布版本';
$lang->build->name = '名称编号';
$lang->build->date = '打包日期';
$lang->build->builder = '构建者';
@@ -60,6 +61,7 @@ $lang->build->notice->changeProduct = "已经关联{$lang->SRCommon}、Bug或
$lang->build->notice->changeExecution = "提交测试单的版本,不能修改其所属{$lang->executionCommon}";
$lang->build->notice->changeBuilds = "提交测试单的版本,不能修改关联版本";
$lang->build->notice->autoRelation = "相关版本下完成的需求、解决的Bug、产生的Bug将会自动关联到项目版本中";
+$lang->build->notice->createTest = "该版本所属执行已删除,不能提交测试";
$lang->build->finishStories = " 本次共完成 %s 个{$lang->SRCommon}";
$lang->build->resolvedBugs = ' 本次共解决 %s 个Bug';
diff --git a/module/build/model.php b/module/build/model.php
index 1e9f333b90..fd739b41a0 100644
--- a/module/build/model.php
+++ b/module/build/model.php
@@ -181,6 +181,38 @@ class buildModel extends model
return $this->getExecutionBuilds($executionID, 'bysearch', $buildQuery);
}
+ /**
+ * Filter linked stories or bugs builds.
+ *
+ * @param array $buildIdList
+ * @access public
+ * @return array
+ */
+ public function filterLinked($buildIdList)
+ {
+ $linkeds = array();
+ $buildList = $this->getByList($buildIdList);
+ foreach($buildList as $build)
+ {
+ if(!$build->execution && !empty($build->builds))
+ {
+ $childBuilds = $this->getByList($build->builds);
+ foreach($childBuilds as $childBuild)
+ {
+ $childBuild->stories = trim($childBuild->stories, ',');
+ $childBuild->bugs = trim($childBuild->bugs, ',');
+
+ if($childBuild->stories) $build->stories .= ',' . $childBuild->stories;
+ if($childBuild->bugs) $build->bugs .= ',' . $childBuild->bugs;
+ }
+ }
+
+ if(!empty($build->stories) or !empty($build->bugs)) $linkeds[$build->id] = $build->id;
+ }
+
+ return $linkeds;
+ }
+
/**
* Get story builds.
*
@@ -202,7 +234,7 @@ class buildModel extends model
*
* @param int|array $products
* @param string|int $branch
- * @param string $params noempty|notrunk|noterminate|withbranch|hasproject|noDeleted|singled|withreleased, can be a set of them
+ * @param string $params noempty|notrunk|noterminate|withbranch|hasproject|noDeleted|singled|noreleased|releasedtag, can be a set of them
* @param string|int $objectID
* @param string $objectType
* @param int|array $buildIdList
@@ -227,7 +259,7 @@ class buildModel extends model
}
$branchs = strpos($params, 'separate') === false ? "0,$branch" : $branch;
- $allBuilds = $this->dao->select('t1.id, t1.name, t1.date, t1.deleted, t2.status as objectStatus, t3.id as releaseID, t3.status as releaseStatus, t4.name as branchName, t5.type as productType')->from(TABLE_BUILD)->alias('t1')
+ $allBuilds = $this->dao->select('t1.id, t1.name, t1.execution, t1.date, t1.deleted, t2.status as objectStatus, t3.id as releaseID, t3.status as releaseStatus, t4.name as branchName, t5.type as productType')->from(TABLE_BUILD)->alias('t1')
->beginIF($objectType === 'execution')->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.execution = t2.id')->fi()
->beginIF($objectType === 'project')->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')->fi()
->leftJoin(TABLE_RELEASE)->alias('t3')->on("FIND_IN_SET(t1.id,t3.build)")
@@ -243,6 +275,8 @@ class buildModel extends model
->beginIF($branch !== 'all')->andWhere('t1.branch')->in("$branchs")->fi()
->orderBy('t1.date desc, t1.id desc')->fetchAll('id');
+ $deletedExecutions = $this->dao->select('id, deleted')->from(TABLE_EXECUTION)->where('type')->eq('sprint')->andWhere('deleted')->eq('1')->fetchPairs();
+
/* Set builds and filter done executions and terminate releases. */
$builds = array();
$buildIdList = array();
@@ -251,6 +285,7 @@ class buildModel extends model
{
if(empty($build->releaseID) and (strpos($params, 'nodone') !== false) and ($build->objectStatus === 'done')) continue;
if((strpos($params, 'noterminate') !== false) and ($build->releaseStatus === 'terminate')) continue;
+ if((strpos($params, 'withexecution') !== false) and $build->execution and isset($executions[$build->execution])) continue;
if($build->deleted == 1) $build->name .= ' (' . $this->lang->build->deleted . ')';
$branchName = $build->branchName ? $build->branchName : $this->lang->branch->main;
@@ -292,12 +327,13 @@ class buildModel extends model
$releaseName = $release->name;
$branchName = $release->branchName ? $release->branchName : $this->lang->branch->main;
if($release->productType != 'normal') $releaseName = (strpos($params, 'withbranch') !== false ? $branchName . '/' : '') . $releaseName;
+ if(strpos($params, 'releasetag') !== false) $releaseName = "[{$this->lang->build->releasedBuild}] " . $releaseName;
$builds[$release->date][$release->shadow] = $releaseName;
foreach(explode(',', trim($release->build, ',')) as $buildID)
{
if(!isset($allBuilds[$buildID])) continue;
$build = $allBuilds[$buildID];
- if(strpos($params, 'withreleased') === false) unset($builds[$build->date][$buildID]);
+ if(strpos($params, 'noreleased') !== false) unset($builds[$build->date][$buildID]);
}
}
}
@@ -621,6 +657,8 @@ class buildModel extends model
{
$action = strtolower($action);
+ if($module == 'testtask' and $action == 'create') return !$object->executionDeleted;
+
return true;
}
@@ -649,11 +687,14 @@ class buildModel extends model
{
$executionID = $tab == 'execution' ? $extraParams['executionID'] : $build->execution;
$execution = $this->loadModel('execution')->getByID($executionID);
+ $build->executionDeleted = $execution ? $execution->deleted : 0;
+
$testtaskApp = (!empty($execution->type) and $execution->type == 'kanban') ? 'data-app="qa"' : "data-app='{$tab}'";
if(common::hasPriv($module, 'linkstory') and common::canBeChanged('build', $build)) $menu .= $this->buildMenu($module, '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&projectID=$build->project", $build, $type, 'bullhorn', '', '', '', $testtaskApp);
+ $title = ($execution and $execution->deleted === '1') ? $this->lang->build->notice->createTest : '';
+ $menu .= $this->buildMenu('testtask', 'create', "product=$build->product&execution={$executionID}&build=$build->id&projectID=$build->project", $build, $type, 'bullhorn', '', '', '', $testtaskApp, $title);
if($tab == 'execution' and !empty($execution->type) and $execution->type != 'kanban') $menu .= $this->buildMenu('execution', 'bug', "execution={$extraParams['executionID']}&productID={$extraParams['productID']}&branchID=all&orderBy=status&build=$build->id", $build, $type, '', '', '', '', $this->lang->execution->viewBug);
if($tab == 'project' or empty($execution->type) or $execution->type == 'kanban') $menu .= $this->buildMenu($module, 'view', "{$params}&type=generatedBug", $build, $type, 'bug', '', '', '', "data-app='$tab'", $this->lang->project->bug);
diff --git a/module/build/view/view.html.php b/module/build/view/view.html.php
index aa18d5ecae..fe31522f6a 100644
--- a/module/build/view/view.html.php
+++ b/module/build/view/view.html.php
@@ -26,7 +26,11 @@ tbody tr td:first-child input {display: none;}
|
| | |
- model) and $project->model == 'scrum') $hidden = '';?>
+
+ model) and !empty($project->hasProduct) and $project->model == 'scrum') $hidden = '';?>