Merge branch 'sprint/208_tianshujie_58560' into 'master'
* Finish task #58560. See merge request easycorp/zentaopms!4174
This commit is contained in:
@@ -1025,7 +1025,6 @@ class project extends control
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
$sort = common::appendOrder($orderBy);
|
||||
$bugs = $this->bug->getProjectBugs($projectID, $productID, $build, $type, $param, $sort, '', $pager);
|
||||
$users = $this->user->getPairs('noletter');
|
||||
|
||||
/* team member pairs. */
|
||||
$memberPairs = array();
|
||||
@@ -1075,7 +1074,6 @@ class project extends control
|
||||
$this->view->buildID = $this->view->build ? $this->view->build->id : 0;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->users = $users;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->project = $this->project->getById($projectID);
|
||||
$this->view->branchID = empty($this->view->build->branch) ? $branchID : $this->view->build->branch;
|
||||
@@ -1084,7 +1082,6 @@ class project extends control
|
||||
$this->view->param = $param;
|
||||
$this->view->builds = $this->loadModel('build')->getBuildPairs($productID);
|
||||
$this->view->users = $this->user->getPairs('noletter');
|
||||
$this->view->memberPairs = $this->user->getPairs('noletter|noclosed');
|
||||
$this->view->branchOption = $branchOption;
|
||||
$this->view->branchTagOption = $branchTagOption;
|
||||
$this->view->executions = $executions;
|
||||
|
||||
@@ -2232,6 +2232,26 @@ class projectModel extends model
|
||||
return array('' => '') + $members;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get team member group.
|
||||
*
|
||||
* @param array|string $projectIdList
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getTeamMemberGroup($projectIdList)
|
||||
{
|
||||
if(empty($projectIdList)) return array();
|
||||
|
||||
return $this->dao->select("t1.account, if(t2.deleted='0', t2.realname, t1.account) as realname, t1.root as project")->from(TABLE_TEAM)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account')
|
||||
->where('t1.root')->in($projectIdList)
|
||||
->andWhere('t1.type')->eq('project')
|
||||
->andWhere('t2.deleted')->eq('0')
|
||||
->beginIF($this->config->vision)->andWhere("CONCAT(',', t2.visions, ',')")->like("%,{$this->config->vision},%")->fi()
|
||||
->fetchGroup('project', 'account');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get members of a project who can be imported.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user