Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3
This commit is contained in:
@@ -63,7 +63,7 @@ class build extends control
|
||||
$products = array();
|
||||
foreach($productGroups as $product) $products[$product->id] = $product->name;
|
||||
|
||||
$this->view->title = $execution->name . $this->lang->colon . $this->lang->build->create;
|
||||
$this->view->title = $this->lang->build->create;
|
||||
$this->view->position[] = $this->lang->build->create;
|
||||
|
||||
$this->view->product = isset($productGroups[$productID]) ? $productGroups[$productID] : '';
|
||||
@@ -110,7 +110,7 @@ class build extends control
|
||||
$build = $this->build->getById((int)$buildID);
|
||||
|
||||
/* Set menu. */
|
||||
$this->execution->setMenu($this->execution->getPairs($this->session->PRJ), $build->execution);
|
||||
$this->execution->setMenu($this->execution->getPairs($build->project), $build->execution);
|
||||
|
||||
/* Get stories and bugs. */
|
||||
$orderBy = 'status_asc, stage_asc, id_desc';
|
||||
@@ -400,7 +400,7 @@ class build extends control
|
||||
$this->session->set('storyList', inlink('view', "buildID=$buildID&type=story&link=true¶m=" . helper::safe64Encode("&browseType=$browseType&queryID=$param")));
|
||||
$build = $this->build->getById($buildID);
|
||||
$product = $this->loadModel('product')->getById($build->product);
|
||||
$this->loadModel('execution')->setMenu($this->execution->getPairs($this->session->PRJ), $build->execution);
|
||||
$this->loadModel('execution')->setMenu($this->execution->getPairs($build->project), $build->execution);
|
||||
$this->loadModel('story');
|
||||
$this->loadModel('tree');
|
||||
$this->loadModel('product');
|
||||
@@ -519,7 +519,7 @@ class build extends control
|
||||
/* Set menu. */
|
||||
$build = $this->build->getByID($buildID);
|
||||
$product = $this->loadModel('product')->getByID($build->product);
|
||||
$this->loadModel('execution')->setMenu($this->execution->getPairs($this->session->PRJ), $build->execution);
|
||||
$this->loadModel('execution')->setMenu($this->execution->getPairs($build->project), $build->execution);
|
||||
|
||||
/* Load pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
|
||||
@@ -920,7 +920,7 @@ class executionModel extends model
|
||||
if($projectID)
|
||||
{
|
||||
$executionModel = $this->dao->select('model')->from(TABLE_EXECUTION)->where('id')->eq($projectID)->andWhere('deleted')->eq(0)->fetch('model');
|
||||
$orderBy = $executionModel == 'waterfall' ? 'sortStatus_asc,begin_asc,id_asc' : 'begin_desc';
|
||||
$orderBy = $executionModel == 'waterfall' ? 'sortStatus_asc,begin_asc,id_asc' : 'id_desc';
|
||||
|
||||
/* Waterfall execution, when all phases are closed, in reverse order of date. */
|
||||
if($executionModel == 'waterfall')
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if(common::canModify('execution', $execution)):?>
|
||||
<?php common::printIcon('testreport', 'browse', "objectID=$executionID&objectType=execution", '', 'button','flag muted');?>
|
||||
<?php common::printLink('testtask', 'create', "product=0&execution=$executionID", "<i class='icon icon-plus'></i> " . $lang->testtask->create, '', "class='btn btn-primary'");?>
|
||||
<?php common::printLink('testtask', 'create', "product=0&executionID=$executionID&build=&projectID=$execution->project", "<i class='icon icon-plus'></i> " . $lang->testtask->create, '', "class='btn btn-primary'");?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -685,6 +685,8 @@ class project extends control
|
||||
$this->loadModel('build');
|
||||
$project = $this->project->getByID($projectID);
|
||||
|
||||
$this->session->set('buildList', $this->app->getURI(true));
|
||||
|
||||
/* Get products' list. */
|
||||
$products = $this->project->getProducts($projectID, false);
|
||||
$products = array('' => '') + $products;
|
||||
|
||||
@@ -20,6 +20,6 @@ $(function()
|
||||
*/
|
||||
function changeProduct(productID)
|
||||
{
|
||||
link = createLink('project', 'build', 'type=product¶m=' + productID);
|
||||
link = createLink('project', 'build', 'projectID=' + projectID + '&type=product¶m=' + productID);
|
||||
location.href = link;
|
||||
}
|
||||
|
||||
@@ -75,16 +75,16 @@
|
||||
<?php
|
||||
if(common::hasPriv('build', 'linkstory') and common::hasPriv('build', 'view') and common::canBeChanged('build', $build))
|
||||
{
|
||||
echo html::a($this->createLink('build', 'view', "buildID=$build->id&type=story&link=true"), "<i class='icon icon-link'></i>", '', "class='btn' title='{$lang->build->linkStory}'");
|
||||
echo html::a($this->createLink('build', 'view', "buildID=$build->id&type=story&link=true"), "<i class='icon icon-link'></i>", '', "class='btn' title='{$lang->build->linkStory}' data-app='project'");
|
||||
}
|
||||
common::printIcon('testtask', 'create', "product=$build->product&project={$build->execution}&build=$build->id", $build, 'list', 'bullhorn');
|
||||
common::printIcon('testtask', 'create', "product=$build->product&executionID={$build->execution}&build=$build->id&projectID=$projectID", $build, 'list', 'bullhorn', '', '', '', "data-app='execution'");
|
||||
$lang->project->bug = $lang->execution->viewBug;
|
||||
common::printIcon('project', 'bug', "project={$build->execution}&orderBy=status&build=$build->id", $build, 'list');
|
||||
common::printIcon('execution', 'bug', "project={$build->execution}&orderBy=status&build=$build->id", $build, 'list', '', '', '', '', "data-app='execution'");
|
||||
common::printIcon('build', 'edit', "buildID=$build->id", $build, 'list');
|
||||
if(common::hasPriv('build', 'delete', $build))
|
||||
{
|
||||
$deleteURL = $this->createLink('build', 'delete', "buildID=$build->id&confirm=yes");
|
||||
echo html::a("javascript:ajaxDelete(\"$deleteURL\", \"buildList\", confirmDelete)", '<i class="icon-trash"></i>', '', "class='btn' title='{$lang->build->delete}'");
|
||||
echo html::a("###", '<i class="icon-trash"></i>', '', "onclick='ajaxDelete(\"$deleteURL\", \"buildList\", confirmDelete)' class='btn' title='{$lang->build->delete}'");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
@@ -186,7 +186,7 @@ class testtask extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function create($productID, $executionID = 0, $build = 0)
|
||||
public function create($productID, $executionID = 0, $build = 0, $projectID = 0)
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
@@ -200,7 +200,6 @@ class testtask extends control
|
||||
|
||||
/* Create testtask from testtask of test.*/
|
||||
$productID = $productID ? $productID : key($this->products);
|
||||
$projectID = $this->lang->navGroup->testtask == 'qa' ? 0 : $this->session->PRJ;
|
||||
$executions = empty($productID) ? array() : $this->product->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID);
|
||||
$builds = empty($productID) ? array() : $this->loadModel('build')->getProductBuildPairs($productID, 0, 'notrunk', true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user