Merge branch 'lyk_feedback_2000' into 'master'
* Resolve feedback #2000. See merge request easycorp/zentaopms!6775
This commit is contained in:
+18
-6
@@ -1822,11 +1822,6 @@ class bug extends control
|
||||
if(!isset($users[$assignedTo])) $assignedTo = $this->bug->getModuleOwner($bug->module, $productID);
|
||||
unset($this->lang->bug->resolutionList['tostory']);
|
||||
|
||||
$product = $this->loadModel('product')->getById($productID);
|
||||
$branch = $product->type == 'branch' ? ($bug->branch > 0 ? $bug->branch . ',0' : '0') : '';
|
||||
$productBugs = $this->bug->getProductBugPairs($productID, $branch);
|
||||
unset($productBugs[$bugID]);
|
||||
|
||||
$this->bug->checkBugExecutionPriv($bug);
|
||||
$this->qa->setMenu($this->products, $productID, $bug->branch);
|
||||
|
||||
@@ -1834,7 +1829,6 @@ class bug extends control
|
||||
$this->view->bug = $bug;
|
||||
$this->view->users = $users;
|
||||
$this->view->assignedTo = $assignedTo;
|
||||
$this->view->productBugs = $productBugs;
|
||||
$this->view->executions = $this->loadModel('product')->getExecutionPairsByProduct($productID, $bug->branch ? "0,{$bug->branch}" : 0, 'id_desc', $projectID, 'stagefilter');
|
||||
$this->view->builds = $this->loadModel('build')->getBuildPairs($productID, $bug->branch, 'withbranch,noreleased');
|
||||
$this->view->actions = $this->action->getList('bug', $bugID);
|
||||
@@ -2476,6 +2470,24 @@ class bug extends control
|
||||
return print(html::select('assignedTo', $productMembers, $selectedUser, 'class="form-control"'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax get product bugs.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function ajaxGetProductBugs($productID, $bugID)
|
||||
{
|
||||
$product = $this->loadModel('product')->getById($productID);
|
||||
$branch = $product->type == 'branch' ? ($bug->branch > 0 ? $bug->branch . ',0' : '0') : '';
|
||||
$productBugs = $this->bug->getProductBugPairs($productID, $branch);
|
||||
unset($productBugs[$bugID]);
|
||||
|
||||
return print(html::select('duplicateBug', $productBugs, '', "class='form-control' placeholder='{$this->lang->bug->duplicateTip}'"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax get project team members.
|
||||
*
|
||||
|
||||
@@ -2,6 +2,18 @@ function setDuplicate(resolution)
|
||||
{
|
||||
if(resolution == 'duplicate')
|
||||
{
|
||||
$.ajaxSettings.async = false;
|
||||
$.get(createLink('bug', 'ajaxGetProductBugs', 'projectID=' + productID + '&bugID=' + bugID),function(data)
|
||||
{
|
||||
$('#duplicateBug').replaceWith(data);
|
||||
$('#pk_duplicateBug-search').parent().parent().remove();
|
||||
$('#duplicateBug').picker(
|
||||
{
|
||||
disableEmptySearch : true,
|
||||
dropWidth : 'auto'
|
||||
});
|
||||
});
|
||||
$.ajaxSettings.async = true;
|
||||
$('#duplicateBugBox').show();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
<?php
|
||||
js::set('page', 'resolve');
|
||||
js::set('productID', $bug->product);
|
||||
js::set('bugID', $bug->id);
|
||||
js::set('released', $lang->build->released);
|
||||
?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
@@ -39,7 +40,7 @@ js::set('released', $lang->build->released);
|
||||
</tr>
|
||||
<tr id='duplicateBugBox' class='hide'>
|
||||
<th><?php echo $lang->bug->duplicateBug;?></th>
|
||||
<td class='required'><?php echo html::select('duplicateBug', $productBugs, '', "class='form-control' placeholder='{$lang->bug->duplicateTip}'");?></td>
|
||||
<td class='required'><?php echo html::select('duplicateBug', '', '', "class='form-control' placeholder='{$lang->bug->duplicateTip}'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->bug->resolvedBuild;?></th>
|
||||
|
||||
Reference in New Issue
Block a user