resolve conflict

This commit is contained in:
lanzongjun
2022-10-18 09:26:14 +08:00
291 changed files with 3879 additions and 1701 deletions
+72 -72
View File
@@ -24,7 +24,7 @@ $config->bug->list->allFields = 'id, module, execution, story, task,
lastEditedBy,
lastEditedDate';
$config->bug->list->defaultFields = 'id,severity,pri,title,openedBy,assignedTo,resolvedBy,resolution';
$config->bug->list->defaultFields = 'id,title,severity,pri,openedBy,assignedTo,resolvedBy,resolution';
$config->bug->exportFields = 'id, product, branch, module, project, execution, story, task,
title, keywords, severity, pri, type, os, browser,
@@ -159,7 +159,7 @@ $config->bug->search['params']['deadline'] = array('operator' => '=',
$config->bug->search['params']['activatedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
$config->bug->datatable = new stdclass();
$config->bug->datatable->defaultField = array('id', 'severity', 'pri', 'confirmed', 'title', 'status', 'openedBy', 'openedDate', 'assignedTo', 'resolution', 'actions');
$config->bug->datatable->defaultField = array('id', 'title', 'severity', 'pri', 'status', 'openedBy', 'openedDate', 'confirmed', 'assignedTo', 'resolution', 'actions');
$config->bug->datatable->fieldList['id']['title'] = 'idAB';
$config->bug->datatable->fieldList['id']['fixed'] = 'left';
@@ -174,6 +174,12 @@ $config->bug->datatable->fieldList['module']['control'] = 'select';
$config->bug->datatable->fieldList['module']['title'] = 'module';
$config->bug->datatable->fieldList['module']['dataSource'] = array('module' => 'tree', 'method' => 'getOptionMenu', 'params' => '$productID&bug');
$config->bug->datatable->fieldList['title']['title'] = 'title';
$config->bug->datatable->fieldList['title']['fixed'] = 'left';
$config->bug->datatable->fieldList['title']['width'] = 'auto';
$config->bug->datatable->fieldList['title']['required'] = 'yes';
$config->bug->datatable->fieldList['title']['minWidth'] = '200';
$config->bug->datatable->fieldList['severity']['title'] = 'severityAB';
$config->bug->datatable->fieldList['severity']['fixed'] = 'left';
$config->bug->datatable->fieldList['severity']['width'] = '50';
@@ -186,16 +192,10 @@ $config->bug->datatable->fieldList['pri']['width'] = '50';
$config->bug->datatable->fieldList['pri']['required'] = 'no';
$config->bug->datatable->fieldList['pri']['name'] = $lang->bug->pri;
$config->bug->datatable->fieldList['confirmed']['title'] = 'confirmedAB';
$config->bug->datatable->fieldList['confirmed']['fixed'] = 'left';
$config->bug->datatable->fieldList['confirmed']['width'] = '100';
$config->bug->datatable->fieldList['confirmed']['required'] = 'no';
$config->bug->datatable->fieldList['title']['title'] = 'title';
$config->bug->datatable->fieldList['title']['fixed'] = 'left';
$config->bug->datatable->fieldList['title']['width'] = 'auto';
$config->bug->datatable->fieldList['title']['required'] = 'yes';
$config->bug->datatable->fieldList['title']['minWidth'] = '200';
$config->bug->datatable->fieldList['status']['title'] = 'statusAB';
$config->bug->datatable->fieldList['status']['fixed'] = 'left';
$config->bug->datatable->fieldList['status']['width'] = '80';
$config->bug->datatable->fieldList['status']['required'] = 'no';
$config->bug->datatable->fieldList['branch']['title'] = 'branch';
$config->bug->datatable->fieldList['branch']['fixed'] = 'left';
@@ -230,10 +230,66 @@ $config->bug->datatable->fieldList['plan']['fixed'] = 'no';
$config->bug->datatable->fieldList['plan']['width'] = '120';
$config->bug->datatable->fieldList['plan']['required'] = 'no';
$config->bug->datatable->fieldList['status']['title'] = 'statusAB';
$config->bug->datatable->fieldList['status']['fixed'] = 'no';
$config->bug->datatable->fieldList['status']['width'] = '80';
$config->bug->datatable->fieldList['status']['required'] = 'no';
$config->bug->datatable->fieldList['openedBy']['title'] = 'openedByAB';
$config->bug->datatable->fieldList['openedBy']['fixed'] = 'no';
$config->bug->datatable->fieldList['openedBy']['width'] = '80';
$config->bug->datatable->fieldList['openedBy']['required'] = 'no';
$config->bug->datatable->fieldList['openedDate']['title'] = 'openedDateAB';
$config->bug->datatable->fieldList['openedDate']['fixed'] = 'no';
$config->bug->datatable->fieldList['openedDate']['width'] = '90';
$config->bug->datatable->fieldList['openedDate']['required'] = 'no';
$config->bug->datatable->fieldList['openedBuild']['title'] = 'openedBuild';
$config->bug->datatable->fieldList['openedBuild']['fixed'] = 'no';
$config->bug->datatable->fieldList['openedBuild']['width'] = '120';
$config->bug->datatable->fieldList['openedBuild']['required'] = 'no';
$config->bug->datatable->fieldList['openedBuild']['control'] = 'multiple';
$config->bug->datatable->fieldList['openedBuild']['dataSource'] = array('module' => 'build', 'method' =>'getBuildPairs', 'params' => '$productID&$branch&noempty,noterminate,nodone,withbranch');
$config->bug->datatable->fieldList['confirmed']['title'] = 'confirmedAB';
$config->bug->datatable->fieldList['confirmed']['fixed'] = 'no';
$config->bug->datatable->fieldList['confirmed']['width'] = '100';
$config->bug->datatable->fieldList['confirmed']['required'] = 'no';
$config->bug->datatable->fieldList['assignedTo']['title'] = 'assignedToAB';
$config->bug->datatable->fieldList['assignedTo']['fixed'] = 'no';
$config->bug->datatable->fieldList['assignedTo']['width'] = '120';
$config->bug->datatable->fieldList['assignedTo']['required'] = 'no';
$config->bug->datatable->fieldList['assignedTo']['dataSource'] = array('module' => 'user', 'method' =>'getPairs', 'params' => 'noclosed|noletter');
$config->bug->datatable->fieldList['assignedDate']['title'] = 'assignedDate';
$config->bug->datatable->fieldList['assignedDate']['fixed'] = 'no';
$config->bug->datatable->fieldList['assignedDate']['width'] = '90';
$config->bug->datatable->fieldList['assignedDate']['required'] = 'no';
$config->bug->datatable->fieldList['deadline']['title'] = 'deadline';
$config->bug->datatable->fieldList['deadline']['fixed'] = 'no';
$config->bug->datatable->fieldList['deadline']['width'] = '90';
$config->bug->datatable->fieldList['deadline']['required'] = 'no';
$config->bug->datatable->fieldList['deadline']['control'] = 'date';
$config->bug->datatable->fieldList['resolvedBy']['title'] = 'resolvedBy';
$config->bug->datatable->fieldList['resolvedBy']['fixed'] = 'no';
$config->bug->datatable->fieldList['resolvedBy']['width'] = '100';
$config->bug->datatable->fieldList['resolvedBy']['required'] = 'no';
$config->bug->datatable->fieldList['resolution']['title'] = 'resolutionAB';
$config->bug->datatable->fieldList['resolution']['fixed'] = 'no';
$config->bug->datatable->fieldList['resolution']['width'] = '110';
$config->bug->datatable->fieldList['resolution']['required'] = 'no';
$config->bug->datatable->fieldList['resolvedDate']['title'] = 'resolvedDateAB';
$config->bug->datatable->fieldList['resolvedDate']['fixed'] = 'no';
$config->bug->datatable->fieldList['resolvedDate']['width'] = '120';
$config->bug->datatable->fieldList['resolvedDate']['required'] = 'no';
$config->bug->datatable->fieldList['resolvedBuild']['title'] = 'resolvedBuild';
$config->bug->datatable->fieldList['resolvedBuild']['fixed'] = 'no';
$config->bug->datatable->fieldList['resolvedBuild']['width'] = '120';
$config->bug->datatable->fieldList['resolvedBuild']['required'] = 'no';
$config->bug->datatable->fieldList['resolvedBuild']['control'] = 'select';
$config->bug->datatable->fieldList['resolvedBuild']['dataSource'] = array('module' => 'bug', 'method' =>'getRelatedObjects', 'params' => 'resolvedBuild&id,name');
$config->bug->datatable->fieldList['activatedCount']['title'] = 'activatedCountAB';
$config->bug->datatable->fieldList['activatedCount']['fixed'] = 'no';
@@ -283,62 +339,6 @@ $config->bug->datatable->fieldList['mailto']['fixed'] = 'no';
$config->bug->datatable->fieldList['mailto']['width'] = '100';
$config->bug->datatable->fieldList['mailto']['required'] = 'no';
$config->bug->datatable->fieldList['openedBy']['title'] = 'openedByAB';
$config->bug->datatable->fieldList['openedBy']['fixed'] = 'no';
$config->bug->datatable->fieldList['openedBy']['width'] = '80';
$config->bug->datatable->fieldList['openedBy']['required'] = 'no';
$config->bug->datatable->fieldList['openedDate']['title'] = 'openedDateAB';
$config->bug->datatable->fieldList['openedDate']['fixed'] = 'no';
$config->bug->datatable->fieldList['openedDate']['width'] = '90';
$config->bug->datatable->fieldList['openedDate']['required'] = 'no';
$config->bug->datatable->fieldList['openedBuild']['title'] = 'openedBuild';
$config->bug->datatable->fieldList['openedBuild']['fixed'] = 'no';
$config->bug->datatable->fieldList['openedBuild']['width'] = '120';
$config->bug->datatable->fieldList['openedBuild']['required'] = 'no';
$config->bug->datatable->fieldList['openedBuild']['control'] = 'multiple';
$config->bug->datatable->fieldList['openedBuild']['dataSource'] = array('module' => 'build', 'method' =>'getBuildPairs', 'params' => '$productID&$branch&noempty,noterminate,nodone,withbranch');
$config->bug->datatable->fieldList['assignedTo']['title'] = 'assignedToAB';
$config->bug->datatable->fieldList['assignedTo']['fixed'] = 'no';
$config->bug->datatable->fieldList['assignedTo']['width'] = '120';
$config->bug->datatable->fieldList['assignedTo']['required'] = 'no';
$config->bug->datatable->fieldList['assignedTo']['dataSource'] = array('module' => 'bug', 'method' =>'getProductMemberPairs', 'params' => '$productID&$branch');
$config->bug->datatable->fieldList['assignedDate']['title'] = 'assignedDate';
$config->bug->datatable->fieldList['assignedDate']['fixed'] = 'no';
$config->bug->datatable->fieldList['assignedDate']['width'] = '90';
$config->bug->datatable->fieldList['assignedDate']['required'] = 'no';
$config->bug->datatable->fieldList['deadline']['title'] = 'deadline';
$config->bug->datatable->fieldList['deadline']['fixed'] = 'no';
$config->bug->datatable->fieldList['deadline']['width'] = '90';
$config->bug->datatable->fieldList['deadline']['required'] = 'no';
$config->bug->datatable->fieldList['deadline']['control'] = 'date';
$config->bug->datatable->fieldList['resolvedBy']['title'] = 'resolvedByAB';
$config->bug->datatable->fieldList['resolvedBy']['fixed'] = 'no';
$config->bug->datatable->fieldList['resolvedBy']['width'] = '100';
$config->bug->datatable->fieldList['resolvedBy']['required'] = 'no';
$config->bug->datatable->fieldList['resolution']['title'] = 'resolutionAB';
$config->bug->datatable->fieldList['resolution']['fixed'] = 'no';
$config->bug->datatable->fieldList['resolution']['width'] = '110';
$config->bug->datatable->fieldList['resolution']['required'] = 'no';
$config->bug->datatable->fieldList['resolvedDate']['title'] = 'resolvedDateAB';
$config->bug->datatable->fieldList['resolvedDate']['fixed'] = 'no';
$config->bug->datatable->fieldList['resolvedDate']['width'] = '120';
$config->bug->datatable->fieldList['resolvedDate']['required'] = 'no';
$config->bug->datatable->fieldList['resolvedBuild']['title'] = 'resolvedBuild';
$config->bug->datatable->fieldList['resolvedBuild']['fixed'] = 'no';
$config->bug->datatable->fieldList['resolvedBuild']['width'] = '120';
$config->bug->datatable->fieldList['resolvedBuild']['required'] = 'no';
$config->bug->datatable->fieldList['resolvedBuild']['control'] = 'select';
$config->bug->datatable->fieldList['resolvedBuild']['dataSource'] = array('module' => 'bug', 'method' =>'getRelatedObjects', 'params' => 'resolvedBuild&id,name');
$config->bug->datatable->fieldList['closedBy']['title'] = 'closedBy';
$config->bug->datatable->fieldList['closedBy']['fixed'] = 'no';
$config->bug->datatable->fieldList['closedBy']['width'] = '80';
+10 -8
View File
@@ -966,14 +966,8 @@ class bug extends control
$changes = $this->bug->update($bugID);
if(dao::isError())
{
if(defined('RUN_MODE') && RUN_MODE == 'api')
{
return $this->send(array('status' => 'error', 'message' => dao::getError()));
}
else
{
return print(js::error(dao::getError()));
}
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'error', 'message' => dao::getError()));
return print(js::error(dao::getError()));
}
}
@@ -1154,10 +1148,17 @@ class bug extends control
$assignedToList = array_filter($assignedToList);
if(empty($assignedToList)) $assignedToList = $this->user->getPairs('devfirst|noclosed');
}
if($bug->assignedTo and !isset($assignedToList[$bug->assignedTo]))
{
/* Fix bug #28378. */
$assignedTo = $this->user->getById($bug->assignedTo);
$assignedToList[$bug->assignedTo] = $assignedTo->realname;
}
if($bug->status == 'closed') $assignedToList['closed'] = 'Closed';
$branch = $product->type == 'branch' ? ($bug->branch > 0 ? $bug->branch . ',0' : '0') : '';
$productBugs = $this->bug->getProductBugPairs($productID, $branch);
unset($productBugs[$bugID]);
$this->view->bug = $bug;
$this->view->productID = $productID;
@@ -1814,6 +1815,7 @@ class bug extends control
$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);
-1
View File
@@ -2,7 +2,6 @@
.closed, .closed a {color: gray; text-decoration:line-through;}
.resolved, .resolved a {color: #8EC21F; text-decoration: none;}
.tree .closed, .tree .closed a {color: #003366; text-decoration: none;}
td.delayed {color: #fff; background: #e84e0f !important;}
#bugForm .setting {height: 25px;}
.datatable-wrapper .table-datatable .datatable-row td {height: 37px;}
+6 -2
View File
@@ -754,7 +754,7 @@ class bugModel extends model
/* Link bug to build and release. */
if($bug->resolution == 'fixed' and !empty($bug->resolvedBuild) and $oldBug->resolvedBuild != $bug->resolvedBuild)
{
if(!empty($oldBug->resolvedBuild)) $this->loadModel('build')->unlinkBug((int)$oldBug->resolvedBuild, (int)$bugID);
if(!empty($oldBug->resolvedBuild)) $this->loadModel('build')->unlinkBug($oldBug->resolvedBuild, (int)$bugID);
$this->linkBugToBuild($bugID, $bug->resolvedBuild);
}
@@ -2214,6 +2214,7 @@ class bugModel extends model
if(!empty($run->task)) $testtask = $this->loadModel('testtask')->getById($run->task);
$executionID = isset($testtask->execution) ? $testtask->execution : 0;
if(!$executionID and $caseID > 0) $executionID = isset($run->case->execution) ? $run->case->execution : 0; // Fix feedback #1043.
if(!$executionID and $this->app->tab == 'execution') $executionID = $this->session->execution;
return array('title' => $title, 'steps' => $bugSteps, 'storyID' => $run->case->story, 'moduleID' => $run->case->module, 'version' => $run->case->version, 'executionID' => $executionID);
@@ -3297,6 +3298,9 @@ class bugModel extends model
$class .= ' text-ellipsis';
$title = "title='" . $browser . "'";
break;
case 'deadline':
$class .= ' text-center';
break;
}
if($id == 'deadline' && isset($bug->delay) && $bug->status == 'active') $class .= ' delayed';
@@ -3440,7 +3444,7 @@ class bugModel extends model
echo helper::isZeroDate($bug->assignedDate) ? '' : substr($bug->assignedDate, 5, 11);
break;
case 'deadline':
echo helper::isZeroDate($bug->deadline) ? '' : substr($bug->deadline, 5, 11);
echo helper::isZeroDate($bug->deadline) ? '' : '<span>' . substr($bug->deadline, 5, 11) . '</span>';
break;
case 'resolvedBy':
echo zget($users, $bug->resolvedBy, $bug->resolvedBy);
+2 -2
View File
@@ -17,7 +17,7 @@ foreach($products as $product)
}
$productsPinYin = common::convert2Pinyin($productNames);
$linkHtml = $this->product->setParamsForLink($module, $link, $projectID, 0);
$productsHtml = count($products) > 1 ? html::a($linkHtml, $this->lang->bug->allProduct, '', "class='text-important' title='{$this->lang->bug->allProduct}' data-key='" . zget($productsPinYin, $this->lang->bug->allProduct, '') . "' data-app='{$this->app->tab}'") : '';
$productsHtml = count($products) > 1 ? html::a($linkHtml, $this->lang->bug->allProduct, '', "class='text-primary' title='{$this->lang->bug->allProduct}' data-key='" . zget($productsPinYin, $this->lang->bug->allProduct, '') . "' data-app='{$this->app->tab}'") : '';
foreach($products as $product)
{
@@ -26,7 +26,7 @@ foreach($products as $product)
$productName .= $product->line ? zget($lines, $product->line, '') . '/' . $product->name : $product->name;
$objectID = ($product->type != 'platform' && $module == 'branch' && $method == 'manage') ? $productID : $product->id;
$linkHtml = $this->product->setParamsForLink($module, $link, $projectID, $product->id);
$productsHtml .= html::a($linkHtml, $productName, '', "class='text-important $selected' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='{$this->app->tab}'");
$productsHtml .= html::a($linkHtml, $productName, '', "class='text-primary $selected' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='{$this->app->tab}'");
}
?>
<div class="table-row">
+5 -1
View File
@@ -143,7 +143,11 @@
<tr>
<td class='pd-0'><?php echo html::select("resolutions[$bugID]", $resolutionList, $bug->resolution, "class='form-control' onchange=setDuplicate(this.value,$bugID)");?></td>
<td class='pd-0 w-p50' id='<?php echo 'duplicateBugBox' . $bugID;?>' <?php if($bug->resolution != 'duplicate') echo "style='display:none'";?>>
<?php echo html::select("duplicateBugs[$bugID]", $productBugList[$bug->product][$bug->branch], $bug->duplicateBug, "class='form-control' placeholder='{$lang->bug->duplicateTip}'");?>
<?php
$productBugs = $productBugList[$bug->product][$bug->branch];
if(isset($productBugs[$bug->id])) unset($productBugs[$bug->id]);
?>
<?php echo html::select("duplicateBugs[$bugID]", $productBugs, $bug->duplicateBug, "class='form-control' placeholder='{$lang->bug->duplicateTip}'");?>
</td>
</tr>
</table>