Merge branch 'zentaopms_239_fix_mutual_test' into 'zentaopms_239'

* Fix bugs of mutual_test.

See merge request easycorp/zentaopms!5720
This commit is contained in:
王怡栋
2022-10-11 08:23:13 +00:00
4 changed files with 19 additions and 15 deletions
+2 -5
View File
@@ -165,7 +165,7 @@ class bug extends control
$pager = new pager($recTotal, $recPerPage, $pageID);
/* Get executios. */
$executions = $this->loadModel('execution')->getPairs($this->projectID, 'all', 'empty|withdelete');
$executions = $this->loadModel('execution')->getPairs($this->projectID, 'all', 'empty|withdelete|hideMultiple');
/* Get product id list. */
$productIDList = $productID ? $productID : array_keys($this->products);
@@ -341,10 +341,7 @@ class bug extends control
}
else if($this->app->tab == 'project')
{
if(isset($output['projectID']))
{
$this->loadModel('project')->setMenu($output['projectID']);
}
if(isset($output['projectID'])) $this->loadModel('project')->setMenu($output['projectID']);
}
else
{
+1 -1
View File
@@ -116,7 +116,7 @@ if($this->app->tab == 'project') js::set('objectID', $projectID);
<div class='table-col' id='projectBox'>
<?php echo html::select('project', $projects, $projectID, "class='form-control chosen' onchange='loadProductExecutions({$productID}, this.value)'");?>
</div>
<?php $executionClass = ($execution and $execution->multiple) ? 'hidden' : '';?>
<?php $executionClass = ($execution and !$execution->multiple) ? 'hidden' : '';?>
<div class="table-col <?php echo $executionClass;?>">
<div class='input-group' id='executionIdBox'>
<span class='input-group-addon fix-border' id='executionBox'><?php echo $projectModel == 'kanban' ? $lang->bug->kanban : $lang->bug->execution;?></span>
+1 -5
View File
@@ -20,14 +20,10 @@
<form class='load-indicator main-form form-ajax' id='dataform' method='post' enctype='multipart/form-data'>
<table class='table table-form'>
<?php if($app->tab == 'project'):?>
<?php if(!empty($multipleProject)):?>
<tr>
<tr class="<?php echo empty($multipleProject) ? 'hidden' : '';?>">
<th><?php echo $lang->executionCommon;?></th>
<td><?php echo html::select('execution', $executions, $executionID, "onchange='loadProducts(this.value);' class='form-control chosen' required");?></td>
</tr>
<?php else:?>
<?php echo html::hidden('execution', $executionID);?>
<?php endif;?>
<?php endif;?>
<tr class="<?php echo $hidden;?>">
<th><?php echo $lang->build->product;?></th>
+15 -4
View File
@@ -1304,16 +1304,27 @@ class executionModel extends model
{
if(strpos($mode, 'noclosed') !== false and ($execution->status == 'done' or $execution->status == 'closed')) continue;
if(strpos($mode, 'stagefilter') !== false and isset($executionModel) and $executionModel == 'waterfall' and in_array($execution->attribute, array('request', 'design', 'review'))) continue; // Some stages of waterfall not need.
if(empty($execution->multiple)) $noMultiples[$execution->id] = $execution->project;
$pairs[$execution->id] = $execution->name;
}
if($noMultiples)
{
$this->app->loadLang('project');
$noMultipleProjects = $this->dao->select('id,name')->from(TABLE_PROJECT)->where('id')->in($noMultiples)->fetchPairs('id', 'name');
foreach($noMultiples as $executionID => $projectID)
if(strpos($mode, 'hideMultiple') !== false)
{
if(isset($noMultipleProjects[$projectID])) $pairs[$executionID] = $noMultipleProjects[$projectID] . "({$this->lang->project->disableExecution})";
foreach($noMultiples as $executionID => $projectID) $pairs[$executionID] = '';
}
else
{
$this->app->loadLang('project');
$noMultipleProjects = $this->dao->select('id, name')->from(TABLE_PROJECT)->where('id')->in($noMultiples)->fetchPairs('id', 'name');
foreach($noMultiples as $executionID => $projectID)
{
if(isset($noMultipleProjects[$projectID])) $pairs[$executionID] = $noMultipleProjects[$projectID] . "({$this->lang->project->disableExecution})";
}
}
}