Merge branch 'sprint/master_lanzongjun_fixbug' into 'master'

* finish task #75912#75908#75904#75919#75923#75924#76338

See merge request easycorp/zentaopms!6142
This commit is contained in:
王怡栋
2022-11-15 05:39:37 +00:00
6 changed files with 38 additions and 12 deletions
+18
View File
@@ -1733,10 +1733,28 @@ class execution extends control
$this->view->linkedBranches = $linkedBranches;
}
if(!$project->hasProduct)
{
$shadowProduct = $this->loadModel('product')->getShadowProductByProject($project->id);
$productPlan = $this->loadModel('productplan')->getPairs($shadowProduct->id, '0,0', 'noclosed,unexpired', true);
}
if(!empty($_POST))
{
if(isset($_POST['attribute']) and in_array($_POST['attribute'], array('request', 'design', 'review'))) unset($_POST['plans']);
/* No product execution link plans. */
if(!$project->hasProduct and !empty($_POST['plans']))
{
$plansItem = array();
foreach($_POST['plans'] as $planItem)
{
if(empty($planItem[0][0])) continue;
$plansItem[] = $planItem[0][0];
}
$_POST['plans'] = array($_POST['products'][0] => array(0 => $plansItem));
}
$executionID = $this->execution->create($copyExecutionID);
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
+4 -1
View File
@@ -79,7 +79,7 @@
<?php endif;?>
<?php
if($productID) common::printIcon('story', 'report', "productID=$productID&branchID=&storyType=$storyType&browseType=$type&moduleID=$param&chartType=pie&projectID=$execution->id", '', 'button', 'bar-chart muted');
common::printLink('story', 'export', "productID=$productID&orderBy=id_desc&executionID=$execution->id", "<i class='icon icon-export muted'></i> " . $lang->story->export, '', "class='btn btn-link export iframe'");
common::printLink('story', 'export', "productID=$productID&orderBy=id_desc&executionID=$execution->id&browseType=$type&storyType=$storyType", "<i class='icon icon-export muted'></i> " . $lang->story->export, '', "class='btn btn-link export iframe'");
$canLinkStory = $execution->hasProduct or $execution->multiple;
if(common::canModify('execution', $execution))
@@ -253,6 +253,7 @@
foreach($setting as $key => $value)
{
if(!$execution->hasProduct and !$execution->multiple and $value->id == 'plan') continue;
if(!$execution->hasProduct and !$execution->multiple and $value->id == 'stage') continue;
if($value->show)
{
$this->datatable->printHead($value, $orderBy, $vars, $canBatchAction);
@@ -271,6 +272,7 @@
<?php foreach($setting as $key => $value)
{
if(!$execution->hasProduct and !$execution->multiple and $value->id == 'plan') continue;
if(!$execution->hasProduct and !$execution->multiple and $value->id == 'stage') continue;
$this->story->printCell($value, $story, $users, $branchOption, $storyStages, $modulePairs, $storyTasks, $storyBugs, $storyCases, $useDatatable ? 'datatable' : 'table', $storyType, $execution, $showBranch);
}
?>
@@ -285,6 +287,7 @@
<?php foreach($setting as $key => $value)
{
if(!$execution->hasProduct and !$execution->multiple and $value->id == 'plan') continue;
if(!$execution->hasProduct and !$execution->multiple and $value->id == 'stage') continue;
$this->story->printCell($value, $child, $users, $branchOption, $storyStages, $modulePairs, $storyTasks, $storyBugs, $storyCases, $useDatatable ? 'datatable' : 'table', $storyType, $execution);
}?>
</tr>