* Add the related test report for create testtask.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
ALTER TABLE `zt_project` CHANGE `lifetime` `lifetime` char(30) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `zt_story` ADD `category` varchar(30) NOT NULL DEFAULT 'feature' AFTER `type`;
|
||||
ALTER TABLE `zt_testtask` ADD `type` varchar(255) NOT NULL DEFAULT '' AFTER `build`;
|
||||
ALTER TABLE `zt_testtask` ADD `testreport` mediumint(8) unsigned NOT NULL AFTER `status`;
|
||||
|
||||
@@ -1060,6 +1060,7 @@ CREATE TABLE IF NOT EXISTS `zt_testtask` (
|
||||
`desc` text NOT NULL,
|
||||
`report` text NOT NULL,
|
||||
`status` enum('blocked','doing','wait','done') NOT NULL DEFAULT 'wait',
|
||||
`testreport` mediumint(8) unsigned NOT NULL,
|
||||
`auto` varchar(10) NOT NULL DEFAULT 'no',
|
||||
`subStatus` varchar(30) NOT NULL default '',
|
||||
`deleted` enum('0','1') NOT NULL default '0',
|
||||
|
||||
@@ -373,10 +373,10 @@ class build extends control
|
||||
}
|
||||
if($varName == 'testTaskBuild')
|
||||
{
|
||||
$builds = $this->build->getExecutionBuildPairs($executionID, $productID, $branch, 'noempty,notrunk');
|
||||
$builds = array('' => '') + $this->build->getExecutionBuildPairs($executionID, $productID, $branch, 'noempty,notrunk');
|
||||
if($isJsonView) die(json_encode($builds));
|
||||
|
||||
if(empty($builds))
|
||||
if(empty(array_filter($builds)))
|
||||
{
|
||||
$projectID = $this->dao->select('project')->from(TABLE_EXECUTION)->where('id')->eq($executionID)->fetch('project');
|
||||
|
||||
@@ -385,7 +385,7 @@ class build extends control
|
||||
$html .= html::a("javascript:loadExecutionBuilds($executionID)", $this->lang->refresh);
|
||||
die($html);
|
||||
}
|
||||
die(html::select('build', $builds, $build, "class='form-control'"));
|
||||
die(html::select('build', $builds, $build, "class='form-control' onchange='loadTestReports(this.value)'"));
|
||||
}
|
||||
if($varName == 'dropdownList')
|
||||
{
|
||||
|
||||
@@ -1413,4 +1413,18 @@ class testtask extends control
|
||||
$pairs = $this->testtask->getPairs($productID, $executionID);
|
||||
die(html::select('testtask', $pairs, '', "class='form-control chosen'"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax get test report.
|
||||
*
|
||||
* @param int $buildID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetTestReports($buildID)
|
||||
{
|
||||
/* Testreport list. */
|
||||
$pairs = $this->dao->select('id,title')->from(TABLE_TESTREPORT)->where('builds')->like('%' . $buildID . '%')->fetchPairs('id','title');
|
||||
die(html::select('testreport', $pairs, '', "class='form-control chosen'"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,6 +91,30 @@ function loadExecutionBuilds(executionID)
|
||||
{
|
||||
$('#resolvedBuild').attr('id', 'build').attr('name', 'build').find('option[value=trunk]').remove();
|
||||
$('#build').chosen();
|
||||
|
||||
testreportData = '<select id="testreport" name="testreport" class="form-control"></select>';
|
||||
$('#testreport').replaceWith(testreportData);
|
||||
$('#testreport_chosen').remove();
|
||||
$("#testreport").chosen();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Load test report.
|
||||
*
|
||||
* @param int buildID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function loadTestReports(buildID)
|
||||
{
|
||||
link = createLink('testtask', 'ajaxGetTestReports', 'buildID=' + buildID);
|
||||
$.get(link, function(data)
|
||||
{
|
||||
if(!data) data = '<select id="testreport" name="testreport" class="form-control"></select>';
|
||||
$('#testreport').replaceWith(data);
|
||||
$('#testreport_chosen').remove();
|
||||
$("#testreport").chosen();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
function loadProductRelated()
|
||||
{
|
||||
loadExecutions($('#product').val());
|
||||
data = '<select id="build" name="build" class="form-control"></select>';
|
||||
data = '<select id="build" name="build" class="form-control" onchange="loadTestReports(this.value)"></select>';
|
||||
$('#build').replaceWith(data);
|
||||
$('#build_chosen').remove();
|
||||
$("#build").chosen();
|
||||
|
||||
@@ -72,6 +72,7 @@ $lang->testtask->desc = 'Beschreibung';
|
||||
$lang->testtask->mailto = 'Mail an';
|
||||
$lang->testtask->status = 'Status';
|
||||
$lang->testtask->subStatus = 'Sub Status';
|
||||
$lang->testtask->testreport = 'Test Report';
|
||||
$lang->testtask->assignedTo = 'Zugeordnet';
|
||||
$lang->testtask->linkVersion = 'Version';
|
||||
$lang->testtask->lastRunAccount = 'Ausgeführt von';
|
||||
|
||||
@@ -75,6 +75,7 @@ $lang->testtask->desc = 'Description';
|
||||
$lang->testtask->mailto = 'Mailto';
|
||||
$lang->testtask->status = 'Status';
|
||||
$lang->testtask->subStatus = 'Sub Status';
|
||||
$lang->testtask->testreport = 'Test Report';
|
||||
$lang->testtask->assignedTo = 'Assigned';
|
||||
$lang->testtask->linkVersion = 'Build';
|
||||
$lang->testtask->lastRunAccount = 'RunBy';
|
||||
|
||||
@@ -72,6 +72,7 @@ $lang->testtask->desc = 'Description';
|
||||
$lang->testtask->mailto = 'Mailto';
|
||||
$lang->testtask->status = 'Statut';
|
||||
$lang->testtask->subStatus = 'Sous-statut';
|
||||
$lang->testtask->testreport = 'Test Report';
|
||||
$lang->testtask->assignedTo = 'Affecté';
|
||||
$lang->testtask->linkVersion = 'Build';
|
||||
$lang->testtask->lastRunAccount = 'Jouée par';
|
||||
|
||||
@@ -72,6 +72,7 @@ $lang->testtask->desc = 'Mô tả';
|
||||
$lang->testtask->mailto = 'Mail tới';
|
||||
$lang->testtask->status = 'Tình trạng';
|
||||
$lang->testtask->subStatus = 'Tình trạng con';
|
||||
$lang->testtask->testreport = 'Test Report';
|
||||
$lang->testtask->assignedTo = 'Đã giao';
|
||||
$lang->testtask->linkVersion = 'Bản dựng';
|
||||
$lang->testtask->lastRunAccount = 'Chạy bởi';
|
||||
|
||||
@@ -75,6 +75,7 @@ $lang->testtask->desc = '描述';
|
||||
$lang->testtask->mailto = '抄送给';
|
||||
$lang->testtask->status = '当前状态';
|
||||
$lang->testtask->subStatus = '子状态';
|
||||
$lang->testtask->testreport = '相关测试报告';
|
||||
$lang->testtask->assignedTo = '指派给';
|
||||
$lang->testtask->linkVersion = '版本';
|
||||
$lang->testtask->lastRunAccount = '执行人';
|
||||
|
||||
@@ -75,6 +75,7 @@ $lang->testtask->desc = '描述';
|
||||
$lang->testtask->mailto = '抄送給';
|
||||
$lang->testtask->status = '當前狀態';
|
||||
$lang->testtask->subStatus = '子狀態';
|
||||
$lang->testtask->testreport = '相關測試報告';
|
||||
$lang->testtask->assignedTo = '指派給';
|
||||
$lang->testtask->linkVersion = '版本';
|
||||
$lang->testtask->lastRunAccount = '執行人';
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<table class='table table-form'>
|
||||
<?php if(isset($executionID)):?>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->testtask->product;?></th>
|
||||
<th class='w-100px'><?php echo $lang->testtask->product;?></th>
|
||||
<td class='w-p35-f'><?php echo html::select('product', $products, $productID, "class='form-control chosen' onchange='loadProductRelated()'");?></td><td></td>
|
||||
</tr>
|
||||
<?php else:?>
|
||||
@@ -41,7 +41,7 @@
|
||||
<th class='w-80px'><?php echo $lang->testtask->build;?></th>
|
||||
<td class='w-p35-f'>
|
||||
<div class='input-group' id='buildBox'>
|
||||
<?php echo html::select('build', empty($builds) ? '' : $builds, $build, "class='form-control chosen'");?>
|
||||
<?php echo html::select('build', empty($builds) ? '' : $builds, $build, "class='form-control chosen' onchange='loadTestReports(this.value)'");?>
|
||||
<?php if(isset($executionID) and $executionID and empty($builds)):?>
|
||||
<span class='input-group-addon'><?php echo html::a(helper::createLink('build', 'create', "executionID=$executionID&productID=$productID&projectID=$projectID", '', true), $lang->build->create, '', "data-toggle='modal' data-type='iframe' data-width='95%'")?> </span>
|
||||
</div>
|
||||
@@ -78,6 +78,10 @@
|
||||
<th><?php echo $lang->testtask->status;?></th>
|
||||
<td><?php echo html::select('status', $lang->testtask->statusList, '', "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->testtask->testreport;?></th>
|
||||
<td><?php echo html::select('testreport', '', '', "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->testtask->name;?></th>
|
||||
<td colspan='2'><?php echo html::input('name', '', "class='form-control'");?></td>
|
||||
|
||||
Reference in New Issue
Block a user