* Finish task #41244.

This commit is contained in:
tianshujie98
2021-08-11 15:04:29 +08:00
parent b16fa82740
commit 201285215b
9 changed files with 124 additions and 32 deletions
+23
View File
@@ -1340,6 +1340,7 @@ class execution extends control
$this->view->name = $name;
$this->view->code = $code;
$this->view->team = $team;
$this->view->teams = array(0 => '') + $this->execution->getTeamPairsByProject((int)$projectID);
$this->view->allProjects = array(0 => '') + $this->project->getPairsByModel();
$this->view->executionID = $executionID;
$this->view->productID = $productID;
@@ -2635,6 +2636,28 @@ class execution extends control
}
}
/**
* AJAX: get team members by projectID/executionID.
*
* @param int $objectID
* @access public
* @return string
*/
public function ajaxGetTeamMembers($objectID)
{
$type = 'execution';
if($this->config->systemMode == 'new')
{
$type = $this->dao->findById($objectID)->from(TABLE_PROJECT)->fetch('type');
$type = $type == 'project' ? $type : 'execution';
}
$users = $this->loadModel('user')->getPairs('nodeleted|noclosed');
$members = $this->user->getTeamMemberPairs($objectID, $type);
die(html::select('teamMembers[]', $users, array_keys($members), "class='form-control chosen' multiple"));
}
/**
* When create a execution, help the user.
*