* finish task#806.
This commit is contained in:
+6
-3
@@ -1557,6 +1557,9 @@ INSERT INTO `zt_groupPriv` (`company`, `group`, `module`, `method`) VALUES
|
||||
(1, 2, 'task', 'batchEdit'),
|
||||
(1, 3, 'task', 'batchEdit'),
|
||||
(1, 4, 'task', 'batchEdit'),
|
||||
(1, 5, 'task', 'batchEdit');
|
||||
|
||||
|
||||
(1, 5, 'task', 'batchEdit'),
|
||||
(1, 1, 'bug', 'batchEdit'),
|
||||
(1, 2, 'bug', 'batchEdit'),
|
||||
(1, 3, 'bug', 'batchEdit'),
|
||||
(1, 4, 'bug', 'batchEdit'),
|
||||
(1, 5, 'bug', 'batchEdit');
|
||||
|
||||
@@ -457,6 +457,79 @@ class bug extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch edit bug.
|
||||
*
|
||||
* @param string $from example:bugBrowse, bugBatchEdit.
|
||||
* @param int $productID
|
||||
* @param string $orderBy
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function batchEdit($from = '', $productID = 0, $orderBy = '')
|
||||
{
|
||||
if($from == 'bugBrowse')
|
||||
{
|
||||
/* Initialize vars.*/
|
||||
if(!$orderBy) $orderBy = $this->cookie->qaBugOrder ? $this->cookie->qaBugOrder : 'id_desc';
|
||||
$editedBugs = array();
|
||||
$allBugs = $this->dao->select('*')->from(TABLE_BUG)->alias('t1')->where($this->session->bugReportCondition)->orderBy($orderBy)->fetchAll('id');
|
||||
$bugIDList = $this->post->bugIDList ? $this->post->bugIDList : array();
|
||||
$product = $this->product->getByID($productID);
|
||||
$columns = 9;
|
||||
$showSuhosinInfo = false;
|
||||
|
||||
/* Set product menu. */
|
||||
$this->bug->setMenu($this->products, $productID);
|
||||
|
||||
/* Initialize the tasks whose need to edited. */
|
||||
foreach($allBugs as $bug) if(in_array($bug->id, $bugIDList)) $editedBugs[$bug->id] = $bug;
|
||||
|
||||
/* Judge whether the editedTasks is too large. */
|
||||
$showSuhosinInfo = $this->loadModel('common')->judgeSuhosinSetting(count($editedBugs), $columns);
|
||||
|
||||
/* Set the sessions. */
|
||||
$this->app->session->set('showSuhosinInfo', $showSuhosinInfo);
|
||||
|
||||
/* Assign. */
|
||||
$this->view->header['title'] = $product->name . $this->lang->colon . $this->lang->bug->batchEdit;
|
||||
$this->view->position[] = $this->lang->bug->batchEdit;
|
||||
|
||||
if($showSuhosinInfo) $this->view->suhosinInfo = $this->lang->suhosinInfo;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->editedBugs = $editedBugs;
|
||||
$this->view->users = $this->user->getPairs('noletter');
|
||||
|
||||
$this->display();
|
||||
}
|
||||
elseif($from == 'bugBatchEdit')
|
||||
{
|
||||
$allChanges = $this->bug->batchUpdate();
|
||||
|
||||
foreach($allChanges as $bugID => $changes)
|
||||
{
|
||||
$actionID = $this->action->create('bug', $bugID, 'Edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
$this->sendmail($bugID, $actionID);
|
||||
|
||||
$bug = $this->bug->getById($bugID);
|
||||
if($bug->toTask != 0)
|
||||
{
|
||||
foreach($changes as $change)
|
||||
{
|
||||
if($change['field'] == 'status')
|
||||
{
|
||||
$confirmURL = $this->createLink('task', 'view', "taskID=$bug->toTask");
|
||||
$cancelURL = $this->server->HTTP_REFERER;
|
||||
die(js::confirm(sprintf($this->lang->bug->remindTask, $bug->task), $confirmURL, $cancelURL, 'parent', 'parent'));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
die(js::locate($this->session->bugList));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* confirm a bug.
|
||||
*
|
||||
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Set duplicate field.
|
||||
*
|
||||
* @param string $resolution
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function setDuplicate(resolution, bugID)
|
||||
{
|
||||
if(resolution == 'duplicate')
|
||||
{
|
||||
$('#duplicateBugBox' + bugID).show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#duplicateBugBox' + bugID).hide();
|
||||
}
|
||||
}
|
||||
@@ -69,6 +69,7 @@ $lang->bug->index = 'Index';
|
||||
$lang->bug->create = 'Create Bug';
|
||||
$lang->bug->confirmBug = 'Confirm Bug';
|
||||
$lang->bug->edit = 'Edit Bug';
|
||||
$lang->bug->batchEdit = 'Batch edit';
|
||||
$lang->bug->browse = 'Browse Bug';
|
||||
$lang->bug->view = 'Bug Info';
|
||||
$lang->bug->resolve = 'Resolve Bug';
|
||||
|
||||
@@ -54,7 +54,7 @@ $lang->bug->resolvedDate = '解决日期';
|
||||
$lang->bug->resolvedDateAB = '解决日期';
|
||||
$lang->bug->closedBy = '由谁关闭';
|
||||
$lang->bug->closedDate = '关闭日期';
|
||||
$lang->bug->duplicateBug = '重复Bug';
|
||||
$lang->bug->duplicateBug = '重复ID';
|
||||
$lang->bug->lastEditedBy = '最后修改者';
|
||||
$lang->bug->lastEditedDate = '最后修改日期';
|
||||
$lang->bug->linkBug = '相关Bug';
|
||||
@@ -69,6 +69,7 @@ $lang->bug->index = '首页';
|
||||
$lang->bug->create = '创建Bug';
|
||||
$lang->bug->confirmBug = '确认';
|
||||
$lang->bug->edit = '编辑Bug';
|
||||
$lang->bug->batchEdit = '批量编辑';
|
||||
$lang->bug->browse = 'Bug列表';
|
||||
$lang->bug->view = 'Bug详情';
|
||||
$lang->bug->resolve = '解决Bug';
|
||||
|
||||
@@ -193,6 +193,86 @@ class bugModel extends model
|
||||
if(!dao::isError()) return common::createChanges($oldBug, $bug);
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch update bug.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function batchUpdate()
|
||||
{
|
||||
$bugs = array();
|
||||
$allChanges = array();
|
||||
$now = helper::now();
|
||||
$bugIDList = $this->post->bugIDList ? $this->post->bugIDList : array();
|
||||
|
||||
/* Adjust whether the post data is complete, if not, remove the last element of $bugIDList. */
|
||||
if($this->session->showSuhosinInfo) array_pop($bugIDList);
|
||||
|
||||
if(!empty($bugIDList))
|
||||
{
|
||||
/* Initialize bugs from the post data.*/
|
||||
foreach($bugIDList as $bugID)
|
||||
{
|
||||
$oldBug = $this->getByID($bugID);
|
||||
|
||||
$bug->lastEditedBy = $this->app->user->account;
|
||||
$bug->lastEditedDate = $now;
|
||||
$bug->type = $this->post->types[$bugID];
|
||||
$bug->severity = $this->post->severities[$bugID];
|
||||
$bug->pri = $this->post->pris[$bugID];
|
||||
$bug->status = $this->post->statuses[$bugID];
|
||||
$bug->title = htmlspecialchars($this->post->titles[$bugID]);
|
||||
$bug->assignedTo = $this->post->assignedTos[$bugID];
|
||||
$bug->resolvedBy = $this->post->resolvedBys[$bugID];
|
||||
$bug->resolution = $this->post->resolutions[$bugID];
|
||||
$bug->duplicateBug = $this->post->duplicateBugs[$bugID] ? $this->post->duplicateBugs[$bugID] : $oldBug->duplicateBug;
|
||||
|
||||
if($bug->assignedTo != $oldBug->assignedTo) $bug->assignedDate = $now;
|
||||
if($bug->resolvedBy != '' or $bug->resolution != '') $bug->resolvedDate = $now;
|
||||
if($bug->resolution != '' and $bug->resolvedBy == '') $bug->resolvedBy = $this->app->user->account;
|
||||
if($bug->resolution != '')
|
||||
{
|
||||
$bug->status = 'resolved';
|
||||
$bug->confirmed = 1;
|
||||
}
|
||||
if($bug->resolution != '' and $bug->assignedTo == '')
|
||||
{
|
||||
$bug->assignedTo = $oldBug->openedBy;
|
||||
$bug->assignedDate = $now;
|
||||
}
|
||||
|
||||
$bugs[$bugID] = $bug;
|
||||
unset($bug);
|
||||
}
|
||||
|
||||
/* Update bugs. */
|
||||
foreach($bugs as $bugID => $bug)
|
||||
{
|
||||
$oldBug = $this->getByID($bugID);
|
||||
|
||||
$this->dao->update(TABLE_BUG)->data($bug)
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->bug->edit->requiredFields, 'notempty')
|
||||
->checkIF($bug->resolvedBy, 'resolution', 'notempty')
|
||||
->checkIF($bug->resolution == 'duplicate', 'duplicateBug', 'notempty')
|
||||
->where('id')->eq((int)$bugID)
|
||||
->exec();
|
||||
|
||||
if(!dao::isError())
|
||||
{
|
||||
$allChanges[$bugID] = common::createChanges($oldBug, $bug);
|
||||
}
|
||||
else
|
||||
{
|
||||
die(js::error('bug#' . $bugID . dao::getError(true)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $allChanges;
|
||||
}
|
||||
|
||||
/**
|
||||
* Confirm a bug.
|
||||
*
|
||||
|
||||
Executable
+50
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* The batch edit view of bug module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2012 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
|
||||
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
|
||||
* @author Congzhi Chen <congzhi@cnezsoft.com>
|
||||
* @package bug
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<form method='post' target='hiddenwin' action="<?php echo $this->inLink('batchEdit', "from=bugBatchEdit&productID=$productID");?>">
|
||||
<table class='table-1 fixed'>
|
||||
<caption><?php echo $lang->bug->common . $lang->colon . $lang->bug->batchEdit;?></caption>
|
||||
<tr>
|
||||
<th class='w-30px'><?php echo $lang->idAB;?></th>
|
||||
<th class='w-80px'><?php echo $lang->bug->type;?></th>
|
||||
<th class='w-50px'><?php echo $lang->bug->severityAB;?></th>
|
||||
<th class='w-50px'><?php echo $lang->bug->pri;?></th>
|
||||
<th class='w-70px'><?php echo $lang->bug->status;?></th>
|
||||
<th> <?php echo $lang->bug->title;?></th>
|
||||
<th class='w-80px'><?php echo $lang->bug->assignedTo;?></th>
|
||||
<th class='w-80px'><?php echo $lang->bug->resolvedByAB;?></th>
|
||||
<th class='w-150px'><?php echo $lang->bug->resolutionAB;?></th>
|
||||
</tr>
|
||||
<?php foreach($editedBugs as $bug):?>
|
||||
<tr class='a-center'>
|
||||
<td><?php echo $bug->id . html::hidden("bugIDList[$bug->id]", $bug->id);?></td>
|
||||
<td><?php echo html::select("types[$bug->id]", $lang->bug->typeList, $bug->type, 'class=select-1');?></td>
|
||||
<td><?php echo html::select("severities[$bug->id]", (array)$lang->bug->severityList, $bug->severity, 'class=select-1');?></td>
|
||||
<td><?php echo html::select("pris[$bug->id]", (array)$lang->bug->priList, $bug->pri, 'class=select-1');?></td>
|
||||
<td><?php echo html::select("statuses[$bug->id]", (array)$lang->bug->statusList, $bug->status, 'class=select-1');?></td>
|
||||
<td><?php echo html::input("titles[$bug->id]", $bug->title, 'class=text-1'); echo "<span class='star'>*</span>";?></td>
|
||||
<td><?php echo html::select("assignedTos[$bug->id]", $users, $bug->assignedTo, 'class=select-1');?></td>
|
||||
<td><?php echo html::select("resolvedBys[$bug->id]", $users, $bug->resolvedBy, 'class=select-1');?></td>
|
||||
<td>
|
||||
<div class='f-left'><?php echo html::select("resolutions[$bug->id]", $this->lang->bug->resolutionList, $bug->resolution, "class=w-80px onchange=setDuplicate(this.value,$bug->id)");?></div>
|
||||
<div class='f-left' id='<?php echo 'duplicateBugBox' . $bug->id;?>' <?php if($bug->resolution != 'duplicate') echo "style='display:none'";?>><?php echo html::input("duplicateBugs[$bug->id]", '', "class=w-40px placeholder='{$lang->bug->duplicateBug}'");?></div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<?php if(isset($suhosinInfo)):?>
|
||||
<tr><td colspan='9'><div class='f-left blue'><?php echo $suhosinInfo;?></div></td></tr>
|
||||
<?php endif;?>
|
||||
<tr><td colspan='9' class='a-center'><?php echo html::submitButton();?></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
+123
-116
@@ -47,129 +47,136 @@ var customed = <?php echo (int)$customed;?>;
|
||||
|
||||
<?php if($customed){include 'browse.custom.html.php'; exit;}?>
|
||||
|
||||
<table class='cont-lt1'>
|
||||
<tr valign='top'>
|
||||
<td class='side <?php echo $treeClass;?>' id='treebox'>
|
||||
<div class='box-title'><?php echo $productName;?></div>
|
||||
<div class='box-content'>
|
||||
<?php echo $moduleTree;?>
|
||||
<div class='a-right'>
|
||||
<?php if(common::hasPriv('tree', 'browse')) echo html::a($this->createLink('tree', 'browse', "productID=$productID&view=bug"), $lang->tree->manage);?>
|
||||
<form method='post' action='<?php echo $this->inLink('batchEdit', "from=bugBrowse&productID=$productID&orderBy=$orderBy");?>'>
|
||||
<table class='cont-lt1'>
|
||||
<tr valign='top'>
|
||||
<td class='side <?php echo $treeClass;?>' id='treebox'>
|
||||
<div class='box-title'><?php echo $productName;?></div>
|
||||
<div class='box-content'>
|
||||
<?php echo $moduleTree;?>
|
||||
<div class='a-right'>
|
||||
<?php if(common::hasPriv('tree', 'browse')) echo html::a($this->createLink('tree', 'browse', "productID=$productID&view=bug"), $lang->tree->manage);?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class='divider <?php echo $treeClass;?>'></td>
|
||||
<td>
|
||||
<?php $vars = "productID=$productID&browseType=$browseType¶m=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
|
||||
<table class='table-1 fixed colored tablesorter datatable'>
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th class='w-severity'> <?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severityAB);?></th>
|
||||
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
</td>
|
||||
<td class='divider <?php echo $treeClass;?>'></td>
|
||||
<td>
|
||||
<?php $vars = "productID=$productID&browseType=$browseType¶m=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
|
||||
<table class='table-1 fixed colored tablesorter datatable'>
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th class='w-severity'> <?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severityAB);?></th>
|
||||
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
|
||||
<th><?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
|
||||
<th><?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
|
||||
|
||||
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
|
||||
<th class='w-80px'><?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->statusAB);?></th>
|
||||
<?php endif;?>
|
||||
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
|
||||
<th class='w-80px'><?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->statusAB);?></th>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if($browseType == 'needconfirm'):?>
|
||||
<th class='w-p40'><?php common::printOrderLink('story', $orderBy, $vars, $lang->bug->story);?></th>
|
||||
<th class='w-50px'><?php echo $lang->actions;?></th>
|
||||
<?php else:?>
|
||||
<th class='w-user'><?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
<?php if($browseType == 'needconfirm'):?>
|
||||
<th class='w-p40'><?php common::printOrderLink('story', $orderBy, $vars, $lang->bug->story);?></th>
|
||||
<th class='w-50px'><?php echo $lang->actions;?></th>
|
||||
<?php else:?>
|
||||
<th class='w-user'><?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
|
||||
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
|
||||
<th class='w-date'> <?php common::printOrderLink('openedDate', $orderBy, $vars, $lang->bug->openedDateAB);?></th>
|
||||
<?php endif;?>
|
||||
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
|
||||
<th class='w-date'> <?php common::printOrderLink('openedDate', $orderBy, $vars, $lang->bug->openedDateAB);?></th>
|
||||
<?php endif;?>
|
||||
|
||||
<th class='w-user'><?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->assignedToAB);?></th>
|
||||
<th class='w-user'><?php common::printOrderLink('resolvedBy', $orderBy, $vars, $lang->bug->resolvedByAB);?></th>
|
||||
<th class='w-resolution'><?php common::printOrderLink('resolution', $orderBy, $vars, $lang->bug->resolutionAB);?></th>
|
||||
<th class='w-user'><?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->assignedToAB);?></th>
|
||||
<th class='w-user'><?php common::printOrderLink('resolvedBy', $orderBy, $vars, $lang->bug->resolvedByAB);?></th>
|
||||
<th class='w-resolution'><?php common::printOrderLink('resolution', $orderBy, $vars, $lang->bug->resolutionAB);?></th>
|
||||
|
||||
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
|
||||
<th class='w-date'> <?php common::printOrderLink('resolvedDate', $orderBy, $vars, $lang->bug->resolvedDateAB);?></th>
|
||||
<?php endif;?>
|
||||
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
|
||||
<th class='w-date'> <?php common::printOrderLink('resolvedDate', $orderBy, $vars, $lang->bug->resolvedDateAB);?></th>
|
||||
<?php endif;?>
|
||||
|
||||
<th class='w-140px {sorter:false}'><?php echo $lang->actions;?></th>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($bugs as $bug):?>
|
||||
<?php $bugLink = inlink('view', "bugID=$bug->id");?>
|
||||
<tr class='a-center'>
|
||||
<?php $class = $bug->status == 'active' ? 'active' . $bug->severity : $bug->status;?>
|
||||
<td class='linkbox <?php echo $class;?>'><?php echo html::a($bugLink, sprintf('%03d', $bug->id));?></td>
|
||||
<td><?php echo $lang->bug->severityList[$bug->severity]?></td>
|
||||
<td><?php echo $lang->bug->priList[$bug->pri]?></td>
|
||||
|
||||
<?php $class = 'confirm' . $bug->confirmed;?>
|
||||
<td class='a-left nobr'><?php echo "<span class='$class'>[{$lang->bug->confirmedList[$bug->confirmed]}] </span>" . html::a($bugLink, $bug->title);?></td>
|
||||
|
||||
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
|
||||
<td><?php echo $lang->bug->statusList[$bug->status];?></td>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if($browseType == 'needconfirm'):?>
|
||||
<td class='a-left nobr'><?php echo html::a($this->createLink('story', 'view', "stoyID=$bug->story"), $bug->storyTitle, '_blank');?></td>
|
||||
<td><?php echo html::a(inlink('confirmStoryChange', "bugID=$bug->id"), $lang->confirm, 'hiddenwin')?></td>
|
||||
<?php else:?>
|
||||
<td><?php echo $users[$bug->openedBy];?></td>
|
||||
|
||||
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
|
||||
<td><?php echo substr($bug->openedDate, 5, 11)?></td>
|
||||
<?php endif;?>
|
||||
|
||||
<td <?php if($bug->assignedTo == $this->app->user->account) echo 'class="red"';?>><?php echo $users[$bug->assignedTo];?></td>
|
||||
<td><?php echo $users[$bug->resolvedBy];?></td>
|
||||
<td><?php echo $lang->bug->resolutionList[$bug->resolution];?></td>
|
||||
|
||||
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
|
||||
<td><?php echo substr($bug->resolvedDate, 5, 11)?></td>
|
||||
<?php endif;?>
|
||||
|
||||
<td>
|
||||
<?php
|
||||
$params = "bugID=$bug->id";
|
||||
if(!($bug->status == 'active' and common::printLink('bug', 'resolve', $params, $lang->bug->buttonResolve))) echo $lang->bug->buttonResolve . ' ';
|
||||
if(!($bug->status == 'resolved' and common::printLink('bug', 'close', $params, $lang->bug->buttonClose))) echo $lang->bug->buttonClose . ' ';
|
||||
common::printLink('bug', 'edit', $params, $lang->bug->buttonEdit);
|
||||
if($this->cookie->windowWidth >= $this->config->wideSize) common::printLink('bug', 'create', "product=$bug->product&extra=bugID=$bug->id", $lang->bug->buttonCopy);
|
||||
?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<?php $columns = $this->cookie->windowWidth >= $this->config->wideSize ? 12 : 9;?>
|
||||
<td colspan='<?php echo $columns;?>'>
|
||||
<div class='f-left'>
|
||||
<?php
|
||||
foreach($lang->bug->statusList as $status => $label)
|
||||
{
|
||||
if($status != 'active')
|
||||
{
|
||||
echo "<span class='$status'> $label </span> ";
|
||||
continue;
|
||||
}
|
||||
rsort($this->lang->bug->severityList);
|
||||
foreach($this->lang->bug->severityList as $severity)
|
||||
{
|
||||
echo "<span class='$status$severity'> {$lang->bug->severity}:$severity </span> ";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class='f-right'><?php $pager->show();?></div>
|
||||
</td>
|
||||
<th class='w-140px {sorter:false}'><?php echo $lang->actions;?></th>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($bugs as $bug):?>
|
||||
<?php $bugLink = inlink('view', "bugID=$bug->id");?>
|
||||
<tr class='a-center'>
|
||||
<?php $class = $bug->status == 'active' ? 'active' . $bug->severity : $bug->status;?>
|
||||
<td class='<?php echo $class;?>'>
|
||||
<input type='checkbox' name='bugIDList[]' value='<?php echo $bug->id;?>'/>
|
||||
<?php echo html::a($bugLink, sprintf('%03d', $bug->id));?>
|
||||
</td>
|
||||
<td><?php echo $lang->bug->severityList[$bug->severity]?></td>
|
||||
<td><?php echo $lang->bug->priList[$bug->pri]?></td>
|
||||
|
||||
<?php $class = 'confirm' . $bug->confirmed;?>
|
||||
<td class='a-left nobr'><?php echo "<span class='$class'>[{$lang->bug->confirmedList[$bug->confirmed]}] </span>" . html::a($bugLink, $bug->title);?></td>
|
||||
|
||||
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
|
||||
<td><?php echo $lang->bug->statusList[$bug->status];?></td>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if($browseType == 'needconfirm'):?>
|
||||
<td class='a-left nobr'><?php echo html::a($this->createLink('story', 'view', "stoyID=$bug->story"), $bug->storyTitle, '_blank');?></td>
|
||||
<td><?php echo html::a(inlink('confirmStoryChange', "bugID=$bug->id"), $lang->confirm, 'hiddenwin')?></td>
|
||||
<?php else:?>
|
||||
<td><?php echo $users[$bug->openedBy];?></td>
|
||||
|
||||
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
|
||||
<td><?php echo substr($bug->openedDate, 5, 11)?></td>
|
||||
<?php endif;?>
|
||||
|
||||
<td <?php if($bug->assignedTo == $this->app->user->account) echo 'class="red"';?>><?php echo $users[$bug->assignedTo];?></td>
|
||||
<td><?php echo $users[$bug->resolvedBy];?></td>
|
||||
<td><?php echo $lang->bug->resolutionList[$bug->resolution];?></td>
|
||||
|
||||
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
|
||||
<td><?php echo substr($bug->resolvedDate, 5, 11)?></td>
|
||||
<?php endif;?>
|
||||
|
||||
<td>
|
||||
<?php
|
||||
$params = "bugID=$bug->id";
|
||||
if(!($bug->status == 'active' and common::printLink('bug', 'resolve', $params, $lang->bug->buttonResolve))) echo $lang->bug->buttonResolve . ' ';
|
||||
if(!($bug->status == 'resolved' and common::printLink('bug', 'close', $params, $lang->bug->buttonClose))) echo $lang->bug->buttonClose . ' ';
|
||||
common::printLink('bug', 'edit', $params, $lang->bug->buttonEdit);
|
||||
if($this->cookie->windowWidth >= $this->config->wideSize) common::printLink('bug', 'create', "product=$bug->product&extra=bugID=$bug->id", $lang->bug->buttonCopy);
|
||||
?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<?php $columns = $this->cookie->windowWidth >= $this->config->wideSize ? 12 : 9;?>
|
||||
<td colspan='<?php echo $columns;?>'>
|
||||
<div class='f-left'>
|
||||
<?php
|
||||
echo html::selectAll() . html::selectReverse();
|
||||
if(common::hasPriv('bug', 'batchEdit')) echo html::submitButton($lang->bug->batchEdit);
|
||||
foreach($lang->bug->statusList as $status => $label)
|
||||
{
|
||||
if($status != 'active')
|
||||
{
|
||||
echo "<span class='$status'> $label </span> ";
|
||||
continue;
|
||||
}
|
||||
rsort($this->lang->bug->severityList);
|
||||
foreach($this->lang->bug->severityList as $severity)
|
||||
{
|
||||
echo "<span class='$status$severity'> {$lang->bug->severity}:$severity </span> ";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class='f-right'><?php $pager->show();?></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -179,7 +179,7 @@ $lang->build->menu = $lang->project->menu;
|
||||
|
||||
/* QA视图菜单设置。*/
|
||||
$lang->bug->menu->product = '%s';
|
||||
$lang->bug->menu->bug = array('link' => '缺陷管理|bug|browse|productID=%s', 'alias' => 'view,create,edit,resolve,close,activate,report', 'subModule' => 'tree');
|
||||
$lang->bug->menu->bug = array('link' => '缺陷管理|bug|browse|productID=%s', 'alias' => 'view,create,edit,resolve,close,activate,report,batchedit', 'subModule' => 'tree');
|
||||
$lang->bug->menu->testcase = array('link' => '用例管理|testcase|browse|productID=%s', 'alias' => 'view,create,edit');
|
||||
$lang->bug->menu->testtask = array('link' => '测试任务|testtask|browse|productID=%s');
|
||||
|
||||
|
||||
@@ -154,6 +154,7 @@ $lang->resource->bug->create = 'create';
|
||||
$lang->resource->bug->confirmBug = 'confirmBug';
|
||||
$lang->resource->bug->view = 'view';
|
||||
$lang->resource->bug->edit = 'edit';
|
||||
$lang->resource->bug->batchEdit = 'batchEdit';
|
||||
$lang->resource->bug->resolve = 'resolve';
|
||||
$lang->resource->bug->activate = 'activate';
|
||||
$lang->resource->bug->close = 'close';
|
||||
@@ -373,3 +374,4 @@ $lang->changelog['3.1'][] = 'todo-batchCreate';
|
||||
$lang->changelog['3.2'][] = 'my-changePassword';
|
||||
$lang->changelog['3.2'][] = 'todo-batchEdit';
|
||||
$lang->changelog['3.2'][] = 'task-batchEdit';
|
||||
$lang->changelog['3.2'][] = 'bug-batchEdit';
|
||||
|
||||
Reference in New Issue
Block a user