* Finish task #38178.

This commit is contained in:
hufangzhou
2021-05-13 10:23:25 +08:00
parent b12c613ed9
commit d4e19aed32
3 changed files with 25 additions and 14 deletions
+14 -11
View File
@@ -317,13 +317,14 @@ class testtask extends control
$this->view->position[] = $this->lang->testtask->common;
$this->view->position[] = $this->lang->testtask->view;
$this->view->productID = $productID;
$this->view->task = $task;
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
$this->view->actions = $this->loadModel('action')->getList('testtask', $taskID);
$this->view->build = $build;
$this->view->stories = $stories;
$this->view->bugs = $bugs;
$this->view->productID = $productID;
$this->view->task = $task;
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
$this->view->actions = $this->loadModel('action')->getList('testtask', $taskID);
$this->view->build = $build;
$this->view->testreportTitle = $this->dao->select('title')->from(TABLE_TESTREPORT)->where('id')->eq($task->testreport)->fetch('title');
$this->view->stories = $stories;
$this->view->bugs = $bugs;
$this->display();
}
@@ -742,14 +743,16 @@ class testtask extends control
$this->view->position[] = $this->lang->testtask->edit;
/* Create testtask from testtask of test.*/
$productID = $productID ? $productID : key($this->products);
$projectID = $this->lang->navGroup->testtask == 'qa' ? 0 : $this->session->project;
$executions = empty($productID) ? array() : $this->product->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID);
$builds = empty($productID) ? array() : $this->loadModel('build')->getProductBuildPairs($productID, 0, 'notrunk', true);
$productID = $productID ? $productID : key($this->products);
$projectID = $this->lang->navGroup->testtask == 'qa' ? 0 : $this->session->project;
$executions = empty($productID) ? array() : $this->product->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID);
$builds = empty($productID) ? array() : $this->loadModel('build')->getProductBuildPairs($productID, 0, 'notrunk', true);
$testreports = $this->dao->select('id,title')->from(TABLE_TESTREPORT)->where('builds')->like('%' . $task->build . '%')->fetchPairs('id','title');
$this->view->task = $task;
$this->view->executions = $executions;
$this->view->builds = $builds;
$this->view->testreports = $testreports;
$this->view->users = $this->loadModel('user')->getPairs('nodeleted', $task->owner);
$this->view->contactLists = $this->user->getContactLists($this->app->user->account, 'withnote');
+6 -2
View File
@@ -25,7 +25,7 @@
<form method='post' class="main-form form-ajax" enctype="multipart/form-data" id='dataform'>
<table class='table table-form'>
<tr>
<th class='w-80px'><?php echo $lang->testtask->execution;?></th>
<th class='w-100px'><?php echo $lang->testtask->execution;?></th>
<td class='w-p35-f'>
<?php
echo html::select('execution', $executions, $task->execution, "class='form-control chosen' onchange='loadExecutionRelated(this.value)'");
@@ -35,7 +35,7 @@
<td></td>
</tr>
<tr>
<th class='w-80px'><?php echo $lang->testtask->build;?></th>
<th><?php echo $lang->testtask->build;?></th>
<td class='w-p35-f'><span id='buildBox'><?php echo html::select('build', $builds, $task->build, "class='form-control chosen'");?></span></td>
<td></td>
</tr>
@@ -67,6 +67,10 @@
<th><?php echo $lang->testtask->status;?></th>
<td><?php echo html::select('status', $lang->testtask->statusList, $task->status, "class='form-control chosen'");?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->testreport;?></th>
<td><?php echo html::select('testreport', $testreports, $task->testreport, "class='form-control chosen'");?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->name;?></th>
<td colspan='2'><?php echo html::input('name', $task->name, "class='form-control'");?></td>
+5 -1
View File
@@ -80,7 +80,7 @@
<table class="table table-data table-fixed">
<?php $isOnlybody = helper::inOnlyBodyMode(); ?>
<tr>
<th class='w-60px'><?php echo $lang->testtask->execution;?></th>
<th class='w-90px'><?php echo $lang->testtask->execution;?></th>
<td><?php echo $isOnlybody ? $task->executionName : html::a($this->createLink('execution', 'story', "executionID=$task->execution"), $task->executionName, '', "title='{$task->executionName}'");?></td>
</tr>
<tr>
@@ -128,6 +128,10 @@
<th><?php echo $lang->testtask->status;?></th>
<td class='task-<?php echo $task->status?>'><?php echo $this->processStatus('testtask', $task);?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->testreport;?></th>
<td class="c-name" title="<?php echo $testreportTitle;?>"><?php echo empty($task->testreport) ? '' : html::a($this->createLink('testreport', 'view', "reportID=$task->testreport"), $testreportTitle);?></td>
</tr>
</table>
</div>
</div>