| 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 = '';?>
| execution->linkPlan;?> |
diff --git a/module/execution/view/taskkanban.html.php b/module/execution/view/taskkanban.html.php
index a4c48dbb19..847dee3671 100644
--- a/module/execution/view/taskkanban.html.php
+++ b/module/execution/view/taskkanban.html.php
@@ -231,4 +231,5 @@ js::set('priv',
config->minColWidth);?>
config->maxColWidth);?>
+execution->teamWords);?>
diff --git a/module/extension/model.php b/module/extension/model.php
index 9094b74003..b34b2f9b27 100644
--- a/module/extension/model.php
+++ b/module/extension/model.php
@@ -780,11 +780,10 @@ class extensionModel extends model
/**
* Update an extension.
*
- * @param string $extension
- * @param string $status
- * @param array $files
+ * @param string $extension
+ * @param array|object $data
* @access public
- * @return void
+ * @return int
*/
public function updateExtension($extension, $data)
{
diff --git a/module/file/control.php b/module/file/control.php
index 3f610b3765..c19efc9cc2 100755
--- a/module/file/control.php
+++ b/module/file/control.php
@@ -221,34 +221,20 @@ class file extends control
$this->view->fields = $this->post->fields;
$this->view->rows = $this->post->rows;
$this->host = common::getSysURL();
+ $kind = $this->post->kind;
- switch($this->post->kind)
+ foreach($this->view->rows as $row)
{
- case 'task':
- foreach($this->view->rows as $row)
+ foreach($row as &$field)
{
- $row->name = html::a($this->host . $this->createLink('task', 'view', "taskID=$row->id"), $row->name);
+ if(empty($field)) continue;
+ $field = preg_replace('/ src="{([0-9]+)(\.(\w+))?}" /', ' src="' . $this->host . helper::createLink('file', 'read', "fileID=$1", "$3") . '" ', $field);
}
- break;
- case 'story':
- foreach($this->view->rows as $row)
- {
- $row->title= html::a($this->host . $this->createLink('story', 'view', "storyID=$row->id"), $row->title);
- }
- break;
- case 'bug':
- foreach($this->view->rows as $row)
- {
- $row->title= html::a($this->host . $this->createLink('bug', 'view', "bugID=$row->id"), $row->title);
- }
- break;
- case 'testcase':
- foreach($this->view->rows as $row)
- {
- $row->title= html::a($this->host . $this->createLink('testcase', 'view', "caseID=$row->id"), $row->title);
- }
- break;
+
+ if(in_array($kind, array('story', 'bug', 'testcase'))) $row->title = html::a($this->host . $this->createLink($kind, 'view', "{$kind}ID=$row->id"), $row->title);
+ if($kind == 'task') $row->name = html::a($this->host . $this->createLink('task', 'view', "taskID=$row->id"), $row->name);
}
+
$this->view->fileName = $this->post->fileName;
$output = $this->parse('file', 'export2Html');
diff --git a/module/file/model.php b/module/file/model.php
index 9783d7250b..7bca92a246 100755
--- a/module/file/model.php
+++ b/module/file/model.php
@@ -667,7 +667,6 @@ class fileModel extends model
public function pasteImage($data, $uid = '', $safe = false)
{
if(empty($data)) return '';
- $data = str_replace('\"', '"', $data);
$dataLength = strlen($data);
if(ini_get('pcre.backtrack_limit') < $dataLength) ini_set('pcre.backtrack_limit', $dataLength);
@@ -676,7 +675,8 @@ class fileModel extends model
{
foreach($out[3] as $key => $base64Image)
{
- $extension = strtolower($out[2][$key]);
+ $base64Image = str_replace('\"', '"', $base64Image);
+ $extension = strtolower($out[2][$key]);
if(!in_array($extension, $this->config->file->imageExtensions)) helper::end();
$imageData = base64_decode($base64Image);
diff --git a/module/install/control.php b/module/install/control.php
index 38030abcb9..ea06f0fe13 100644
--- a/module/install/control.php
+++ b/module/install/control.php
@@ -266,7 +266,10 @@ class install extends control
$this->setting->setItem('system.common.safe.changeWeak', '1');
$this->setting->setItem('system.common.global.cron', 1);
- if(strpos($this->app->getClientLang(), 'zh') === 0) $this->loadModel('api')->createDemoData($this->lang->api->zentaoAPI, 'http://' . $_SERVER['HTTP_HOST'] . $this->app->config->webRoot . 'api.php/v1', '16.0');
+ $httpType = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') ? 'https' : 'http';
+ if(isset($_SERVER['HTTP_X_FORWARDED_PROTO']) and strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https') $httpType = 'https';
+ if(isset($_SERVER['REQUEST_SCHEME']) and strtolower($_SERVER['REQUEST_SCHEME']) == 'https') $httpType = 'https';
+ if(strpos($this->app->getClientLang(), 'zh') === 0) $this->loadModel('api')->createDemoData($this->lang->api->zentaoAPI, "{$httpType}://{$_SERVER['HTTP_HOST']}" . $this->app->config->webRoot . 'api.php/v1', '16.0');
return print(js::locate(inlink('step6'), 'parent'));
}
diff --git a/module/kanban/model.php b/module/kanban/model.php
index a4a02a08c0..046a94de6e 100755
--- a/module/kanban/model.php
+++ b/module/kanban/model.php
@@ -1511,6 +1511,8 @@ class kanbanModel extends model
$cardData['status'] = $object->status;
$cardData['left'] = $object->left;
$cardData['estStarted'] = $object->estStarted;
+ $cardData['mode'] = $object->mode;
+ if($object->mode == 'multi') $cardData['teamMembers'] = $object->teamMembers;
}
else
{
diff --git a/module/message/model.php b/module/message/model.php
index 72ca92a564..f0191d4173 100755
--- a/module/message/model.php
+++ b/module/message/model.php
@@ -114,7 +114,6 @@ class messageModel extends model
$this->loadModel('webhook')->send($objectType, $objectID, $actionType, $actionID, $actor);
}
}
-
if(isset($messageSetting['message']))
{
$actions = $messageSetting['message']['setting'];
@@ -201,6 +200,14 @@ class messageModel extends model
if(!empty($notifyPersons)) $toList = implode(',', $notifyPersons);
}
+ if(empty($toList) and $objectType == 'task' and $object->mode == 'multi')
+ {
+ $teamMembers = $this->loadModel('task')->getTeamMembers($object->id);
+ $toList = array_filter($teamMembers, function($account){
+ return $account != $this->app->user->account;
+ });
+ $toList = implode(',', $toList);
+ }
if($toList == 'closed') $toList = '';
if($objectType == 'feedback' and $object->status == 'replied') $toList = ',' . $object->openedBy . ',';
diff --git a/module/misc/lang/de.php b/module/misc/lang/de.php
index 620c0d9f9d..15242cc32a 100644
--- a/module/misc/lang/de.php
+++ b/module/misc/lang/de.php
@@ -42,7 +42,7 @@ $lang->misc->zentao->support['ask'] = "Official Answer";
$lang->misc->zentao->support['video'] = "Use Video";
$lang->misc->zentao->support['qqgroup'] = "Official QQ Group";
-$lang->misc->zentao->cowin['reportbug'] = "Bug melden ";
+$lang->misc->zentao->cowin['reportbug'] = "Report Bug";
$lang->misc->zentao->cowin['feedback'] = "Feedback";
$lang->misc->zentao->cowin['recommend'] = "More";
diff --git a/module/misc/lang/en.php b/module/misc/lang/en.php
index 98b516bad7..9ace3c33ea 100644
--- a/module/misc/lang/en.php
+++ b/module/misc/lang/en.php
@@ -42,7 +42,7 @@ $lang->misc->zentao->support['ask'] = "Official Answer";
$lang->misc->zentao->support['video'] = "Use Video";
$lang->misc->zentao->support['qqgroup'] = "Official QQ Group";
-$lang->misc->zentao->cowin['reportbug'] = "Report Bug ";
+$lang->misc->zentao->cowin['reportbug'] = "Report Bug";
$lang->misc->zentao->cowin['feedback'] = "Feedback";
$lang->misc->zentao->cowin['recommend'] = "More";
diff --git a/module/misc/lang/fr.php b/module/misc/lang/fr.php
index 6ad3cd0fa1..2792a3ce78 100644
--- a/module/misc/lang/fr.php
+++ b/module/misc/lang/fr.php
@@ -42,7 +42,7 @@ $lang->misc->zentao->support['ask'] = "Official Answer";
$lang->misc->zentao->support['video'] = "Use Video";
$lang->misc->zentao->support['qqgroup'] = "Official QQ Group";
-$lang->misc->zentao->cowin['reportbug'] = "Signaler un Bug";
+$lang->misc->zentao->cowin['reportbug'] = "Report Bug";
$lang->misc->zentao->cowin['feedback'] = "Feedback";
$lang->misc->zentao->cowin['recommend'] = "Plus...";
diff --git a/module/misc/lang/zh-cn.php b/module/misc/lang/zh-cn.php
index 45a270c7ea..c235c42d89 100644
--- a/module/misc/lang/zh-cn.php
+++ b/module/misc/lang/zh-cn.php
@@ -42,7 +42,7 @@ $lang->misc->zentao->support['ask'] = "官方问答";
$lang->misc->zentao->support['video'] = "使用视频";
$lang->misc->zentao->support['qqgroup'] = "官方QQ群";
-$lang->misc->zentao->cowin['reportbug'] = "汇报Bug";
+$lang->misc->zentao->cowin['reportbug'] = "反馈Bug";
$lang->misc->zentao->cowin['feedback'] = "反馈需求";
$lang->misc->zentao->cowin['recommend'] = "推荐给朋友";
diff --git a/module/misc/lang/zh-tw.php b/module/misc/lang/zh-tw.php
index 3daf3d5f61..2d9a8e5707 100644
--- a/module/misc/lang/zh-tw.php
+++ b/module/misc/lang/zh-tw.php
@@ -40,7 +40,7 @@ $lang->misc->zentao->support['ask'] = "官方問答";
$lang->misc->zentao->support['video'] = "使用視頻";
$lang->misc->zentao->support['qqgroup'] = "官方QQ群";
-$lang->misc->zentao->cowin['reportbug'] = "彙報Bug";
+$lang->misc->zentao->cowin['reportbug'] = "反饋Bug";
$lang->misc->zentao->cowin['feedback'] = "反饋需求";
$lang->misc->zentao->cowin['translate'] = "參與翻譯";
$lang->misc->zentao->cowin['recommend'] = "推薦給朋友";
diff --git a/module/mr/control.php b/module/mr/control.php
index b6bf903425..ba5c357987 100644
--- a/module/mr/control.php
+++ b/module/mr/control.php
@@ -699,8 +699,8 @@ class mr extends control
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getForProducts(array($productID => $productID));
$this->config->bug->search['params']['module']['values'] = $modules;
$this->config->bug->search['params']['execution']['values'] = $this->product->getExecutionPairsByProduct($productID);
- $this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getBuildPairs($productID, $branch = 'all', $params = '');
- $this->config->bug->search['params']['resolvedBuild']['values'] = $this->loadModel('build')->getBuildPairs($productID, $branch = 'all', $params = '');
+ $this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getBuildPairs($productID, $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']);
if($product->type == 'normal')
diff --git a/module/my/css/preference.css b/module/my/css/preference.css
index d5e009ffa0..81ccd2f8ab 100644
--- a/module/my/css/preference.css
+++ b/module/my/css/preference.css
@@ -1 +1,3 @@
.tip {margin-top: 10px;}
+.table-form>tbody>tr>th {white-space: nowrap; !important}
+.table-form>tbody>tr>td {width: 75%; !important}
diff --git a/module/my/model.php b/module/my/model.php
index 996f2c9137..7cb33794fd 100644
--- a/module/my/model.php
+++ b/module/my/model.php
@@ -640,7 +640,7 @@ class myModel extends model
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getPairs();
$this->config->bug->search['params']['module']['values'] = $this->loadModel('tree')->getAllModulePairs();
$this->config->bug->search['params']['severity']['values'] = array(0 => '') + $this->lang->bug->severityList;
- $this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getBuildPairs($products);
+ $this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getBuildPairs($products, 'all', 'releasetag');
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->config->bug->search['params']['openedBuild']['values'];
$this->loadModel('search')->setSearchParams($this->config->bug->search);
@@ -911,7 +911,7 @@ class myModel extends model
$this->config->ticket->search['params']['module']['values'] = array('' => '') + $this->loadModel('tree')->getAllModulePairs();
$grantProducts = $this->loadModel('feedback')->getGrantProducts();
$productIDlist = array_keys($grantProducts);
- $this->config->ticket->search['params']['openedBuild']['values'] = $this->loadModel('build')->getBuildPairs($productIDlist);
+ $this->config->ticket->search['params']['openedBuild']['values'] = $this->loadModel('build')->getBuildPairs($productIDlist, 'all', 'releasetag');
$this->loadModel('search')->setSearchParams($this->config->ticket->search);
}
diff --git a/module/product/control.php b/module/product/control.php
index 410d0206bb..5f9a78b411 100755
--- a/module/product/control.php
+++ b/module/product/control.php
@@ -271,13 +271,30 @@ class product extends control
/* Display status of branch. */
$branchOption = array();
$branchTagOption = array();
- if($product and $product->type != 'normal')
+ if(!$product and $isProjectStory)
{
- $branches = $this->loadModel('branch')->getList($productID, $projectID, 'all');
- foreach($branches as $branchInfo)
+ /* Get branch display under multiple products. */
+ foreach($projectProducts as $projectProduct)
{
- $branchOption[$branchInfo->id] = $branchInfo->name;
- $branchTagOption[$branchInfo->id] = $branchInfo->name . ($branchInfo->status == 'closed' ? ' (' . $this->lang->branch->statusList['closed'] . ')' : '');
+ if($projectProduct and $projectProduct->type != 'normal')
+ {
+ $branches = $this->loadModel('branch')->getList($projectProduct->id, $projectID, 'all');
+ foreach($branches as $branchInfo) $branchOptions[$projectProduct->id][$branchInfo->id] = $branchInfo->name;
+ }
+ }
+
+ $this->view->branchOptions = $branchOptions;
+ }
+ else
+ {
+ if($product and $product->type != 'normal')
+ {
+ $branches = $this->loadModel('branch')->getList($productID, $projectID, 'all');
+ foreach($branches as $branchInfo)
+ {
+ $branchOption[$branchInfo->id] = $branchInfo->name;
+ $branchTagOption[$branchInfo->id] = $branchInfo->name . ($branchInfo->status == 'closed' ? ' (' . $this->lang->branch->statusList['closed'] . ')' : '');
+ }
}
}
@@ -1351,7 +1368,7 @@ class product extends control
$this->view->title = $this->lang->product->line;
$this->view->position[] = $this->lang->product->line;
- $this->view->programs = array('') + $this->loadModel('program')->getTopPairs();
+ $this->view->programs = array('') + $this->loadModel('program')->getTopPairs('', 'withDeleted');
$this->view->lines = $this->product->getLines();
$this->display();
}
diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php
index 30b0729413..dffefb71c9 100755
--- a/module/product/view/browse.html.php
+++ b/module/product/view/browse.html.php
@@ -357,6 +357,7 @@ js::set('vision', $this->config->vision);
|