Merge branch dev/bug-63474 of zentao/zentaopms (#9688)
This commit is contained in:
@@ -5125,7 +5125,7 @@ class executionModel extends model
|
||||
|
||||
/* Handle extend fields. */
|
||||
$extendFields = $this->loadModel('project')->getFlowExtendFields($projectID);
|
||||
foreach($extendFields as $field) $_POST[$field->field] = $project->field;
|
||||
foreach($extendFields as $field) $_POST[$field->field] = $project->{$field->field};
|
||||
if(isset($this->config->setCode) and $this->config->setCode == 1) $postData->code = $project->code;
|
||||
|
||||
$updateProductsData = new stdclass();
|
||||
|
||||
@@ -2408,13 +2408,14 @@ class executionTest
|
||||
/**
|
||||
* Test sync no multiple sprint.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string|object
|
||||
*/
|
||||
public function syncNoMultipleSprintTest(int $projectID): int
|
||||
public function syncNoMultipleSprintTest(int $projectID): string|object
|
||||
{
|
||||
return $this->executionModel->syncNoMultipleSprint($projectID);
|
||||
$executionID = $this->executionModel->syncNoMultipleSprint($projectID);
|
||||
return !$executionID ? '' : $this->executionModel->fetchByID($executionID);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->syncNoMultipleSprint();
|
||||
timeout=0
|
||||
cid=0
|
||||
|
||||
- 同步没有执行的项目 @5
|
||||
sed: can't read /repo/zentaopms/test/config/my.php: No such file or directory
|
||||
- 同步没有执行的项目
|
||||
- 属性id @5
|
||||
- 属性name @项目2
|
||||
- 属性project @2
|
||||
- 属性multiple @0
|
||||
- 同步错误的项目 @0
|
||||
|
||||
*/
|
||||
@@ -47,5 +52,5 @@ su('admin');
|
||||
$projectIDList = array(2, 15);
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->syncNoMultipleSprintTest($projectIDList[0])) && p() && e('5'); // 同步没有执行的项目
|
||||
r($execution->syncNoMultipleSprintTest($projectIDList[1])) && p() && e('0'); // 同步错误的项目
|
||||
r($execution->syncNoMultipleSprintTest($projectIDList[0])) && p('id,name,project,multiple') && e('5,项目2,2,0'); // 同步没有执行的项目
|
||||
r($execution->syncNoMultipleSprintTest($projectIDList[1])) && p() && e('0'); // 同步错误的项目
|
||||
|
||||
Reference in New Issue
Block a user