Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into zentaopms_289

This commit is contained in:
guofeilong
2023-02-24 13:47:19 +08:00
39 changed files with 615 additions and 169 deletions
+5 -1
View File
@@ -1796,8 +1796,12 @@ EOD;
$executionPairs = array();
$userCondition = !$app->user->admin ? " AND `id` " . helper::dbIN($app->user->view->sprints) : '';
$orderBy = $object->type == 'stage' ? 'ORDER BY `id` ASC' : 'ORDER BY `id` DESC';
$executionList = $app->dbh->query("SELECT id,name,parent,project FROM " . TABLE_EXECUTION . " WHERE `project` = '{$object->project}' AND `deleted` = '0' $userCondition $orderBy")->fetchAll();
$executionList = $app->control->loadModel('execution')->resetExecutionSorts($executionList);
$executions = array();
foreach($executionList as $execution) $executions[$execution->id] = $execution;
$executionList = $app->control->loadModel('execution')->resetExecutionSorts($executions);
foreach($executionList as $execution)
{
if(isset($executionPairs[$execution->parent])) unset($executionPairs[$execution->parent]);