This commit is contained in:
sunguangming
2022-10-08 13:25:30 +08:00
parent 783e03d722
commit 7b2af7a523
3 changed files with 4 additions and 27 deletions
+4 -15
View File
@@ -1394,13 +1394,7 @@ class testcase extends control
if($this->app->tab == 'project') $objectID = $case->project;
if($this->app->tab == 'execution') $objectID = $case->execution;
/* Unset search field in single project. */
if($case->project and ($this->app->tab == 'project' or $this->app->tab == 'execution'))
{
$project = $this->loadModel('project')->getById($case->project);
if(!$project->hasProduct) unset($this->config->bug->search['fields']['product']);
}
unset($this->config->testcase->search['fields']['product']);
$this->testcase->buildSearchForm($case->product, $this->products, $queryID, $actionURL, $objectID);
/* Get cases to link. */
@@ -1418,7 +1412,6 @@ class testcase extends control
$this->view->position[] = html::a($this->createLink('testcase', 'view', "caseID=$caseID"), $case->title);
$this->view->position[] = $this->lang->testcase->linkCases;
$this->view->case = $case;
$this->view->product = $this->loadModel('product')->getByID($case->product);
$this->view->cases2Link = empty($cases2Link) ? $cases2Link : $cases2Link[$pageID - 1];
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->pager = $pager;
@@ -1452,15 +1445,12 @@ class testcase extends control
if($this->app->tab == 'project') $objectID = $case->project;
if($this->app->tab == 'execution') $objectID = $case->execution;
/* Unset search field in single project. */
/* Unset search field 'plan' in single project. */
unset($this->config->bug->search['fields']['product']);
if($case->project and ($this->app->tab == 'project' or $this->app->tab == 'execution'))
{
$project = $this->loadModel('project')->getById($case->project);
if(!$project->hasProduct)
{
unset($this->config->bug->search['fields']['product']);
if($project->model == 'waterfall') unset($this->config->bug->search['fields']['plan']);
}
if(!$project->hasProduct and $project->model == 'waterfall') unset($this->config->bug->search['fields']['plan']);
}
$this->bug->buildSearchForm($case->product, $this->products, $queryID, $actionURL, $objectID);
@@ -1477,7 +1467,6 @@ class testcase extends control
/* Assign. */
$this->view->position[] = $this->lang->testcase->linkBugs;
$this->view->case = $case;
$this->view->product = $this->loadModel('product')->getByID($case->product);
$this->view->bugs2Link = empty($bugs2Link) ? $bugs2Link : $bugs2Link[$pageID - 1];
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->pager = $pager;
-6
View File
@@ -33,9 +33,6 @@
<?php echo $lang->idAB;?>
</th>
<th class='c-pri' title=<?php echo $lang->pri;?>><?php echo $lang->priAB;?></th>
<?php if(!$product->shadow):?>
<th><?php echo $lang->bug->product;?></th>
<?php endif;?>
<th><?php echo $lang->bug->title;?></th>
<th class='c-type'><?php echo $lang->bug->type;?></th>
<th class='c-user'><?php echo $lang->openedByAB;?></th>
@@ -54,9 +51,6 @@
<?php printf('%03d', $bug2Link->id);?>
</td>
<td><span class='<?php echo 'pri' . zget($lang->bug->priList, $bug2Link->pri, $bug2Link->pri)?>'><?php echo zget($lang->bug->priList, $bug2Link->pri, $bug2Link->pri)?></span></td>
<?php if(!$product->shadow):?>
<td class='c-name'><?php echo html::a($this->createLink('product', 'browse', "productID={$bug2Link->product}&branch={$bug2Link->branch}"), $products[$bug2Link->product], '_blank');?></td>
<?php endif;?>
<td class='c-name' title='<?php echo $bug2Link->title;?>'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug2Link->id"), $bug2Link->title, '_blank');?></td>
<td><?php echo zget($lang->bug->typeList, $bug2Link->type);?></td>
<td><?php echo zget($users, $bug2Link->openedBy);?></td>
-6
View File
@@ -33,9 +33,6 @@
<?php echo $lang->idAB;?>
</th>
<th class='c-pri' title=<?php echo $lang->pri;?>><?php echo $lang->priAB;?></th>
<?php if(!$product->shadow):?>
<th><?php echo $lang->testcase->product;?></th>
<?php endif;?>
<th><?php echo $lang->testcase->title;?></th>
<th class='c-type'><?php echo $lang->testcase->type;?></th>
<th class='c-user'><?php echo $lang->openedByAB;?></th>
@@ -54,9 +51,6 @@
<?php printf('%03d', $case2Link->id);?>
</td>
<td><span class='<?php echo 'pri' . zget($lang->testcase->priList, $case2Link->pri, $case2Link->pri)?>'><?php echo zget($lang->testcase->priList, $case2Link->pri, $case2Link->pri)?></span></td>
<?php if(!$product->shadow):?>
<td class='c-name'><?php echo html::a($this->createLink('product', 'browse', "productID={$case2Link->product}&branch={$case2Link->branch}"), $products[$case2Link->product], '_blank');?></td>
<?php endif;?>
<td class='c-name' title='<?php echo $case2Link->title;?>'><?php echo html::a($this->createLink('testcase', 'view', "caseID=$case2Link->id"), $case2Link->title, '_blank');?></td>
<td><?php echo $lang->testcase->typeList[$case2Link->type];?></td>
<td><?php echo zget($users, $case2Link->openedBy);?></td>