Merge branch 'fixbug_liumengyi_32633' into 'master'

* Fix bug 32603 32632 32633.

See merge request easycorp/zentaopms!7142
This commit is contained in:
孙广明
2023-03-08 01:24:54 +00:00
5 changed files with 15 additions and 2 deletions

View File

@@ -386,6 +386,8 @@ class executionModel extends model
if(($project->model == 'waterfall' or $project->model == 'waterfallplus') and isset($this->config->setPercent) and $this->config->setPercent == 1)
{
$_POST['products'] = array_filter($_POST['products']);
if(empty($_POST['products'])) dao::$errors['products0'] = $this->lang->project->errorNoProducts;
$this->checkWorkload('create', $_POST['percent'], $project);
if(dao::isError()) return false;
}
@@ -1883,7 +1885,7 @@ class executionModel extends model
->page($pager, 't1.id')
->fetchAll('id');
if(empty($productID) and !empty($executions)) $projectProductIdList = $this->dao->select('project, product')->from(TABLE_PROJECTPRODUCT)->where('project')->in(array_keys($executions))->fetchPairs();
if(empty($productID) and !empty($executions)) $projectProductIdList = $this->dao->select('project, GROUP_CONCAT(product) as product')->from(TABLE_PROJECTPRODUCT)->where('project')->in(array_keys($executions))->groupBy('project')->fetchPairs();
$hours = $this->loadModel('project')->computerProgress($executions);
$burns = $this->getBurnData($executions);