Merge branch 'sprint/208_tianshujie_58560' into 'master'
* Finish task #58560. See merge request easycorp/zentaopms!4202
This commit is contained in:
+46
-42
@@ -1261,56 +1261,63 @@ class bug extends control
|
||||
}
|
||||
|
||||
/* Get assigned to member. */
|
||||
$this->loadModel('project');
|
||||
$this->loadModel('execution');
|
||||
if($this->app->tab == 'execution' or $this->app->tab == 'project')
|
||||
{
|
||||
$this->loadModel('project');
|
||||
$this->loadModel('execution');
|
||||
|
||||
$productMembers = array();
|
||||
$projectMembers = array();
|
||||
$executionMembers = array();
|
||||
if($productID)
|
||||
{
|
||||
$branchList = zget($branchIdList, $productID, array());
|
||||
foreach($branchList as $branchID)
|
||||
$productMembers = array();
|
||||
$projectMembers = array();
|
||||
$executionMembers = array();
|
||||
if($productID)
|
||||
{
|
||||
$members = $this->bug->getProductMemberPairs($productID, $branchID);
|
||||
$productMembers[$productID][$branchID] = array_filter($members);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($productIdList as $id)
|
||||
{
|
||||
$branchList = zget($branchIdList, $id, array());
|
||||
$branchList = zget($branchIdList, $productID, array());
|
||||
foreach($branchList as $branchID)
|
||||
{
|
||||
$members = $this->bug->getProductMemberPairs($id, $branchID);
|
||||
$productMembers[$id][$branchID] = array_filter($members);
|
||||
$members = $this->bug->getProductMemberPairs($productID, $branchID);
|
||||
$productMembers[$productID][$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)
|
||||
else
|
||||
{
|
||||
$projectMembers[$projectID][$user->account] = $user->realname;
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$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)
|
||||
$projectMemberGroup = $this->project->getTeamMemberGroup($projectIdList);
|
||||
$projectMembers = array();
|
||||
foreach($projectIdList as $projectID)
|
||||
{
|
||||
$executionMembers[$executionID][$user->account] = $user->realname;
|
||||
$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;
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->productMembers = $productMembers;
|
||||
$this->view->projectMembers = $projectMembers;
|
||||
$this->view->executionMembers = $executionMembers;
|
||||
}
|
||||
|
||||
/* Set users. */
|
||||
@@ -1330,9 +1337,6 @@ class bug extends control
|
||||
$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;
|
||||
|
||||
|
||||
@@ -104,22 +104,30 @@
|
||||
<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>
|
||||
<?php
|
||||
$assignedToList = array();
|
||||
if($bug->execution)
|
||||
if($app->tab == 'project' or $app->tab == 'execution')
|
||||
{
|
||||
$assignedToList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $executionMembers[$bug->execution];
|
||||
}
|
||||
elseif($bug->project)
|
||||
{
|
||||
$assignedToList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $projectMembers[$bug->project];
|
||||
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']);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$assignedToList = $productMembers[$bug->product][$bug->branch];
|
||||
if(empty($assignedToList))
|
||||
{
|
||||
$assignedToList = $users;
|
||||
unset($assignedToList['closed']);
|
||||
}
|
||||
$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>
|
||||
|
||||
Reference in New Issue
Block a user