Merge branch '15.0.beta3' of http://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3

This commit is contained in:
zhujinyong
2021-03-18 16:19:42 +08:00
17 changed files with 67 additions and 77 deletions
+4 -4
View File
@@ -475,7 +475,7 @@ class execution extends control
$toExecution = $execution->id;
$branches = $this->execution->getBranches($toExecution);
$tasks = $this->execution->getTasks2Imported($toExecution, $branches);
$executions = $this->execution->getsToImport(array_keys($tasks), $execution->type);
$executions = $this->execution->getToImport(array_keys($tasks), $execution->type);
unset($executions[$toExecution]);
unset($tasks[$toExecution]);
@@ -540,7 +540,7 @@ class execution extends control
$this->app->session->set('executionList', $uri);
$this->loadModel('bug');
$executions = $this->execution->getPairs($this->session->PRJ, 'all', 'nocode');
$executions = $this->execution->getPairs(0, 'all', 'nocode');
$this->execution->setMenu($executions, $executionID);
/* Load pager. */
@@ -1052,7 +1052,7 @@ class execution extends control
$this->view->orderBy = $orderBy;
$this->view->tasks = $productTasks;
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
$this->view->products = $this->loadModel('product')->getPairs('', $this->session->PRJ);
$this->view->products = $this->loadModel('product')->getPairs('', 0);
$this->view->canBeChanged = common::canModify('execution', $execution); // Determines whether an object is editable.
$this->display();
@@ -2964,7 +2964,7 @@ class execution extends control
$this->view->cases = $cases;
$this->view->story = $story;
$this->view->users = $users;
$this->view->executions = $this->loadModel('execution')->getPairs($this->session->PRJ, 'all', 'nocode');
$this->view->executions = $this->loadModel('execution')->getPairs(0, 'all', 'nocode');
$this->view->actions = $this->loadModel('action')->getList('story', $storyID);
$this->view->modulePath = $modulePath;
$this->view->version = $version == 0 ? $story->version : $version;
+7 -6
View File
@@ -212,7 +212,7 @@ class executionModel extends model
*/
public function tree()
{
$products = $this->loadModel('product')->getPairs('nocode', $this->session->PRJ);
$products = $this->loadModel('product')->getPairs('nocode', 0);
$productGroup = $this->getProductGroupList();
$executionTree = "<ul class='tree tree-lines'>";
foreach($productGroup as $productID => $executions)
@@ -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')
@@ -1709,10 +1709,10 @@ class executionModel extends model
*/
public function getTasks2Imported($toExecution, $branches)
{
$products = $this->getProducts($toExecution);
$products = $this->getProducts($toExecution);
if(empty($products)) return array();
$execution = $this->getById($toExecution);
$execution = $this->getById($toExecution);
$executions = $this->dao->select('t1.product, t1.project')->from(TABLE_PROJECTPRODUCT)->alias('t1')
->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.project=t2.id')
->where('t1.product')->in(array_keys($products))
@@ -1855,6 +1855,7 @@ class executionModel extends model
$bugToTasks = fixer::input('post')->get();
$bugs = $this->bug->getByList(array_keys($bugToTasks->import));
$projectID = $this->loadModel('execution')->getProjectID($executionID);
foreach($bugToTasks->import as $key => $value)
{
$bug = zget($bugs, $key, '');
@@ -1862,8 +1863,8 @@ class executionModel extends model
$task = new stdClass();
$task->bug = $bug;
$task->PRJ = $this->session->PRJ;
$task->execution = $executionID;
$task->project = $projectID;
$task->execution = $executionID;
$task->story = $bug->story;
$task->storyVersion = $bug->storyVersion;
$task->module = isset($modules[$bug->module]) ? $bug->module : 0;
+6 -6
View File
@@ -22,7 +22,7 @@
.table td.has-child > .plan-toggle > .icon:before {text-align: left;}
.table td.has-child > .plan-toggle.collapsed > .icon {-ms-transform:rotate(90deg); -moz-transform:rotate(90deg); -o-transform:rotate(90deg); -webkit-transform:rotate(90deg); transform: rotate(90deg);}
.main-table tbody > tr.table-children > td:first-child::before {width: 3px;}
.hours {text-align: right;}
.hours {text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
@-moz-document url-prefix() {.main-table tbody > tr.table-children > td:first-child::before {width: 4px;}}
</style>
<div id='mainMenu' class='clearfix'>
@@ -67,11 +67,11 @@
</th>
<th><?php common::printOrderLink('name', $orderBy, $vars, $from == 'execution' ? $lang->execution->execName : $lang->execution->name);?></th>
<th class='thWidth'><?php common::printOrderLink('PM', $orderBy, $vars, $lang->execution->owner);?></th>
<th class='w-90px'><?php common::printOrderLink('end', $orderBy, $vars, $lang->execution->end);?></th>
<th class='w-90px'><?php common::printOrderLink('status', $orderBy, $vars, $from == 'execution' ? $lang->execution->execStatus : $lang->execution->status);?></th>
<th class='w-40px'><?php echo $lang->execution->totalEstimate;?></th>
<th class='w-40px'><?php echo $lang->execution->totalConsumed;?></th>
<th class='w-40px'><?php echo $lang->execution->totalLeft;?></th>
<th class='w-100px'><?php common::printOrderLink('end', $orderBy, $vars, $lang->execution->end);?></th>
<th class='w-100px'><?php common::printOrderLink('status', $orderBy, $vars, $from == 'execution' ? $lang->execution->execStatus : $lang->execution->status);?></th>
<th class='w-60px text-center'><?php echo $lang->execution->totalEstimate;?></th>
<th class='w-60px text-center'><?php echo $lang->execution->totalConsumed;?></th>
<th class='w-60px text-center'><?php echo $lang->execution->totalLeft;?></th>
<th class='w-60px'><?php echo $lang->execution->progress;?></th>
<th class='w-100px'><?php echo $lang->execution->burn;?></th>
</tr>
+1 -3
View File
@@ -42,7 +42,7 @@
<thead>
<tr>
<th class='w-50px'><?php echo $lang->idAB;?></th>
<th class='required <?php echo $minWidth?>'><?php echo $lang->execution->name;?></th>
<th class='required <?php echo $minWidth?>' style="width:100%"><?php echo $lang->execution->name;?></th>
<th class='w-150px required'><?php echo $lang->execution->code;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'PM', ' hidden') . zget($requiredFields, 'PM', '', ' required');?>'><?php echo $lang->execution->PM;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'PO', ' hidden') . zget($requiredFields, 'PO', '', ' required');?>'><?php echo $lang->execution->PO;?></th>
@@ -55,7 +55,6 @@
<th class='w-150px<?php echo zget($visibleFields, 'desc', ' hidden') . zget($requiredFields, 'desc', '', ' required');?>'> <?php echo $lang->execution->desc;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'teamname', ' hidden') . zget($requiredFields, 'teamname', '', ' required');?>'><?php echo $lang->execution->teamname;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'days', ' hidden') . zget($requiredFields, 'days', '', ' required');?>'><?php echo $lang->execution->days;?></th>
<th class='w-80px'><?php echo $lang->execution->order;?></th>
</tr>
</thead>
<tbody>
@@ -97,7 +96,6 @@
<span class='input-group-addon'><?php echo $lang->execution->day;?></span>
</div>
</td>
<td><?php echo html::input("orders[$executionID]", $executions[$executionID]->order, "class='form-control'")?></td>
</tr>
<?php
if(isset($this->config->moreLinks["PMs[$executionID]"])) unset($this->config->moreLinks["PMs[$executionID]"]);
+1 -1
View File
@@ -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>