* Fix bug #31827.
This commit is contained in:
@@ -2190,7 +2190,7 @@ class project extends control
|
||||
}
|
||||
|
||||
$oldProducts = $this->product->getProducts($projectID);
|
||||
if($project->multiple and $project->model != 'waterfall') $oldExecutionProducts = $this->dao->select('project,product')->from(TABLE_PROJECTPRODUCT)->where('project')->in(array_keys($executions))->fetchGroup('project', 'product');
|
||||
if($project->multiple and $project->model != 'waterfall' and $project->model != 'waterfallplus') $oldExecutionProducts = $this->dao->select('project,product')->from(TABLE_PROJECTPRODUCT)->where('project')->in(array_keys($executions))->fetchGroup('project', 'product');
|
||||
|
||||
$this->project->updateProducts($projectID);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
@@ -2216,7 +2216,7 @@ class project extends control
|
||||
}
|
||||
}
|
||||
|
||||
if($project->multiple and $project->model != 'waterfall')
|
||||
if($project->multiple and $project->model != 'waterfall' and $project->model != 'waterfallplus')
|
||||
{
|
||||
$unlinkedProducts = array_diff($oldProductIDs, $newProductIDs);
|
||||
if(!empty($unlinkedProducts))
|
||||
|
||||
@@ -2502,6 +2502,13 @@ class projectModel extends model
|
||||
$this->dao->update(TABLE_PROJECT)->set('division')->eq('1')->where('id')->eq((int)$projectID)->exec();
|
||||
$this->dao->update(TABLE_EXECUTION)->set('division')->eq('1')->where('project')->eq((int)$projectID)->exec();
|
||||
}
|
||||
|
||||
$project = $this->getByID($projectID);
|
||||
if(!empty($project) and ($project->model == 'waterfall' or $project->model == 'waterfallplus') and empty($project->division) and !empty($executions))
|
||||
{
|
||||
$this->loadModel('execution');
|
||||
foreach($executions as $executionID) $this->execution->updateProducts($executionID);
|
||||
}
|
||||
}
|
||||
|
||||
$oldProductKeys = array_keys($oldProjectProducts);
|
||||
|
||||
Reference in New Issue
Block a user