* Finish task#37284.
This commit is contained in:
@@ -836,6 +836,7 @@ class execution extends control
|
||||
* Browse bugs of a execution.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param int $productID
|
||||
* @param string $orderBy
|
||||
* @param int $build
|
||||
* @param string $type
|
||||
@@ -846,11 +847,12 @@ class execution extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function bug($executionID = 0, $orderBy = 'status,id_desc', $build = 0, $type = 'all', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
public function bug($executionID = 0, $productID = 0, $orderBy = 'status,id_desc', $build = 0, $type = 'all', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
/* Load these two models. */
|
||||
$this->loadModel('bug');
|
||||
$this->loadModel('user');
|
||||
$this->loadModel('product');
|
||||
|
||||
/* Save session. */
|
||||
$this->session->set('bugList', $this->app->getURI(true), 'execution');
|
||||
@@ -860,9 +862,12 @@ class execution extends control
|
||||
$execution = $this->commonAction($executionID);
|
||||
$executionID = $execution->id;
|
||||
$products = $this->execution->getProducts($execution->id);
|
||||
$productID = key($products); // Get the first product for creating bug.
|
||||
$branchID = isset($products[$productID]) ? $products[$productID]->branch : 0;
|
||||
|
||||
$productPairs = array('0' => $this->lang->product->all);
|
||||
foreach($products as $product) $productPairs[$product->id] = $product->name;
|
||||
$this->lang->modulePageNav = $this->product->select($productPairs, $productID, 'execution', 'bug', '', $branchID);
|
||||
|
||||
/* Header and position. */
|
||||
$title = $execution->name . $this->lang->colon . $this->lang->execution->bug;
|
||||
$position[] = html::a($this->createLink('execution', 'browse', "executionID=$executionID"), $execution->name);
|
||||
@@ -872,7 +877,7 @@ class execution extends control
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
$sort = $this->loadModel('common')->appendOrder($orderBy);
|
||||
$bugs = $this->bug->getExecutionBugs($executionID, $build, $type, $param, $sort, '', $pager);
|
||||
$bugs = $this->bug->getExecutionBugs($executionID, $productID, $build, $type, $param, $sort, '', $pager);
|
||||
$users = $this->user->getPairs('noletter');
|
||||
|
||||
/* team member pairs. */
|
||||
@@ -884,7 +889,7 @@ class execution extends control
|
||||
}
|
||||
|
||||
/* Build the search form. */
|
||||
$actionURL = $this->createLink('execution', 'bug', "executionID=$executionID&orderBy=$orderBy&build=$build&type=bysearch&queryID=myQueryID");
|
||||
$actionURL = $this->createLink('execution', 'bug', "executionID=$executionID&productID=$productID&orderBy=$orderBy&build=$build&type=bysearch&queryID=myQueryID");
|
||||
$this->execution->buildBugSearchForm($products, $queryID, $actionURL);
|
||||
|
||||
/* Assign. */
|
||||
|
||||
@@ -11,12 +11,16 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<style>
|
||||
#subHeader #dropMenu .col-left .list-group {margin-bottom: 0px; padding-top: 10px;}
|
||||
#subHeader #dropMenu .col-left {padding-bottom: 0px;}
|
||||
</style>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php
|
||||
$buildName = $build ? " <span class='label label-danger'>Build:{$build->name}</span>" : '';
|
||||
echo html::a($this->inlink('bug', "executionID={$execution->id}&orderBy=status,id_desc&build=$buildID&type=all"), "<span class='text'>{$lang->bug->allBugs}</span>" . ($type == 'all' ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>$buildName" : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'");
|
||||
echo html::a($this->inlink('bug', "executionID={$execution->id}&orderBy=status,id_desc&build=$buildID&type=unresolved"), "<span class='text'>{$lang->bug->unResolved}</span>" . ($type == 'unresolved' ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>$buildName" : ''), '', "id='unresolvedTab' class='btn btn-link" . ('unresolved' == $type ? ' btn-active-text' : '') . "'");
|
||||
echo html::a($this->inlink('bug', "executionID={$execution->id}&productID={$productID}&orderBy=status,id_desc&build=$buildID&type=all"), "<span class='text'>{$lang->bug->allBugs}</span>" . ($type == 'all' ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>$buildName" : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'");
|
||||
echo html::a($this->inlink('bug', "executionID={$execution->id}&productID={$productID}&orderBy=status,id_desc&build=$buildID&type=unresolved"), "<span class='text'>{$lang->bug->unResolved}</span>" . ($type == 'unresolved' ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>$buildName" : ''), '', "id='unresolvedTab' class='btn btn-link" . ('unresolved' == $type ? ' btn-active-text' : '') . "'");
|
||||
?>
|
||||
<a class="btn btn-link querybox-toggle" id="bysearchTab"><i class="icon icon-search muted"></i> <?php echo $lang->bug->search;?></a>
|
||||
</div>
|
||||
@@ -40,7 +44,7 @@
|
||||
<form class='main-table' method='post' id='executionBugForm' data-ride="table">
|
||||
<table class='table has-sort-head' id='bugList'>
|
||||
<?php $canBatchAssignTo = common::hasPriv('bug', 'batchAssignTo');?>
|
||||
<?php $vars = "executionID={$execution->id}&orderBy=%s&build=$buildID&type=$type¶m=$param&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
|
||||
<?php $vars = "executionID={$execution->id}&productID={$productID}&orderBy=%s&build=$buildID&type=$type¶m=$param&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='c-id'>
|
||||
|
||||
Reference in New Issue
Block a user