* finish task #7306.

This commit is contained in:
z
2020-07-06 14:48:57 +08:00
parent 6a7945f959
commit 984d130d00
3 changed files with 21 additions and 21 deletions
+3 -3
View File
@@ -250,9 +250,9 @@ class build extends control
$this->view->stories = $stories;
$this->view->storyPager = $storyPager;
$newBugPager = new pager($type == 'newbug' ? $recTotal : 0, $recPerPage, $type == 'newbug' ? $pageID : 1);
$this->view->generatedBugs = $this->bug->getProjectBugs($build->project, $build->id, '', 0, $type == 'newbug' ? $orderBy : 'status_desc,id_desc', '', $newBugPager);
$this->view->newBugPager = $newBugPager;
$generatedBugPager = new pager($type == 'generatedBug' ? $recTotal : 0, $recPerPage, $type == 'generatedBug' ? $pageID : 1);
$this->view->generatedBugs = $this->bug->getProjectBugs($build->project, $build->id, '', 0, $type == 'generatedBug' ? $orderBy : 'status_desc,id_desc', '', $generatedBugPager);
$this->view->generatedBugPager = $generatedBugPager;
}
$this->executeHooks($buildID);
+11 -11
View File
@@ -82,12 +82,12 @@ tbody tr td:first-child input{display:none;}
</div>
<?php else:?>
<div class='tabs' id='tabsNav'>
<?php $countStories = count($stories); $countBugs = count($bugs); $countNewBugs = count($generatedBugs);?>
<?php $countStories = count($stories); $countBugs = count($bugs); $countGeneratedBugs = count($generatedBugs);?>
<ul class='nav nav-tabs'>
<li <?php if($type == 'story') echo "class='active'"?>><a href='#stories' data-toggle='tab'><?php echo html::icon($lang->icons['story'], 'text-primary') . ' ' . $lang->build->stories;?></a></li>
<li <?php if($type == 'bug') echo "class='active'"?>><a href='#bugs' data-toggle='tab'><?php echo html::icon($lang->icons['bug'], 'text-green') . ' ' . $lang->build->bugs;?></a></li>
<li <?php if($type == 'newbug') echo "class='active'"?>><a href='#newBugs' data-toggle='tab'><?php echo html::icon($lang->icons['bug'], 'text-red') . ' ' . $lang->build->generatedBugs;?></a></li>
<li <?php if($type == 'buildInfo') echo "class='active'"?>><a href='#buildInfo' data-toggle='tab'><?php echo html::icon($lang->icons['plan'], 'text-info') . ' ' . $lang->build->view;?></a></li>
<li <?php if($type == 'story') echo "class='active'"?>><a href='#stories' data-toggle='tab'><?php echo html::icon($lang->icons['story'], 'text-primary') . ' ' . $lang->build->stories;?></a></li>
<li <?php if($type == 'bug') echo "class='active'"?>><a href='#bugs' data-toggle='tab'><?php echo html::icon($lang->icons['bug'], 'text-green') . ' ' . $lang->build->bugs;?></a></li>
<li <?php if($type == 'generatedBug') echo "class='active'"?>><a href='#generatedBugs' data-toggle='tab'><?php echo html::icon($lang->icons['bug'], 'text-red') . ' ' . $lang->build->generatedBugs;?></a></li>
<li <?php if($type == 'buildInfo') echo "class='active'"?>><a href='#buildInfo' data-toggle='tab'><?php echo html::icon($lang->icons['plan'], 'text-info') . ' ' . $lang->build->view;?></a></li>
</ul>
<div class='tab-content'>
<div class='tab-pane <?php if($type == 'story') echo 'active'?>' id='stories'>
@@ -254,10 +254,10 @@ tbody tr td:first-child input{display:none;}
</div>
</form>
</div>
<div class='tab-pane <?php if($type == 'newbug') echo 'active'?>' id='newBugs'>
<div class='tab-pane <?php if($type == 'generatedBug') echo 'active'?>' id='generatedBugs'>
<div class='main-table' data-ride='table'>
<table class='table has-sort-head'>
<?php $vars = "buildID={$build->id}&type=newbug&link=$link&param=$param&orderBy=%s";?>
<?php $vars = "buildID={$build->id}&type=generatedBug&link=$link&param=$param&orderBy=%s";?>
<thead>
<tr class='text-center'>
<th class='c-id text-left'><?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
@@ -308,12 +308,12 @@ tbody tr td:first-child input{display:none;}
</tbody>
</table>
<div class='table-footer'>
<?php if($countNewBugs):?>
<div class='text'><?php echo sprintf($lang->build->createdBugs, $countNewBugs);?></div>
<?php if($countGeneratedBugs):?>
<div class='text'><?php echo sprintf($lang->build->createdBugs, $countGeneratedBugs);?></div>
<?php endif;?>
<?php
$this->app->rawParams['type'] = 'newbug';
$newBugPager->show('right', 'pagerjs');
$this->app->rawParams['type'] = 'generatedBug';
$generatedBugPager->show('right', 'pagerjs');
$this->app->rawParams['type'] = $type;
?>
</div>
+7 -7
View File
@@ -202,14 +202,14 @@ class testreportModel extends model
*/
public function getBugInfo($tasks, $productIdList, $begin, $end, $builds)
{
$allNewBugs = $this->dao->select('*')->from(TABLE_BUG)->where('product')->in($productIdList)->andWhere('openedDate')->ge($begin)->andWhere('openedDate')->le("$end 23:59:59")->andWhere('deleted')->eq(0)->fetchAll();
$foundBugs = array();
$legacyBugs = array();
$byCaseNum = 0;
$buildIdList = array_keys($builds);
$taskIdList = array_keys($tasks);
$generatedBugs = $this->dao->select('*')->from(TABLE_BUG)->where('product')->in($productIdList)->andWhere('openedDate')->ge($begin)->andWhere('openedDate')->le("$end 23:59:59")->andWhere('deleted')->eq(0)->fetchAll();
$foundBugs = array();
$legacyBugs = array();
$byCaseNum = 0;
$buildIdList = array_keys($builds);
$taskIdList = array_keys($tasks);
foreach($allNewBugs as $bug)
foreach($generatedBugs as $bug)
{
if(!array_diff(explode(',', $bug->openedBuild), $buildIdList))
{