Merge branch 'sprint/zentaopms230'

This commit is contained in:
wangyidong
2022-09-01 13:28:26 +08:00
47 changed files with 1591 additions and 1099 deletions
+38 -14
View File
@@ -195,7 +195,7 @@ class taskTest
return $object[1];
}
public function startTest($taskID,$param = array())
public function startTest($taskID, $param = array())
{
$createFields = array( 'status' => 'doing', 'consumed' => '9', 'assignedTo' => '', 'comment' => '9', 'realStarted' => '', 'left' => '3');
foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue;
@@ -655,12 +655,14 @@ class taskTest
* Test get task estimate.
*
* @param int $taskID
* @param string $account
* @param string $append
* @access public
* @return object
*/
public function getTaskEstimateTest($taskID)
public function getTaskEstimateTest($taskID, $account = '', $append = '')
{
$object = $this->objectModel->getTaskEstimate($taskID);
$object = $this->objectModel->getTaskEstimate($taskID, $account, $append);
if(dao::isError())
{
$error = dao::getError();
@@ -1383,25 +1385,47 @@ class taskTest
}
/**
* Test get next user.
* Test for get team by account.
*
* @param array $users
* @param string $account
* @param string $filter
* @access public
* @return string
*/
public function getTeamByAccount($users, $account, $filter = array('filter' => 'done'))
{
$object = $this->objectModel->getTeamByAccount($users, $account, $filter);
if(empty($object)) return '_';
return $object->account . '_' . $object->status;
}
/**
* Test get assignedTo for multi task.
*
* @param array $users
* @param string $current
* @access public
* @return string
*/
public function getNextUserTest($users, $current)
public function getAssignedTo4Multi($users, $task, $type = 'current')
{
$object = $this->objectModel->getNextUser($users, $current);
$assignedTo = $this->objectModel->getAssignedTo4Multi($users, $task, $type);
return empty($assignedTo) ? 'null' : $assignedTo;
}
if(dao::isError())
{
return dao::getError();
}
else
{
return $object;
}
/**
* Test for can operate effort;
*
* @param object $task
* @param object $effort
* @access public
* @return bool
*/
public function canOperateEffort($task, $effort = null)
{
$result = $this->objectModel->canOperateEffort($task, $effort);
return $result ? 1 : 0;
}
/**