Merge branch 'master' into zenops_46

This commit is contained in:
liyuchun
2022-10-24 09:18:10 +08:00
265 changed files with 7123 additions and 1163 deletions
+20 -1
View File
@@ -291,7 +291,26 @@ class task extends control
/* Set Custom*/
foreach(explode(',', $this->config->task->customCreateFields) as $field) $customFields[$field] = $this->lang->task->$field;
$executions = $this->config->systemMode == 'classic' ? $executions : $this->execution->getByProject($projectID, 'noclosed', 0, true);
$executionAll = array();
if(!empty($projectID))
{
$executionList = $this->execution->getByProject($projectID, 'noclosed', 0, true);
$project = $this->loadModel('project')->getByID($projectID);
$replace = substr(current($executionList), 0, strpos(current($executionList), '/'));
if(isset($project->model) and $project->model == 'waterfall')
{
foreach($executionList as $key => $val)
{
$values = str_replace($replace, $project->name, $val);
$executionAll[$key] = $values;
}
}
else
{
$executionAll = $executionList;
}
}
$executions = $this->config->systemMode == 'classic' ? $executions : $executionAll;
$testStoryIdList = $this->loadModel('story')->getTestStories(array_keys($stories), $execution->id);
/* Stories that can be used to create test tasks. */