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:
@@ -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()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user