Merge branch 'sprint/208_tianshujie_58560' into 'master'
* Finish task #58560. See merge request easycorp/zentaopms!4174
This commit is contained in:
+116
-38
@@ -553,14 +553,10 @@ class bug extends control
|
||||
|
||||
$moduleOwner = $this->bug->getModuleOwner($moduleID, $productID);
|
||||
|
||||
/* Set team members of the latest execution as assignedTo list. */
|
||||
$productMembers = $this->bug->getProductMemberPairs($productID);
|
||||
/* Get all project team members linked with this product. */
|
||||
$productMembers = $this->bug->getProductMemberPairs($productID, $branch);
|
||||
$productMembers = array_filter($productMembers);
|
||||
if(empty($productMembers)) $productMembers = $this->view->users;
|
||||
if($assignedTo and !isset($productMembers[$assignedTo]))
|
||||
{
|
||||
$user = $this->loadModel('user')->getById($assignedTo);
|
||||
if($user) $productMembers[$assignedTo] = $user->realname;
|
||||
}
|
||||
|
||||
$moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0, ($branch === 'all' or !isset($branches[$branch])) ? 0 : $branch);
|
||||
if(empty($moduleOptionMenu)) return print(js::locate(helper::createLink('tree', 'browse', "productID=$productID&view=story")));
|
||||
@@ -577,7 +573,7 @@ class bug extends control
|
||||
if($projectID)
|
||||
{
|
||||
$project = $this->loadModel('project')->getByID($projectID);
|
||||
if(empty($bugID) or $this->app->tab != 'qa') $projects = array($projectID => $project->name);
|
||||
if(empty($bugID) or $this->app->tab != 'qa') $projects += array($projectID => $project->name);
|
||||
}
|
||||
}
|
||||
elseif($projectID)
|
||||
@@ -1090,6 +1086,22 @@ class bug extends control
|
||||
$moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0, $bug->branch);
|
||||
if(!isset($moduleOptionMenu[$bug->module])) $moduleOptionMenu += $this->tree->getModulesName($bug->module);
|
||||
|
||||
/* Get assigned to member. */
|
||||
if($bug->execution)
|
||||
{
|
||||
$assignedToList = $this->user->getTeamMemberPairs($bug->execution, 'execution');
|
||||
}
|
||||
elseif($bug->project)
|
||||
{
|
||||
$assignedToList = $this->loadModel('project')->getTeamMemberPairs($bug->project);
|
||||
}
|
||||
else
|
||||
{
|
||||
$assignedToList = $this->bug->getProductMemberPairs($bug->product, $bug->branch);
|
||||
$assignedToList = array_filter($assignedToList);
|
||||
if(empty($assignedToList)) $assignedToList = $this->user->getPairs('devfirst|noclosed');
|
||||
}
|
||||
|
||||
$this->view->bug = $bug;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->product = $product;
|
||||
@@ -1105,6 +1117,7 @@ class bug extends control
|
||||
$this->view->tasks = $this->task->getExecutionTaskPairs($bug->execution);
|
||||
$this->view->testtasks = $this->loadModel('testtask')->getPairs($bug->product, $bug->execution, $bug->testtask);
|
||||
$this->view->users = $this->user->getPairs('', "$bug->assignedTo,$bug->resolvedBy,$bug->closedBy,$bug->openedBy");
|
||||
$this->view->assignedToList = $assignedToList;
|
||||
$this->view->openedBuilds = $openedBuilds;
|
||||
$this->view->resolvedBuilds = array('' => '') + $openedBuilds + $oldResolvedBuild;
|
||||
$this->view->actions = $this->action->getList('bug', $bugID);
|
||||
@@ -1234,35 +1247,94 @@ class bug extends control
|
||||
$this->view->customFields = $customFields;
|
||||
$this->view->showFields = $this->config->bug->custom->batchEditFields;
|
||||
|
||||
/* Set users. */
|
||||
$appendUsers = array();
|
||||
$branchIdList = array();
|
||||
$projectIdList = array();
|
||||
$executionIdList = array();
|
||||
foreach($bugs as $bug)
|
||||
{
|
||||
$appendUsers[$bug->assignedTo] = $bug->assignedTo;
|
||||
$appendUsers[$bug->resolvedBy] = $bug->resolvedBy;
|
||||
$projectIdList[$bug->project] = $bug->project;
|
||||
$executionIdList[$bug->execution] = $bug->execution;
|
||||
|
||||
$branchIdList[$bug->product][$bug->branch] = $bug->branch;
|
||||
|
||||
if(!isset($modules[$bug->product][$bug->branch])) $modules[$bug->product][$bug->branch] = $modules[$bug->product][0] + $this->tree->getModulesName($bug->module);
|
||||
}
|
||||
$users = $this->user->getPairs('devfirst', $appendUsers, $this->config->maxCount);
|
||||
|
||||
/* Get assigned to member. */
|
||||
$this->loadModel('project');
|
||||
$this->loadModel('execution');
|
||||
|
||||
$productMembers = array();
|
||||
$projectMembers = array();
|
||||
$executionMembers = array();
|
||||
if($productID)
|
||||
{
|
||||
$branchList = zget($branchIdList, $productID, array());
|
||||
foreach($branchList as $branchID)
|
||||
{
|
||||
$members = $this->bug->getProductMemberPairs($productID, $branchID);
|
||||
$productMembers[$productID][$branchID] = array_filter($members);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($productIdList as $id)
|
||||
{
|
||||
$branchList = zget($branchIdList, $id, array());
|
||||
foreach($branchList as $branchID)
|
||||
{
|
||||
$members = $this->bug->getProductMemberPairs($id, $branchID);
|
||||
$productMembers[$id][$branchID] = array_filter($members);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$projectMemberGroup = $this->project->getTeamMemberGroup($projectIdList);
|
||||
$projectMembers = array();
|
||||
foreach($projectIdList as $projectID)
|
||||
{
|
||||
$projectTeam = zget($projectMemberGroup, $projectID, array());
|
||||
if(empty($projectTeam)) $projectMembers[$projectID] = array();
|
||||
foreach($projectTeam as $user)
|
||||
{
|
||||
$projectMembers[$projectID][$user->account] = $user->realname;
|
||||
}
|
||||
}
|
||||
|
||||
$executionMemberGroup = $this->execution->getMembersByIdList($executionIdList);
|
||||
$executionMembers = array();
|
||||
foreach($executionIdList as $executionID)
|
||||
{
|
||||
$executionTeam = zget($executionMemberGroup, $executionID, array());
|
||||
if(empty($executionTeam)) $executionMemberGroup[$executionID] = array();
|
||||
foreach($executionTeam as $user)
|
||||
{
|
||||
$executionMembers[$executionID][$user->account] = $user->realname;
|
||||
}
|
||||
}
|
||||
|
||||
/* Set users. */
|
||||
$users = $this->user->getPairs('devfirst', '', $this->config->maxCount);
|
||||
$users = array('' => '', 'ditto' => $this->lang->bug->ditto) + $users;
|
||||
|
||||
/* Assign. */
|
||||
$this->view->position[] = $this->lang->bug->common;
|
||||
$this->view->position[] = $this->lang->bug->batchEdit;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->branchProduct = $branchProduct;
|
||||
$this->view->severityList = array('ditto' => $this->lang->bug->ditto) + $this->lang->bug->severityList;
|
||||
$this->view->typeList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->typeList;
|
||||
$this->view->priList = array('0' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->priList;
|
||||
$this->view->resolutionList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->resolutionList;
|
||||
$this->view->statusList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->statusList;
|
||||
$this->view->osList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->osList;
|
||||
$this->view->browserList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->browserList;
|
||||
$this->view->bugs = $bugs;
|
||||
$this->view->branch = $branch;
|
||||
$this->view->users = $users;
|
||||
$this->view->modules = $modules;
|
||||
$this->view->branchTagOption = $branchTagOption;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->branchProduct = $branchProduct;
|
||||
$this->view->severityList = array('ditto' => $this->lang->bug->ditto) + $this->lang->bug->severityList;
|
||||
$this->view->typeList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->typeList;
|
||||
$this->view->priList = array('0' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->priList;
|
||||
$this->view->resolutionList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->resolutionList;
|
||||
$this->view->statusList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->statusList;
|
||||
$this->view->osList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->osList;
|
||||
$this->view->browserList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->browserList;
|
||||
$this->view->bugs = $bugs;
|
||||
$this->view->branch = $branch;
|
||||
$this->view->users = $users;
|
||||
$this->view->productMembers = $productMembers;
|
||||
$this->view->projectMembers = $projectMembers;
|
||||
$this->view->executionMembers = $executionMembers;
|
||||
$this->view->modules = $modules;
|
||||
$this->view->branchTagOption = $branchTagOption;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -1320,17 +1392,20 @@ class bug extends control
|
||||
}
|
||||
}
|
||||
|
||||
if($this->app->tab == 'project')
|
||||
/* Get assigned to member. */
|
||||
if($bug->execution)
|
||||
{
|
||||
$users = $this->user->getTeamMemberPairs($bug->project, 'project', 'nodeleted', $bug->assignedTo);
|
||||
$users = $this->user->getTeamMemberPairs($bug->execution, 'execution');
|
||||
}
|
||||
elseif($this->app->tab == 'execution')
|
||||
elseif($bug->project)
|
||||
{
|
||||
$users = $this->user->getTeamMemberPairs($bug->execution, 'execution', 'nodeleted', $bug->assignedTo);
|
||||
$users = $this->loadModel('project')->getTeamMemberPairs($bug->project);
|
||||
}
|
||||
else
|
||||
{
|
||||
$users = $this->user->getPairs('noclosed', $bug->assignedTo);
|
||||
$users = $this->bug->getProductMemberPairs($bug->product, $bug->branch);
|
||||
$users = array_filter($users);
|
||||
if(empty($users)) $users = $this->user->getPairs('devfirst|noclosed');
|
||||
}
|
||||
|
||||
$this->view->title = $this->products[$bug->product] . $this->lang->colon . $this->lang->bug->assignedTo;
|
||||
@@ -2029,7 +2104,7 @@ class bug extends control
|
||||
*/
|
||||
public function ajaxLoadAssignedTo($executionID, $selectedUser = '')
|
||||
{
|
||||
$executionMembers = $this->user->getTeamMemberPairs($executionID, 'execution', '', $selectedUser);
|
||||
$executionMembers = $this->user->getTeamMemberPairs($executionID, 'execution');
|
||||
|
||||
$execution = $this->loadModel('execution')->getByID($executionID);
|
||||
if(empty($selectedUser)) $selectedUser = $execution->QD;
|
||||
@@ -2351,12 +2426,15 @@ class bug extends control
|
||||
*
|
||||
* @param int $productID
|
||||
* @param string $selectedUser
|
||||
* @param int $branchID
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function ajaxGetProductMembers($productID, $selectedUser = '')
|
||||
public function ajaxGetProductMembers($productID, $selectedUser = '', $branchID = '')
|
||||
{
|
||||
$productMembers = $this->bug->getProductMemberPairs($productID);
|
||||
$productMembers = $this->bug->getProductMemberPairs($productID, $branchID);
|
||||
$productMembers = array_filter($productMembers);
|
||||
if(empty($productMembers)) $productMembers = $this->loadModel('user')->getPairs('devfirst|noclosed');
|
||||
|
||||
return print(html::select('assignedTo', $productMembers, $selectedUser, 'class="form-control"'));
|
||||
}
|
||||
@@ -2365,7 +2443,7 @@ class bug extends control
|
||||
* Ajax get project team members.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param string $$selectedUser
|
||||
* @param string $selectedUser
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
|
||||
+39
-4
@@ -130,6 +130,7 @@ function loadBranch()
|
||||
loadProductBuilds(productID);
|
||||
loadProductplans(productID);
|
||||
loadProductStories(productID);
|
||||
loadProductMembers(productID);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -333,12 +334,44 @@ function loadProductExecutions(productID, projectID = 0)
|
||||
$(this).find('select').chosen();
|
||||
if(typeof(bugExecution) == 'string' && systemMode != 'classic') $('#executionIdBox').prepend("<span class='input-group-addon' id='executionBox' style='border-left-width: 0px;'>" + bugExecution + "</span>");
|
||||
if(required) $(this).find('#execution_chosen').addClass('required');
|
||||
if(page != 'edit') changeAssignedTo(projectID);
|
||||
changeAssignedTo(projectID);
|
||||
});
|
||||
|
||||
projectID != 0 ? loadProjectBuilds(projectID) : loadProductBuilds(productID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax change execution name.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function changeAssignedTo(projectID)
|
||||
{
|
||||
if(parseInt(projectID))
|
||||
{
|
||||
loadProjectTeamMembers(projectID);
|
||||
if(page == 'create')
|
||||
{
|
||||
var link = createLink('bug', 'ajaxGetExecutionLang', 'projectID=' + projectID);
|
||||
$.post(link, function(executionLang)
|
||||
{
|
||||
$('#executionBox').html(executionLang);
|
||||
})
|
||||
}
|
||||
}
|
||||
else if($('#execution').val() != 0)
|
||||
{
|
||||
loadAssignedTo($('#execution').val());
|
||||
}
|
||||
else
|
||||
{
|
||||
var productID = $('#product').val();
|
||||
loadProductMembers(productID);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load executions of product and project.
|
||||
*
|
||||
@@ -441,13 +474,13 @@ function loadExecutionRelated(executionID)
|
||||
}
|
||||
else
|
||||
{
|
||||
var currentProjectID = $('#project').val();
|
||||
var currentProjectID = $('#project').val() == 'undefined' ? 0 : $('#project').val();
|
||||
var currentProductID = $('#product').val();
|
||||
|
||||
$('#taskIdBox').innerHTML = '<select id="task"></select>'; // Reset the task.
|
||||
loadProductStories(currentProductID);
|
||||
loadTestTasks(currentProductID);
|
||||
if(typeof(currentProjectID) == 'undefined')
|
||||
if(currentProjectID == 0)
|
||||
{
|
||||
loadProductMembers(currentProductID);
|
||||
}
|
||||
@@ -593,7 +626,8 @@ function loadExecutionBuilds(executionID, num)
|
||||
*/
|
||||
function loadProductMembers(productID)
|
||||
{
|
||||
link = createLink('bug', 'ajaxGetProductMembers', 'productID=' + productID + '&selectedUser=' + $('#assignedTo').val());
|
||||
var branchID = $('#branch').val() == undefined ? '' : $('#branch').val();
|
||||
var link = createLink('bug', 'ajaxGetProductMembers', 'productID=' + productID + '&selectedUser=' + $('#assignedTo').val() + '&branchID=' + branchID);
|
||||
$.get(link, function(data)
|
||||
{
|
||||
if(!data) data = '<select id="assignedTo" name="assignedTo" class="form-control"></select>';
|
||||
@@ -678,6 +712,7 @@ function loadProductBranches(productID, param)
|
||||
loadProductProjects(productID);
|
||||
loadProductplans(productID);
|
||||
loadProductStories(productID);
|
||||
loadProductMembers(productID);
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -125,34 +125,6 @@ $(function()
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Ajax change execution name.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function changeAssignedTo(projectID)
|
||||
{
|
||||
if(parseInt(projectID))
|
||||
{
|
||||
loadProjectTeamMembers(projectID);
|
||||
var link = createLink('bug', 'ajaxGetExecutionLang', 'projectID=' + projectID);
|
||||
$.post(link, function(executionLang)
|
||||
{
|
||||
$('#executionBox').html(executionLang);
|
||||
})
|
||||
}
|
||||
else if($('#execution').val() != 0)
|
||||
{
|
||||
loadAssignedTo($('#execution').val());
|
||||
}
|
||||
else
|
||||
{
|
||||
setAssignedTo();
|
||||
}
|
||||
}
|
||||
|
||||
$(window).unload(function(){
|
||||
if(blockID) window.parent.refreshBlock($('#block' + blockID));
|
||||
});
|
||||
|
||||
@@ -460,6 +460,8 @@ class bugModel extends model
|
||||
echo(js::alert($this->lang->bug->executionAccessDenied));
|
||||
$loginLink = $this->config->requestType == 'GET' ? "?{$this->config->moduleVar}=user&{$this->config->methodVar}=login" : "user{$this->config->requestFix}login";
|
||||
if(strpos($this->server->http_referer, $loginLink) !== false) return print(js::locate(helper::createLink('bug', 'index', '')));
|
||||
if($this->app->tab == 'my') print(js::reload('parent'));
|
||||
|
||||
return print(js::locate('back'));
|
||||
}
|
||||
}
|
||||
@@ -1898,14 +1900,15 @@ class bugModel extends model
|
||||
* get Product member pairs.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branchID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getProductMemberPairs($productID)
|
||||
public function getProductMemberPairs($productID, $branchID = '')
|
||||
{
|
||||
if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getTeamMembersPairs();
|
||||
|
||||
$projects = $this->loadModel('product')->getProjectPairsByProduct($productID);
|
||||
$projects = $this->loadModel('product')->getProjectPairsByProduct($productID, $branchID);
|
||||
|
||||
$users = $this->dao->select("t2.id, t2.account, t2.realname")->from(TABLE_TEAM)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account')
|
||||
|
||||
@@ -102,7 +102,27 @@
|
||||
<?php endif;?>
|
||||
<td><?php echo html::select("modules[$bugID]", isset($modules[$bug->product][$bug->branch]) ? $modules[$bug->product][$bug->branch] : array(0 => '/'), $bug->module, "class='form-control picker-select' data-drop-width='auto'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'productplan', ' hidden')?>' style='overflow:visible'><?php echo html::select("plans[$bugID]", $plans, $bug->plan, "class='form-control picker-select' data-drop-width='auto'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'assignedTo', ' hidden')?>' style='overflow:visible'><?php echo html::select("assignedTos[$bugID]", $users, $bug->assignedTo, "class='form-control picker-select' data-drop-width='auto'");?></td>
|
||||
<?php
|
||||
$assignedToList = array();
|
||||
if($bug->execution)
|
||||
{
|
||||
$assignedToList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $executionMembers[$bug->execution];
|
||||
}
|
||||
elseif($bug->project)
|
||||
{
|
||||
$assignedToList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $projectMembers[$bug->project];
|
||||
}
|
||||
else
|
||||
{
|
||||
$assignedToList = $productMembers[$bug->product][$bug->branch];
|
||||
if(empty($assignedToList))
|
||||
{
|
||||
$assignedToList = $users;
|
||||
unset($assignedToList['closed']);
|
||||
}
|
||||
}
|
||||
?>
|
||||
<td class='<?php echo zget($visibleFields, 'assignedTo', ' hidden')?>' style='overflow:visible'><?php echo html::select("assignedTos[$bugID]", $assignedToList, $bug->assignedTo, "class='form-control picker-select' data-drop-width='135px'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'deadline', ' hidden')?>' style='overflow:visible'><?php echo html::input("deadlines[$bugID]", $bug->deadline, "class='form-control form-date'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'os', "class='hidden'")?>><?php echo html::select("os[$bugID]", $osList, $bug->os, 'class=form-control');?></td>
|
||||
<td <?php echo zget($visibleFields, 'browser', "class='hidden'")?>><?php echo html::select("browsers[$bugID]", $browserList, $bug->browser, 'class=form-control');?></td>
|
||||
|
||||
@@ -490,6 +490,9 @@ $(function(){$('#bugForm').table();})
|
||||
<?php if(isset($config->qa->homepage) and $config->qa->homepage != 'browse' and $config->global->flow == 'full'):?>
|
||||
$(function(){$('#modulemenu .nav li:last').after("<li class='right'><a style='font-size:12px' href='javascript:setHomepage(\"qa\", \"browse\")'><i class='icon icon-cog'></i> <?php echo $lang->homepage?></a></li>")});
|
||||
<?php endif;?>
|
||||
<?php if(count($bugs) <= 2):?>
|
||||
$('#bugForm .table-footer .table-actions #assignedTo').closest('.btn-group.dropup').removeClass('dropup').addClass('dropdown');
|
||||
<?php endif;?>
|
||||
function handleLinkButtonClick()
|
||||
{
|
||||
var xxcUrl = "xxc:openInApp/zentao-integrated/" + encodeURIComponent(window.location.href.replace(/.display=card/, '').replace(/\.xhtml/, '.html'));
|
||||
|
||||
@@ -153,7 +153,7 @@ if($this->app->tab == 'project') js::set('objectID', $bug->project);
|
||||
<th><?php echo $lang->bug->assignedTo;?></th>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select('assignedTo', $users, $bug->assignedTo, "class='form-control chosen'");?>
|
||||
<?php echo html::select('assignedTo', $assignedToList, $bug->assignedTo, "class='form-control chosen'");?>
|
||||
<span class='input-group-btn'><?php echo html::commonButton($lang->bug->allUsers, "class='btn btn-default' onclick='loadAllUsers()' data-toggle='tooltip'");?></span>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -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