* fix Bug #2664
This commit is contained in:
@@ -930,7 +930,6 @@ class testtask extends control
|
||||
|
||||
$caseIDList = $this->post->caseIDList ? $this->post->caseIDList : die(js::locate($url, 'parent'));
|
||||
$caseIDList = array_unique($caseIDList);
|
||||
|
||||
/* The case of tasks of qa. */
|
||||
if($productID)
|
||||
{
|
||||
@@ -952,6 +951,7 @@ class testtask extends control
|
||||
->leftJoin(TABLE_CASE)->alias('t2')->on('t1.case=t2.id')
|
||||
->where('t2.id')->in($caseIDList)
|
||||
->andWhere('t1.version=t2.version')
|
||||
->andWhere('t2.status')->ne('wait')
|
||||
->fetchGroup('case', 'id');
|
||||
|
||||
$this->view->caseIDList = $caseIDList;
|
||||
|
||||
@@ -992,6 +992,7 @@ class testtaskModel extends model
|
||||
->leftJoin(TABLE_CASE)->alias('t2')->on('t1.case = t2.id')
|
||||
->where('t1.case')->in($caseIdList)
|
||||
->andWhere('t1.version=t2.version')
|
||||
->andWhere('t2.status')->ne('wait')
|
||||
->fetchGroup('case', 'id');
|
||||
|
||||
$now = helper::now();
|
||||
@@ -1157,7 +1158,7 @@ class testtaskModel extends model
|
||||
if($action == 'block') return ($testtask->status == 'doing' || $testtask->status == 'wait');
|
||||
if($action == 'activate') return ($testtask->status == 'blocked' || $testtask->status == 'done');
|
||||
if($action == 'close') return $testtask->status != 'done';
|
||||
|
||||
if($action == 'runcase') return $testtask->status != 'wait';
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1390,4 +1391,5 @@ class testtaskModel extends model
|
||||
}
|
||||
return array($toList, $ccList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<?php foreach($caseIDList as $caseID):?>
|
||||
<?php if($cases[$caseID]->status == 'wait') continue;?>
|
||||
<?php if(!$productID) $moduleOptionMenu = $this->loadModel('tree')->getOptionMenu($cases[$caseID]->product, $viewType = 'case', $startModuleID = 0);?>
|
||||
<tr class='text-center'>
|
||||
<td><?php echo $caseID . html::hidden("version[$caseID]", $cases[$caseID]->version)?></td>
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
<td colspan='5' class='form-actions'>
|
||||
<?php
|
||||
if($preCase) echo html::a(inlink('runCase', "runID={$preCase['runID']}&caseID={$preCase['caseID']}&version={$preCase['version']}"), $lang->testtask->pre, '', "id='pre' class='btn btn-wide'");
|
||||
echo html::submitButton();
|
||||
if($run->case->status != 'wait') echo html::submitButton();
|
||||
if($nextCase) echo ' ' . html::a(inlink('runCase', "runID={$nextCase['runID']}&caseID={$nextCase['caseID']}&version={$nextCase['version']}"), $lang->testtask->next, '', "id='next' class='btn btn-wide'");
|
||||
echo html::hidden('case', $run->case->id);
|
||||
echo html::hidden('version', $run->case->currentVersion);
|
||||
|
||||
Reference in New Issue
Block a user