This commit is contained in:
liugang
2017-10-25 12:01:12 +08:00
22 changed files with 164 additions and 54 deletions
+3 -2
View File
@@ -76,12 +76,13 @@ ALTER TABLE `zt_user` ADD `score_level` DECIMAL(12,1) NOT NULL DEFAULT '0' AF
CREATE TABLE `zt_score` (
`id` bigint(12) unsigned NOT NULL AUTO_INCREMENT,
`userID` int(11) NOT NULL DEFAULT '0',
`account` varchar(30) NOT NULL,
`model` varchar(30) NOT NULL,
`method` varchar(30) NOT NULL,
`desc` varchar(250) NOT NULL DEFAULT '',
`before` decimal(12,1) NOT NULL DEFAULT '0.0',
`score` decimal(12,1) NOT NULL DEFAULT '0.0',
`type` enum('repeat','one') NOT NULL DEFAULT 'repeat',
`after` decimal(12,1) NOT NULL DEFAULT '0.0',
`time` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `account` (`account`),
-5
View File
@@ -247,11 +247,6 @@ $config->bug->datatable->fieldList['browser']['fixed'] = 'no';
$config->bug->datatable->fieldList['browser']['width'] = '80';
$config->bug->datatable->fieldList['browser']['required'] = 'no';
$config->bug->datatable->fieldList['found']['title'] = 'found';
$config->bug->datatable->fieldList['found']['fixed'] = 'no';
$config->bug->datatable->fieldList['found']['width'] = '80';
$config->bug->datatable->fieldList['found']['required'] = 'no';
$config->bug->datatable->fieldList['mailto']['title'] = 'mailto';
$config->bug->datatable->fieldList['mailto']['fixed'] = 'no';
$config->bug->datatable->fieldList['mailto']['width'] = '100';
+18
View File
@@ -275,6 +275,24 @@ class custom extends control
$this->display();
}
/**
* Set score display switch
*
* @access public
* @return void
*/
public function score()
{
if($_POST)
{
$this->loadModel('setting')->setItem('system.common.global.score', $this->post->score);
die(js::reload('parent'));
}
$this->view->title = $this->lang->custom->score;
$this->display();
}
/**
* Ajax save custom fields.
*
+4
View File
@@ -15,6 +15,7 @@ $lang->custom->section = 'Section';
$lang->custom->lang = 'Language';
$lang->custom->setPublic = 'Set Public';
$lang->custom->required = 'Required';
$lang->custom->score = 'Score';
$lang->custom->object['story'] = 'Story';
$lang->custom->object['task'] = 'Task';
@@ -121,3 +122,6 @@ $lang->custom->workingList['onlyTask'] = 'Task';
$lang->custom->menuTip = 'Click to show/hide navigation bar. Drag to swtich display order.';
$lang->custom->saveFail = 'Failed to save!';
$lang->custom->scoreList[0] = 'Off';
$lang->custom->scoreList[1] = 'On';
+4
View File
@@ -15,6 +15,7 @@ $lang->custom->section = '附加部分';
$lang->custom->lang = '所属语言';
$lang->custom->setPublic = '设为公共';
$lang->custom->required = '必填项';
$lang->custom->score = '积分';
$lang->custom->object['story'] = '需求';
$lang->custom->object['task'] = '任务';
@@ -121,3 +122,6 @@ $lang->custom->workingList['onlyTask'] = '任务管理工具';
$lang->custom->menuTip = '点击显示或隐藏导航条目,拖拽来更改显示顺序。';
$lang->custom->saveFail = '保存失败!';
$lang->custom->scoreList[0] = '关闭';
$lang->custom->scoreList[1] = '开启';
+4
View File
@@ -13,6 +13,7 @@ $lang->custom->owner = '所有者';
$lang->custom->module = '模組';
$lang->custom->section = '附加部分';
$lang->custom->lang = '所屬語言';
$lang->custom->score = '積分';
$lang->custom->object['story'] = '需求';
$lang->custom->object['task'] = '任務';
@@ -119,3 +120,6 @@ $lang->custom->workingList['onlyTask'] = '任務管理工具';
$lang->custom->menuTip = '點擊顯示或隱藏導航條目,拖拽來更改顯示順序。';
$lang->custom->saveFail = '保存失敗!';
$lang->custom->scoreList[0] = '關閉';
$lang->custom->scoreList[1] = '開啓';
+1 -2
View File
@@ -281,15 +281,14 @@ class customModel extends model
global $app, $lang, $config;
$allMenu = $module == 'main' ? $lang->menu : (isset($lang->$module->menu) ? $lang->$module->menu : $lang->my->menu);
if($module == 'product' and isset($allMenu->branch)) $allMenu->branch = str_replace('@branch@', $lang->custom->branch, $allMenu->branch);
if($module != 'main' and isset($lang->menugroup->$module)) $module = $lang->menugroup->$module;
if($module == 'admin' and empty($config->global->score)) unset($allMenu->score);
$flowModule = $config->global->flow . '_' . $module;
$customMenu = isset($config->customMenu->$flowModule) ? $config->customMenu->$flowModule : array();
if(commonModel::isTutorialMode() && $module === 'main')$customMenu = 'my,product,project,qa,company';
if(!empty($customMenu) && is_string($customMenu) && substr($customMenu, 0, 1) === '[') $customMenu = json_decode($customMenu);
$menu = self::setMenuByConfig($allMenu, $customMenu, $module);
return $menu;
}
+3 -1
View File
@@ -13,7 +13,9 @@
echo "</li><li id='workingTab'>";
common::printLink('custom', 'working', '', $lang->custom->working);
echo "</li><li id='requiredTab'>";
common::printLink('custom', 'required', '', $lang->custom->required);
common::printLink('custom', 'required', '', $lang->custom->required);
echo "</li><li id='scoreTab'>";
common::printLink('custom', 'score', '', $lang->custom->score);
echo '</li>';
?>
</ul>
+34
View File
@@ -0,0 +1,34 @@
<?php
/**
* The score view file of custom module of ZenTaoPMS.
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Memory <lvtao@cnezsoft.com>
* @package custom
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include 'header.html.php'; ?>
<div class='main'>
<form method='post' class='form-condensed' target='hiddenwin'>
<table class='table table-form'>
<tr>
<th class='w-100px text-top'><?php echo $lang->custom->score; ?></th>
<td><?php echo html::radio('score', $lang->custom->scoreList, isset($config->global->score) ? $config->global->score : 0, '', 'block'); ?></td>
</tr>
<tr>
<td></td>
<td><?php echo html::submitButton() ?></td>
</tr>
</table>
</form>
</div>
<script>
$(function()
{
$('#featurebar #scoreTab').addClass('active');
$('.side #<?php echo $moduleName?>Tab').addClass('active');
})
</script>
<?php include '../../common/view/footer.html.php'; ?>
+2
View File
@@ -58,6 +58,7 @@ class editor extends control
if($filePath)
{
$filePath = helper::safe64Decode($filePath);
if(strpos(strtolower($filePath), strtolower($this->app->getBasePath())) !== 0) die($this->lang->editor->editFileError);
if($action == 'extendOther' and file_exists($filePath))
{
$this->view->showContent = htmlspecialchars(file_get_contents($filePath));
@@ -142,6 +143,7 @@ class editor extends control
if($filePath and $_POST)
{
$filePath = helper::safe64Decode($filePath);
if(strpos(strtolower($filePath), strtolower($this->app->getBasePath())) !== 0) die($this->lang->editor->editFileError);
if($action != 'edit' and $action != 'newPage') $filePath = $this->editor->getSavePath($filePath, $action);
if($action != 'edit' and $action != 'newPage' and file_exists($filePath) and !$this->post->override) die(js::error($this->lang->editor->repeatFile));
$this->editor->save($filePath);
+1
View File
@@ -31,6 +31,7 @@ $lang->editor->extendConfirm = 'Do you want to use original code?';
$lang->editor->repeatFile = 'File Name Dupliceted';
$lang->editor->repeatPage = 'Page existed. Do you want to override it?';
$lang->editor->noticeOkFile = 'For security reasons, your Admin account has to be confirmed. \n Please login ZenTao server and create %sFile.\n Note:\n 1. File is blank.\n 2. If the file existed, delete it and then create a new one.';
$lang->editor->editFileError = 'You can only modify Zentao files!';
$lang->editor->notWritable = "Not wirtable. Privilege is required. Please try chmod 777 -R ";
$lang->editor->notDelete = 'Cannot be deleted. Please check your permission!';
+1
View File
@@ -31,6 +31,7 @@ $lang->editor->extendConfirm = '是否要重用原来代码?';
$lang->editor->repeatFile = '文件名重复';
$lang->editor->repeatPage = '已经有此页面。是否覆盖?';
$lang->editor->noticeOkFile = '为了安全起见,系统需要确认您的管理员身份。\n 请登录禅道所在的服务器,创建%s文件。\n 注意:\n 1. 文件内容为空。\n 2. 如果之前文件存在,删除之后重新创建。';
$lang->editor->editFileError = '只能修改禅道文件!';
$lang->editor->notWritable = "无法写入,可能没有权限。请尝试执行 chmod 777 -R ";
$lang->editor->notDelete = '无法删除,请检查权限!';
+30 -2
View File
@@ -65,6 +65,7 @@
if($groupBy == 'assignedTo' and $groupName == '') $groupName = $this->lang->task->noAssigned;
?>
<?php
$tdRNum=0;
foreach($groupTasks as $taskKey => $task)
{
if(isset($currentFilter) and $currentFilter != 'all')
@@ -86,6 +87,8 @@
}
}
if(!empty($task->children)) $tdRNum += count($task->children);
$groupEstimate += $task->estimate;
$groupConsumed += $task->consumed;
$groupLeft += ($task->status == 'cancel' ? 0 : $task->left);
@@ -96,6 +99,7 @@
if($task->status == 'closed') $groupClosed++;
}
$groupSum = count($groupTasks);
$tdRNum += $groupSum;
?>
<?php $i = 0;?>
<?php foreach($groupTasks as $task):?>
@@ -103,7 +107,7 @@
<?php $taskLink = $this->createLink('task','view',"taskID=$task->id"); ?>
<tr class='text-center' data-id='<?php echo $groupIndex?>'>
<?php if($i == 0):?>
<td rowspan='<?php echo count($groupTasks)?>' class='groupby text-left'>
<td rowspan='<?php echo $tdRNum?>' class='groupby text-left'>
<?php echo html::a('###', "<i class='icon-caret-down'></i> " . $groupName, '', "class='expandGroup' data-action='expand' title='$groupName'");?>
<div class='groupSummary text' style='white-space:normal'>
<?php if($groupBy == 'assignedTo' and isset($members[$task->assignedTo])) printf($lang->project->memberHours, $users[$task->assignedTo], $members[$task->assignedTo]->totalHours);?>
@@ -113,7 +117,7 @@
<?php endif;?>
<td><?php echo $task->id;?></td>
<td><span class='<?php echo 'pri' . zget($lang->task->priList, $task->pri, $task->pri)?>'><?php echo zget($lang->task->priList, $task->pri, $task->pri);?></span></td>
<td class='text-left'><?php if(!common::printLink('task', 'view', "task=$task->id", $task->name)) echo $task->name;?></td>
<td class='text-left'><?php if(!empty($task->team)) echo '<span class="label">'.$lang->task->multipleAB.'</span> ';if(!common::printLink('task', 'view', "task=$task->id", $task->name)) echo $task->name;?></td>
<td class='task-<?php echo $task->status;?>'><?php echo $lang->task->statusList[$task->status];?></td>
<td class='<?php if(isset($task->delay)) echo 'delayed';?>'><?php if(substr($task->deadline, 0, 4) > 0) echo $task->deadline;?></td>
<td <?php echo $assignedToClass;?>><?php echo $task->assignedToRealName;?></td>
@@ -128,6 +132,30 @@
<?php common::printIcon('task', 'delete', "projectID=$task->project&taskid=$task->id", '', 'list', '', 'hiddenwin');?>
</td>
</tr>
<?php if(!empty($task->children)):?>
<?php $childrenNum = count($task->children);?>
<?php foreach($task->children as $key => $child):?>
<tr class='text-center table-children<?php if($key==0) echo ' table-child-top';?><?php if(($key+1) == $childrenNum) echo ' table-child-bottom';?>' data-id='<?php echo $groupIndex?>'>
<td><?php echo $child->id;?></td>
<td><span class='<?php echo 'pri' . zget($lang->task->priList, $child->pri, $task->pri)?>'><?php echo zget($lang->task->priList, $child->pri, $child->pri);?></span></td>
<td class='text-left'><span class="label"><?php echo $lang->task->childrenAB;?></span> <?php if(!common::printLink('task', 'view', "task=$child->id", $child->name)) echo $child->name;?></td>
<td class='task-<?php echo $child->status;?>'><?php echo $lang->task->statusList[$child->status];?></td>
<td class='<?php if(isset($child->delay)) echo 'delayed';?>'><?php if(substr($child->deadline, 0, 4) > 0) echo $child->deadline;?></td>
<td <?php echo $assignedToClass;?>><?php echo $child->assignedToRealName;?></td>
<td><?php echo $users[$child->finishedBy];?></td>
<td><?php echo $child->estimate;?></td>
<td><?php echo $child->consumed;?></td>
<td><?php echo $child->left;?></td>
<td class='text-left'><?php echo $child->progess . '%';?></td>
<td><?php echo $lang->task->typeList[$child->type];?></td>
<td>
<?php common::printIcon('task', 'edit', "taskid=$child->id", '', 'list');?>
<?php common::printIcon('task', 'delete', "projectID=$child->project&taskid=$child->id", '', 'list', '', 'hiddenwin');?>
</td>
</tr>
<?php $i++;?>
<?php endforeach;?>
<?php endif;?>
<?php $i++;?>
<?php endforeach;?>
<?php if($i != 0):?>
+1 -1
View File
@@ -668,7 +668,7 @@ class story extends control
$this->story->review($storyID);
if(dao::isError()) die(js::error(dao::getError()));
$result = $this->post->result;
if($this->post->closedReason != '' and strpos('done,postponed,subdivided', $this->post->closedReason) !== false) $result = 'pass';
if($this->post->closedReason != '' and strpos('done,postponed,subdivided', $this->post->closedReason) === false) $result = 'pass';
$actionID = $this->action->create('story', $storyID, 'Reviewed', $this->post->comment, ucfirst($result));
$this->story->sendmail($storyID, $actionID);
if($this->post->result == 'reject')
+4 -12
View File
@@ -128,12 +128,8 @@ class testreport extends control
$builds = array();
if($task->build == 'trunk')
{
$stories = $this->story->getProjectStories($project->id);
$bugs = $this->testreport->getBugs4Test('trunk', $productID, $project->begin, date('Y-m-d', strtotime($task->begin) - 24 * 3600));
foreach($stories as $id => $story)
{
if($story->product != $task->product) unset($stories[$id]);
}
echo js::alert($this->lang->testreport->errorTrunk);
die(js::locate('back'));
}
else
{
@@ -264,12 +260,8 @@ class testreport extends control
$builds = array();
if($task->build == 'trunk')
{
$stories = $this->story->getProjectStories($project->id);
$bugs = $this->testreport->getBugs4Test('trunk', $report->product, $project->begin, date('Y-m-d', strtotime($task->begin) - 24 * 3600));
foreach($stories as $id => $story)
{
if($story->product != $task->product) unset($stories[$id]);
}
echo js::alert($this->lang->testreport->errorTrunk);
die(js::locate('back'));
}
else
{
+11 -1
View File
@@ -54,8 +54,18 @@ $lang->testreport->bugCreateByCaseRate = 'Bug Created in Case Rate (Bugs created
$lang->testreport->caseSummary = ' <strong>%s</strong> cases in total, <strong>%s</strong> cases performed, <strong>%s</strong> results generated, <strong>%s</strong> cases failed.';
$lang->testreport->buildSummary = ' Tested <strong>%s</strong> build.';
$lang->testreport->bugSummary = '<strong>%s</strong> Bug(s) generated in total and <strong>%s</strong> Bug(s) remained unresolved. Confirmed bug rate(bug resolution is resolved or delayedg status is resolved or closed): <strong>%s</strong>,Bug created in case rate(Bugs created in cases / Newly generated bugs): <strong>%s</strong>';
$lang->testreport->confirmDelete = 'Do you want tot delete this report?';
$lang->testreport->moreNotice = 'More features can be extended with reference to the ZenTao extension mechanism, or you can contact us for customization.';
$lang->testreport->exportNotice = "Export By <a href='http://www.zentao.net' target='_blank' style='color:grey'>ZenTaoPMS</a>";
$lang->testreport->noReport = "The report has not yet been generated. Please check it later.";
$lang->testreport->foundBugTip = "openBuild in builds and create time in test time within the range of Bug number.";
$lang->testreport->legacyBugTip = "The Bug state is activated, or the settling time of Bug is at the end of the test.";
$lang->testreport->fromCaseBugTip= "Bug created after failure of use case in test time range.";
$lang->testreport->errorTrunk = "The trunk version cannot create a test report. Please modify the associated version!";
$lang->testreport->bugSummary = <<<EOD
<strong>%s</strong> Bug(s) generated in total <a data-toggle='tooltip' class='text-warning' title='{$lang->testreport->foundBugTip}'><i class='icon-warning-sign'></i></a>,
<strong>%s</strong> Bug(s) remained unresolve <a data-toggle='tooltip' class='text-warning' title='{$lang->testreport->legacyBugTip}'><i class='icon-warning-sign'></i></a>,
<strong>%s</strong> Bug(s) failure of case <a data-toggle='tooltip' class='text-warning' title='{$lang->testreport->fromCaseBugTip}'><i class='icon-warning-sign'></i></a>.
Confirmed bug rate(bug resolution is resolved or delayedg status is resolved or closed): <strong>%s</strong>,Bug created in caserate(Bugs created in cases / Newly generated bugs): <strong>%s</strong>'
EOD;
+11 -1
View File
@@ -54,8 +54,18 @@ $lang->testreport->bugCreateByCaseRate = '用例发现Bug率 (用例创建的Bug
$lang->testreport->caseSummary = '共有<strong>%s</strong>个用例,共执行<strong>%s</strong>个用例,产生了<strong>%s</strong>个结果,失败的用例有<strong>%s</strong>个。';
$lang->testreport->buildSummary = '共测试了<strong>%s</strong>个版本。';
$lang->testreport->bugSummary = '共产生<strong>%s</strong>个Bug,遗留<strong>%s</strong>个Bug。有效Bug率(方案为已解决或延期 / 状态为已解决或已关闭):<strong>%s</strong>,用例发现Bug率(用例创建的Bug / 时间区间中新增的Bug):<strong>%s</strong>';
$lang->testreport->confirmDelete = '是否删除该报告?';
$lang->testreport->moreNotice = '更多功能可以参考禅道扩展机制进行扩展,也可以联系我们进行定制。';
$lang->testreport->exportNotice = "由<a href='http://www.zentao.net' target='_blank' style='color:grey'>禅道项目管理软件</a>导出";
$lang->testreport->noReport = "报表还没有生成,请稍候查看。";
$lang->testreport->foundBugTip = "影响版本在测试轮次内,并且创建时间在测试时间范围内产生的Bug数。";
$lang->testreport->legacyBugTip = "Bug状态是激活,或Bug的解决时间在测试结束时间之后。";
$lang->testreport->fromCaseBugTip= "测试时间范围内,用例执行失败后创建的Bug";
$lang->testreport->errorTrunk = "主干版本不能创建测试报告,请修改关联版本!";
$lang->testreport->bugSummary = <<<EOD
共发现<strong>%s</strong>个Bug <a data-toggle='tooltip' class='text-warning' title='{$lang->testreport->foundBugTip}'><i class='icon-warning-sign'></i></a>,
遗留<strong>%s</strong>个Bug <a data-toggle='tooltip' class='text-warning' title='{$lang->testreport->legacyBugTip}'><i class='icon-warning-sign'></i></a>。
用例执行产生<strong>%s</strong>个Bug <a data-toggle='tooltip' class='text-warning' title='{$lang->testreport->fromCaseBugTip}'><i class='icon-warning-sign'></i></a>。
有效Bug率(方案为已解决或延期 / 状态为已解决或已关闭):<strong>%s</strong>,用例发现Bug率(用例创建的Bug / 发现Bug数):<strong>%s</strong>
EOD;
+24 -18
View File
@@ -93,8 +93,8 @@ class testreportModel extends model
$data = $this->loadModel('file')->processImgURL($data, $this->config->testreport->editor->create['id'], $this->post->uid);
$this->dao->insert(TABLE_TESTREPORT)->data($data)->autocheck()
->batchCheck($this->config->testreport->create->requiredFields, 'notempty')
->batchCheck('start,end', 'notempty')
->check('end', 'ge', $data->start)
->batchCheck('begin,end', 'notempty')
->check('end', 'ge', $data->begin)
->exec();
if(dao::isError()) return false;
$reportID = $this->dao->lastInsertID();
@@ -125,8 +125,8 @@ class testreportModel extends model
$data = $this->loadModel('file')->processImgURL($data, $this->config->testreport->editor->edit['id'], $this->post->uid);
$this->dao->update(TABLE_TESTREPORT)->data($data)->autocheck()
->batchCheck($this->config->testreport->edit->requiredFields, 'notempty')
->batchCheck('start,end', 'notempty')
->check('end', 'ge', $data->start)
->batchCheck('begin,end', 'notempty')
->check('end', 'ge', $data->begin)
->where('id')->eq($reportID)
->exec();
if(dao::isError()) return false;
@@ -186,10 +186,25 @@ class testreportModel extends model
*/
public function getBugInfo($tasks, $productIdList, $begin, $end, $builds)
{
$bugsByTask = $this->dao->select('*')->from(TABLE_BUG)->where('testtask')->in(array_keys($tasks))->andWhere('testtask')->ne(0)->andWhere('`case`')->ne(0)->andWhere('deleted')->eq(0)->fetchAll('id');
$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);
foreach($allNewBugs as $bug)
{
if(!array_diff(explode(',', $bug->openedBuild), $buildIdList))
{
$foundBugs[$bug->id] = $bug;
if($bug->status == 'active' OR $bug->resolvedDate > "$end 23:59:59") $legacyBugs[$bug->id] = $bug;
}
if($bug->case and !empty($bug->testtask) and in_array($bug->testtask, $taskIdList)) $byCaseNum ++;
}
$severityGroups = $statusGroups = $openedByGroups = $resolvedByGroups = $resolutionGroups = $moduleGroups = $typeGroups = array();
$resolvedBugs = 0;
foreach($bugsByTask as $bug)
foreach($foundBugs as $bug)
{
$severityGroups[$bug->severity] = isset($severityGroups[$bug->severity]) ? $severityGroups[$bug->severity] + 1 : 1;
$typeGroups[$bug->type] = isset($typeGroups[$bug->type]) ? $typeGroups[$bug->type] + 1 : 1;
@@ -201,20 +216,11 @@ class testreportModel extends model
if($bug->status == 'resolved' or $bug->status == 'closed') $resolvedBugs ++;
}
$newBugs = $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();
$legacyBugs = array();
$byCaseNum = 0;
$buildIdList = array_keys($builds) + array('trunk' => 'trunk');
foreach($newBugs as $bug)
{
if(!array_diff(explode(',', $bug->openedBuild), $buildIdList) and ($bug->status == 'active' OR $bug->resolvedDate > "$end 23:59:59")) $legacyBugs[$bug->id] = $bug;
if($bug->case) $byCaseNum ++;
}
$bugInfo['foundBugs'] = count($foundBugs);
$bugInfo['legacyBugs'] = $legacyBugs;
$bugInfo['countBugByTask'] = count($bugsByTask);
$bugInfo['countBugByTask'] = $byCaseNum;
$bugInfo['bugConfirmedRate'] = empty($resolvedBugs) ? 0 : round((zget($resolutionGroups, 'fixed', 0) + zget($resolutionGroups, 'postponed', 0)) / $resolvedBugs * 100, 2);
$bugInfo['bugCreateByCaseRate'] = empty($byCaseNum) ? 0 : round($byCaseNum / count($newBugs) * 100, 2);
$bugInfo['bugCreateByCaseRate'] = empty($byCaseNum) ? 0 : round($byCaseNum / count($foundBugs) * 100, 2);
$this->app->loadLang('bug');
$users = $this->loadModel('user')->getPairs('noclosed|noletter|nodeleted');
+2 -2
View File
@@ -68,8 +68,8 @@
<?php
echo '<p>' . $storySummary . '</p>';
echo '<p>' . sprintf($lang->testreport->buildSummary, empty($builds) ? 1 : count($builds)) . $caseSummary . '</p>';
echo '<p>' . sprintf($lang->testreport->bugSummary, $bugInfo['countBugByTask'], count($legacyBugs), $bugInfo['bugConfirmedRate'] . '%', $bugInfo['bugCreateByCaseRate'] . '%') . '</p>';
unset($bugInfo['countBugByTask']); unset($bugInfo['bugConfirmedRate']); unset($bugInfo['bugCreateByCaseRate']);
echo '<p>' . sprintf($lang->testreport->bugSummary, $bugInfo['foundBugs'], count($legacyBugs), $bugInfo['countBugByTask'], $bugInfo['bugConfirmedRate'] . '%', $bugInfo['bugCreateByCaseRate'] . '%') . '</p>';
unset($bugInfo['countBugByTask']); unset($bugInfo['bugConfirmedRate']); unset($bugInfo['bugCreateByCaseRate']); unset($bugInfo['foundBugs']);
?>
</td>
</tr>
+2 -2
View File
@@ -63,8 +63,8 @@
<?php
echo '<p>' . $storySummary . '</p>';
echo '<p>' . sprintf($lang->testreport->buildSummary, empty($builds) ? 1 : count($builds)) . $caseSummary . '</p>';
echo '<p>' . sprintf($lang->testreport->bugSummary, $bugInfo['countBugByTask'], count($legacyBugs), $bugInfo['bugConfirmedRate'] . '%', $bugInfo['bugCreateByCaseRate'] . '%') . '</p>';
unset($bugInfo['countBugByTask']); unset($bugInfo['bugConfirmedRate']); unset($bugInfo['bugCreateByCaseRate']);
echo '<p>' . sprintf($lang->testreport->bugSummary, $bugInfo['foundBugs'], count($legacyBugs), $bugInfo['countBugByTask'], $bugInfo['bugConfirmedRate'] . '%', $bugInfo['bugCreateByCaseRate'] . '%') . '</p>';
unset($bugInfo['countBugByTask']); unset($bugInfo['bugConfirmedRate']); unset($bugInfo['bugCreateByCaseRate']); unset($bugInfo['foundBugs']);
?>
</td>
</tr>
+2 -2
View File
@@ -84,8 +84,8 @@
<?php
echo '<p>' . $storySummary . '</p>';
echo '<p>' . sprintf($lang->testreport->buildSummary, empty($builds) ? 1 : count($builds)) . $caseSummary . '</p>';
echo '<p>' . sprintf($lang->testreport->bugSummary, $bugInfo['countBugByTask'], count($legacyBugs), $bugInfo['bugConfirmedRate'] . '%', $bugInfo['bugCreateByCaseRate'] . '%') . '</p>';
unset($bugInfo['countBugByTask']); unset($bugInfo['bugConfirmedRate']); unset($bugInfo['bugCreateByCaseRate']);
echo '<p>' . sprintf($lang->testreport->bugSummary, $bugInfo['foundBugs'], count($legacyBugs), $bugInfo['countBugByTask'], $bugInfo['bugConfirmedRate'] . '%', $bugInfo['bugCreateByCaseRate'] . '%') . '</p>';
unset($bugInfo['countBugByTask']); unset($bugInfo['bugConfirmedRate']); unset($bugInfo['bugCreateByCaseRate']); unset($bugInfo['foundBugs']);
?>
</td>
</tr>
+2 -3
View File
@@ -134,14 +134,13 @@ class testtask extends control
$productID = $productID ? $productID : key($products);
$projects = $this->dao->select('id, name')->from(TABLE_PROJECT)->where('id')->eq($projectID)->andWhere('deleted')->eq(0)->fetchPairs('id');
$builds = $this->dao->select('id, name')->from(TABLE_BUILD)->where('project')->eq($projectID)->andWhere('deleted')->eq(0)->fetchPairs('id');
$builds = array('trunk' => $this->lang->trunk) + $builds;
}
/* Create testtask from testtask of test.*/
if($projectID == 0)
{
$projects = $this->product->getProjectPairs($productID, $branch = 0, $params = 'nodeleted');
$builds = $this->loadModel('build')->getProductBuildPairs($productID);
$builds = $this->loadModel('build')->getProductBuildPairs($productID, 0, 'notrunk');
}
/* Set menu. */
@@ -442,7 +441,7 @@ class testtask extends control
$this->view->task = $task;
$this->view->projects = $this->product->getProjectPairs($productID);
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID, $branch = 0, $params = '');
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID, $branch = 0, $params = 'notrunk');
$this->view->users = $this->loadModel('user')->getPairs('nodeleted', $task->owner);
$this->view->contactLists = $this->user->getContactLists($this->app->user->account, 'withnote');