Merge branch '15.0.beta3' of http://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3
This commit is contained in:
@@ -56,6 +56,11 @@ class build extends control
|
||||
$this->execution->setMenu($executionID);
|
||||
$this->session->set('project', $execution->project);
|
||||
}
|
||||
elseif($this->app->openApp == 'qa')
|
||||
{
|
||||
$execution = $this->execution->getByID($executionID);
|
||||
$executions = $this->execution->getPairs($execution->project);
|
||||
}
|
||||
|
||||
$productGroups = $this->execution->getProducts($executionID);
|
||||
$productID = $productID ? $productID : key($productGroups);
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
</td>
|
||||
<?php else:?>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<div class='input-group' id='productBox'>
|
||||
<?php printf($lang->build->noProduct, $this->createLink('execution', 'manageproducts', "executionID=$executionID&from=buildCreate", '', 'true'), $openApp);?>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -168,7 +168,7 @@ $lang->product->dividerMenu = $config->URAndSR ? ',requirement,set,' : ',track,s
|
||||
|
||||
/* Project menu. */
|
||||
$lang->project->homeMenu = new stdclass();
|
||||
$lang->project->homeMenu->browse = array('link' => ($config->systemMode == 'new' ? $lang->project->list : $lang->executionCommon) . '|project|browse|', 'alias' => 'batchedit');
|
||||
$lang->project->homeMenu->browse = array('link' => ($config->systemMode == 'new' ? $lang->project->list : $lang->executionCommon) . '|project|browse|', 'alias' => 'batchedit,create');
|
||||
|
||||
$lang->project->dividerMenu = ',execution,programplan,doc,dynamic,';
|
||||
|
||||
@@ -303,7 +303,7 @@ $lang->execution->menu->qa['subMenu']->qa = array('link' => "$lang->dash
|
||||
$lang->execution->menu->qa['subMenu']->bug = array('link' => "{$lang->bug->common}|execution|bug|executionID=%s", 'subModule' => 'bug');
|
||||
$lang->execution->menu->qa['subMenu']->testcase = array('link' => "{$lang->testcase->shortCommon}|execution|testcase|executionID=%s", 'alias' => 'create');
|
||||
$lang->execution->menu->qa['subMenu']->testtask = array('link' => "{$lang->testtask->common}|execution|testtask|executionID=%s", 'subModule' => 'testtask');
|
||||
$lang->execution->menu->qa['subMenu']->testreport = array('link' => "{$lang->testreport->common}|execution|testreport|browse|exeutionID=%s", 'subModule' => 'testreport');
|
||||
$lang->execution->menu->qa['subMenu']->testreport = array('link' => "{$lang->testreport->common}|execution|testreport|exeutionID=%s", 'subModule' => 'testreport');
|
||||
|
||||
$lang->execution->menu->qa['menuOrder'][5] = 'qa';
|
||||
$lang->execution->menu->qa['menuOrder'][10] = 'bug';
|
||||
|
||||
@@ -958,9 +958,9 @@ class execution extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function testreport($executionID = 0, $objectID = 0, $objectType = 'product', $extra = '', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
public function testreport($executionID = 0, $objectType = 'execution', $extra = '', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
|
||||
echo $this->fetch('testreport', 'browse', "objectID=$executionID&objectType=$objectType&extra=$extra&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1041,6 +1041,7 @@ class execution extends control
|
||||
|
||||
/* Save session. */
|
||||
$this->session->set('testtaskList', $this->app->getURI(true), 'execution');
|
||||
$this->session->set('buildList', $this->app->getURI(true), 'execution');
|
||||
|
||||
$execution = $this->commonAction($executionID);
|
||||
$executionID = $execution->id;
|
||||
|
||||
@@ -2273,7 +2273,7 @@ class executionModel extends model
|
||||
public function manageMembers($executionID)
|
||||
{
|
||||
$execution = $this->getByID($executionID);
|
||||
$data = (array)fixer::input('post')->get();
|
||||
$data = (array)fixer::input('post')->get();
|
||||
|
||||
extract($data);
|
||||
$executionType = strpos('sprint|stage', $execution->type) !== false ? 'execution' : $execution->type;
|
||||
@@ -2372,7 +2372,9 @@ class executionModel extends model
|
||||
public function unlinkMember($sprintID, $account)
|
||||
{
|
||||
$sprint = $this->getByID($sprintID);
|
||||
$this->dao->delete()->from(TABLE_TEAM)->where('root')->eq((int)$sprintID)->andWhere('type')->eq($sprint->type)->andWhere('account')->eq($account)->exec();
|
||||
$type = ($sprint->type == 'stage' || $sprint->type == 'sprint') ? 'execution' : $sprint->type;
|
||||
|
||||
$this->dao->delete()->from(TABLE_TEAM)->where('root')->eq((int)$sprintID)->andWhere('type')->eq($type)->andWhere('account')->eq($account)->exec();
|
||||
$this->updateUserView($sprintID, 'sprint', array($account));
|
||||
|
||||
/* Remove team members from the sprint or stage, and determine whether to remove team members from the execution. */
|
||||
@@ -2386,9 +2388,9 @@ class executionModel extends model
|
||||
->fetch();
|
||||
if(empty($teamMember))
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_TEAM)->where('root')->eq($sprint->execution)->andWhere('type')->eq('execution')->andWhere('account')->eq($account)->exec();
|
||||
$this->loadModel('user')->updateUserView($sprint->execution, 'execution', array($account));
|
||||
$linkedProducts = $this->loadModel('product')->getProductPairsByProject($sprint->execution);
|
||||
$this->dao->delete()->from(TABLE_TEAM)->where('root')->eq($sprint->project)->andWhere('type')->eq('project')->andWhere('account')->eq($account)->exec();
|
||||
$this->loadModel('user')->updateUserView($sprint->project, 'project', array($account));
|
||||
$linkedProducts = $this->loadModel('product')->getProductPairsByProject($sprint->project);
|
||||
if(!empty($linkedProducts)) $this->user->updateUserView(array_keys($linkedProducts), 'product', array($account));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if(common::canModify('execution', $execution)):?>
|
||||
<?php common::printIcon('testreport', 'browse', "objectID=$executionID&objectType=execution", '', 'button','flag muted');?>
|
||||
<?php common::printLink('testtask', 'create', "product=0&executionID=$executionID&build=&projectID=$execution->project", "<i class='icon icon-plus'></i> " . $lang->testtask->create, '', "class='btn btn-primary'");?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<?php if(isset($this->config->maxVersion) and common::hasPriv('project', 'createGuide')):?>
|
||||
<?php echo html::a($this->createLink('project', 'createGuide'), "<i class='icon icon-plus'></i> " . $lang->my->createProgram, '', "class='btn btn-info' data-toggle=modal");?>
|
||||
<?php elseif($this->config->systemMode == 'new' and common::hasPriv('project', 'create')):?>
|
||||
<?php echo html::a($this->createLink('project', 'create'), '<i class="icon icon-plus"></i>' . $lang->project->create, '', 'class="btn btn-info" data-toggle="modal" data-target="#guideDialog"');?>
|
||||
<?php echo html::a($this->createLink('project', 'create'), '<i class="icon icon-plus"></i>' . $lang->project->create, '', 'class="btn btn-info" data-target="#guideDialog"');?>
|
||||
<?php elseif($this->config->systemMode == 'classic' and common::hasPriv('execution', 'create')):?>
|
||||
<?php echo html::a($this->createLink('execution', 'create'), '<i class="icon icon-plus"></i>' . $lang->execution->create, '', 'class="btn btn-info"');?>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
<?php if($type == 'assigntome') $params .= "&from=testtask&taskID=$case->task";?>
|
||||
<td class='text-left'><?php echo html::a($this->createLink('testcase', 'view', $params), $case->title, null, "style='color: $case->color'");?></td>
|
||||
<?php if($type == 'assigntome'):?>
|
||||
<td><?php echo $case->taskName;?></td>
|
||||
<td class='c-name'><?php echo $case->taskName;?></td>
|
||||
<?php endif;?>
|
||||
<td><?php echo zget($lang->testcase->typeList, $case->type);?></td>
|
||||
<td><?php echo zget($users, $case->openedBy);?></td>
|
||||
|
||||
@@ -813,8 +813,10 @@ class product extends control
|
||||
{
|
||||
die(printf($this->lang->build->noProduct, $this->createLink('execution', 'manageproducts', "executionID=$executionID&from=buildCreate", '', 'true'), 'project'));
|
||||
}
|
||||
|
||||
die(html::select('product', $products, empty($product) ? '' : $product->id, "onchange='loadBranches(this.value);' class='form-control chosen' required data-toggle='modal' data-type='iframe'"));
|
||||
else
|
||||
{
|
||||
die(html::select('product', $products, empty($product) ? '' : $product->id, "onchange='loadBranches(this.value);' class='form-control chosen' required data-toggle='modal' data-type='iframe'"));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1000,7 +1002,7 @@ class product extends control
|
||||
elseif($moduleName == 'execution')
|
||||
{
|
||||
$this->loadModel('execution')->setMenu($objectID);
|
||||
if($testreport == '') $this->app->rawModule = $activeMenu;
|
||||
$this->app->rawModule = $activeMenu;
|
||||
if($activeMenu == 'testreport') $this->lang->execution->menu->qa['subMenu']->testtask['subMenu']->testtask['subModule'] = 'product';
|
||||
}
|
||||
|
||||
|
||||
@@ -312,7 +312,7 @@ class productModel extends model
|
||||
->beginIF(!empty($projectID))->andWhere('t1.project')->eq($projectID)->fi()
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->products)->fi()
|
||||
->beginIF(strpos($status, 'noclosed') !== false)->andWhere('status')->ne('closed')->fi()
|
||||
->orderBy($orderBy . 't2.order desc')
|
||||
->orderBy($orderBy . 't2.order asc')
|
||||
->fetchAll('id');
|
||||
}
|
||||
|
||||
|
||||
@@ -105,6 +105,11 @@ js::set('dittoNotice', $dittoNotice);
|
||||
{
|
||||
$taskMembers = $members;
|
||||
}
|
||||
|
||||
if($tasks[$taskID]->assignedTo and !isset($taskMembers[$tasks[$taskID]->assignedTo]))
|
||||
{
|
||||
$taskMembers[$tasks[$taskID]->assignedTo] = $users[$tasks[$taskID]->assignedTo];
|
||||
}
|
||||
?>
|
||||
<td><?php echo $taskID . html::hidden("taskIDList[$taskID]", $taskID);?></td>
|
||||
<td style='overflow:visible' title='<?php echo $tasks[$taskID]->name?>'>
|
||||
@@ -119,7 +124,7 @@ js::set('dittoNotice', $dittoNotice);
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'module', ' hidden')?>' style='overflow:visible'><?php echo html::select("modules[$taskID]", $modules, $tasks[$taskID]->module, "class='form-control chosen'")?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'module', ' hidden')?>' style='overflow:visible'><?php echo html::select("modules[$taskID]", $modules, $tasks[$taskID]->module, "class='form-control chosen'")?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'assignedTo', ' hidden')?>' style='overflow:visible'><?php echo html::select("assignedTos[$taskID]", $taskMembers, $tasks[$taskID]->assignedTo, "class='form-control chosen' {$disableAssignedTo}");?></td>
|
||||
<td><?php echo html::select("types[$taskID]", $typeList, $tasks[$taskID]->type, "class='form-control'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'status', "class='hidden'")?>><?php echo html::select("statuses[$taskID]", $statusList, $tasks[$taskID]->status, "class='form-control'");?></td>
|
||||
|
||||
@@ -329,6 +329,10 @@ class testcase extends control
|
||||
{
|
||||
$this->loadModel('project')->setMenu($this->session->project);
|
||||
}
|
||||
elseif($this->app->openApp == 'execution')
|
||||
{
|
||||
$this->loadModel('execution')->setMenu($this->session->execution);
|
||||
}
|
||||
elseif($this->app->openApp == 'my')
|
||||
{
|
||||
$this->loadModel('my')->setMenu();
|
||||
|
||||
@@ -94,7 +94,7 @@ class testreport extends control
|
||||
|
||||
$reports = $this->testreport->getList($objectID, $objectType, $extra, $orderBy, $pager);
|
||||
|
||||
if($objectType == 'execution' and isset($_POST['taskIdList']))
|
||||
if(strpos('project|execution', $objectType) !== false and isset($_POST['taskIdList']))
|
||||
{
|
||||
$taskIdList = $_POST['taskIdList'];
|
||||
foreach($reports as $reportID => $report)
|
||||
@@ -109,9 +109,9 @@ class testreport extends control
|
||||
{
|
||||
$param = '';
|
||||
if($objectType == 'product' and $extra) $param = "objectID=$extra&objectType=testtask";
|
||||
if($objectType == 'project')
|
||||
if(($objectType == 'project' or $objectType == 'execution') and ($extra or !empty($_POST['taskIdList'])))
|
||||
{
|
||||
$param = "objectID=$objectID&objectType=project";
|
||||
$param = "objectID=$objectID&objectType=$objectType";
|
||||
if(isset($_POST['taskIdList'])) $param .= '&extra=' . join(',', $_POST['taskIdList']);
|
||||
}
|
||||
if($param) $this->locate($this->createLink('testreport', 'create', $param));
|
||||
@@ -235,9 +235,9 @@ class testreport extends control
|
||||
$this->view->position[] = $this->lang->testreport->create;
|
||||
$this->view->reportTitle = date('Y-m-d') . " TESTTASK#{$task->id} {$task->name} {$this->lang->testreport->common}";
|
||||
}
|
||||
elseif($objectType == 'project')
|
||||
elseif($objectType == 'execution')
|
||||
{
|
||||
$executionID = $this->commonAction($objectID, 'execution');
|
||||
$executionID = $this->commonAction($objectID, $objectType);
|
||||
if($executionID != $objectID) die(js::error($this->lang->error->accessDenied) . js::locate('back'));
|
||||
|
||||
$execution = $this->execution->getById($executionID);
|
||||
@@ -275,9 +275,9 @@ class testreport extends control
|
||||
$this->view->title = $execution->name . $this->lang->testreport->create;
|
||||
$this->view->position[] = html::a(inlink('browse', "objectID=$executionID&objectType=execution"), $execution->name);
|
||||
$this->view->position[] = $this->lang->testreport->create;
|
||||
$this->view->reportTitle = date('Y-m-d') . " PROJECT#{$execution->id} {$execution->name} {$this->lang->testreport->common}";
|
||||
|
||||
$this->view->reportTitle = date('Y-m-d') . " EXECUTION#{$execution->id} {$execution->name} {$this->lang->testreport->common}";
|
||||
}
|
||||
|
||||
$cases = $this->testreport->getTaskCases($tasks, $begin, $end);
|
||||
$bugInfo = $this->testreport->getBugInfo($tasks, $productIdList, $begin, $end, $builds);
|
||||
$this->view->begin = $begin;
|
||||
@@ -316,12 +316,13 @@ class testreport extends control
|
||||
/**
|
||||
* Edit report
|
||||
*
|
||||
* @param int $reportID
|
||||
* @param string $from
|
||||
* @param int $reportID
|
||||
* @param string $begin
|
||||
* @param string $end
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function edit($reportID, $from = 'product', $begin = '', $end ='')
|
||||
public function edit($reportID, $begin = '', $end ='')
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
@@ -333,14 +334,15 @@ class testreport extends control
|
||||
$actionID = $this->loadModel('action')->create('testreport', $reportID, 'Edited', $fileAction);
|
||||
if(!empty($changes)) $this->action->logHistory($actionID, $changes);
|
||||
|
||||
die(js::locate(inlink('view', "reportID=$reportID&from=$from"), 'parent'));
|
||||
die(js::locate(inlink('view', "reportID=$reportID"), 'parent'));
|
||||
}
|
||||
|
||||
$report = $this->testreport->getById($reportID);
|
||||
$execution = $this->execution->getById($report->execution);
|
||||
$begin = !empty($begin) ? date("Y-m-d", strtotime($begin)) : $report->begin;
|
||||
$end = !empty($end) ? date("Y-m-d", strtotime($end)) : $report->end;
|
||||
if($from == 'product' and is_numeric($report->product))
|
||||
|
||||
if($this->app->openApp == 'qa' and !empty($report->product))
|
||||
{
|
||||
$product = $this->product->getById($report->product);
|
||||
$productID = $this->commonAction($report->product, 'product');
|
||||
@@ -350,12 +352,12 @@ class testreport extends control
|
||||
$this->view->position[] = html::a($browseLink, $product->name);
|
||||
$this->view->position[] = $this->lang->testreport->edit;
|
||||
}
|
||||
else
|
||||
elseif($this->app->openApp == 'execution')
|
||||
{
|
||||
$executionID = $this->commonAction($report->execution, 'execution');
|
||||
if($executionID != $report->objectID) die(js::error($this->lang->error->accessDenied) . js::locate('back'));
|
||||
|
||||
$browseLink = inlink('browse', "objectID=$executionID&objectType=project");
|
||||
$browseLink = inlink('browse', "objectID=$executionID&objectType=execution");
|
||||
$this->view->position[] = html::a($browseLink, $execution->name);
|
||||
$this->view->position[] = $this->lang->testreport->edit;
|
||||
}
|
||||
@@ -384,7 +386,7 @@ class testreport extends control
|
||||
|
||||
$this->setChartDatas($report->objectID);
|
||||
}
|
||||
else
|
||||
elseif($report->objectType == 'execution')
|
||||
{
|
||||
$tasks = $this->testtask->getByList($report->tasks);
|
||||
$productIdList[$report->product] = $report->product;
|
||||
@@ -402,7 +404,6 @@ class testreport extends control
|
||||
$this->view->title = $report->title . $this->lang->testreport->edit;
|
||||
|
||||
$this->view->report = $report;
|
||||
$this->view->from = $from;
|
||||
$this->view->begin = $begin;
|
||||
$this->view->end = $end;
|
||||
$this->view->stories = $stories;
|
||||
@@ -412,8 +413,8 @@ class testreport extends control
|
||||
$this->view->tasks = join(',', array_keys($tasks));
|
||||
$this->view->storySummary = $this->product->summary($stories);
|
||||
|
||||
$this->view->builds = $builds;
|
||||
$this->view->users = $this->user->getPairs('noletter|noclosed|nodeleted');
|
||||
$this->view->builds = $builds;
|
||||
$this->view->users = $this->user->getPairs('noletter|noclosed|nodeleted');
|
||||
|
||||
$this->view->cases = $cases;
|
||||
$this->view->caseSummary = $this->testreport->getResultSummary($tasks, $cases, $begin, $end);
|
||||
@@ -434,7 +435,6 @@ class testreport extends control
|
||||
* View report.
|
||||
*
|
||||
* @param int $reportID
|
||||
* @param string $from
|
||||
* @param string $tab
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
@@ -442,14 +442,14 @@ class testreport extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function view($reportID, $from = 'product', $tab = 'basic', $recTotal = 0, $recPerPage = 100, $pageID = 1)
|
||||
public function view($reportID, $tab = 'basic', $recTotal = 0, $recPerPage = 100, $pageID = 1)
|
||||
{
|
||||
$report = $this->testreport->getById($reportID);
|
||||
if(!$report) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
$this->session->project = $report->project;
|
||||
|
||||
$execution = $this->execution->getById($report->execution);
|
||||
if($from == 'product' and is_numeric($report->product))
|
||||
if($this->app->openApp == 'qa' and !empty($report->product))
|
||||
{
|
||||
$product = $this->product->getById($report->product);
|
||||
$productID = $this->commonAction($report->product, 'product');
|
||||
@@ -458,12 +458,12 @@ class testreport extends control
|
||||
$browseLink = inlink('browse', "objectID=$productID&objectType=product");
|
||||
$this->view->position[] = html::a($browseLink, $product->name);
|
||||
}
|
||||
else
|
||||
elseif($this->app->openApp == 'execution')
|
||||
{
|
||||
$executionID = $this->commonAction($report->execution, 'execution');
|
||||
if($executionID != $report->execution) die(js::error($this->lang->error->accessDenied) . js::locate('back'));
|
||||
|
||||
$browseLink = inlink('browse', "objectID=$executionID&objectType=project");
|
||||
$browseLink = inlink('browse', "objectID=$executionID&objectType=execution");
|
||||
$this->view->position[] = html::a($browseLink, $execution->name);
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +52,6 @@ function refreshPage()
|
||||
}
|
||||
else if(method == 'edit')
|
||||
{
|
||||
location.href = createLink('testreport', 'edit', "reportID=" + reportID + "&from=" + from + "&begin=" + begin + "&end=" + end);
|
||||
location.href = createLink('testreport', 'edit', "reportID=" + reportID + "&begin=" + begin + "&end=" + end);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ $lang->testreport->buildSummary = '共测试了<strong>%s</strong>个版本。
|
||||
$lang->testreport->confirmDelete = '是否删除该报告?';
|
||||
$lang->testreport->moreNotice = '更多功能可以参考禅道扩展机制进行扩展,也可以联系我们进行定制。';
|
||||
$lang->testreport->exportNotice = "由<a href='https://www.zentao.net' target='_blank' style='color:grey'>禅道项目管理软件</a>导出";
|
||||
$lang->testreport->noReport = "报表还没有生成。";
|
||||
$lang->testreport->noReport = "暂无报告,请到测试单下生成测试报告。";
|
||||
$lang->testreport->foundBugTip = "影响版本在测试轮次内,并且创建时间在测试时间范围内产生的Bug数。";
|
||||
$lang->testreport->legacyBugTip = "Bug状态是激活,或Bug的解决时间在测试结束时间之后。";
|
||||
$lang->testreport->fromCaseBugTip = "测试时间范围内,用例执行失败后创建的Bug。";
|
||||
|
||||
@@ -52,9 +52,10 @@ class testreportModel extends model
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$execution = $this->loadModel('execution')->getByID($this->post->execution);
|
||||
$data = fixer::input('post')
|
||||
->stripTags($this->config->testreport->editor->create['id'], $this->config->allowedTags)
|
||||
->setIF($this->config->systemMode == 'new' and $this->lang->navGroup->testreport != 'qa', 'project', $this->session->project)
|
||||
->setIF($this->config->systemMode == 'new', 'project', $execution->project)
|
||||
->add('createdBy', $this->app->user->account)
|
||||
->add('createdDate', helper::now())
|
||||
->join('stories', ',')
|
||||
@@ -146,10 +147,10 @@ class testreportModel extends model
|
||||
{
|
||||
$objectID = (int)$objectID;
|
||||
return $this->dao->select('*')->from(TABLE_TESTREPORT)->where('deleted')->eq(0)
|
||||
->beginIF($this->lang->navGroup->testreport != 'qa')->andWhere('project')->eq($this->session->project)->fi()
|
||||
->beginIF($objectType == 'project')->andWhere('objectID')->eq($objectID)->andWhere('objectType')->eq('project')->fi()
|
||||
->beginIF($objectType == 'product' and $extra)->andWhere('objectID')->eq((int)$extra)->andWhere('objectType')->eq('testtask')->fi()
|
||||
->beginIF($objectType == 'product' and empty($extra))->andWhere('product')->eq($objectID)->fi()
|
||||
->beginIF(!empty($extra))->andWhere('objectID')->eq($extra)->fi()
|
||||
->beginIF($objectType == 'product')->andWhere('product')->eq($objectID)->fi()
|
||||
->beginIF($objectType == 'project')->andWhere('project')->eq($objectID)->fi()
|
||||
->beginIF($objectType == 'execution')->andWhere('execution')->eq($objectID)->fi()
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
->fetchAll('id');
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
<div id='mainContent' class='main-table'>
|
||||
<?php if(empty($reports)):?>
|
||||
<div class="table-empty-tip">
|
||||
@@ -43,12 +44,11 @@
|
||||
<th class='c-actions-2'> <?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php if($reports):?>
|
||||
<tbody class='text-center'>
|
||||
<?php foreach($reports as $report):?>
|
||||
<tr>
|
||||
<td><?php echo html::a(helper::createLink('testreport', 'view', "reportID=$report->id"), sprintf('%03d', $report->id));?></td>
|
||||
<td class='text-left' title='<?php $report->title?>'><?php echo html::a(inlink('view', "reportID=$report->id&from=$objectType"), $report->title)?></td>
|
||||
<td class='text-left' title='<?php $report->title?>'><?php echo html::a(inlink('view', "reportID=$report->id"), $report->title)?></td>
|
||||
<td><?php echo zget($users, $report->createdBy);?></td>
|
||||
<td><?php echo substr($report->createdDate, 2);?></td>
|
||||
<?php $executionName = $report->execution ? '#' . $report->execution . $executions[$report->execution] : '';?>
|
||||
@@ -70,9 +70,6 @@
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<?php else:?>
|
||||
<tbody><tr><td colspan='7'><?php echo $lang->testreport->noReport;?></td></tr></tbody>
|
||||
<?php endif;?>
|
||||
</table>
|
||||
<div class='table-footer'><?php $pager->show('right', 'pagerjs');?></div>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -114,9 +114,6 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var reportID = <?php echo $report->id;?>;
|
||||
var from = '<?php echo $from;?>';
|
||||
var method = 'edit';
|
||||
</script>
|
||||
<?php js::set('reportID', $report->id);?>
|
||||
<?php js::set('method', 'edit');?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -37,6 +37,8 @@ class testtask extends control
|
||||
{
|
||||
parent::__construct($moduleName, $methodName);
|
||||
|
||||
$this->loadModel('product');
|
||||
|
||||
/* Get product data. */
|
||||
$projectID = 0;
|
||||
if($this->app->openApp == 'project')
|
||||
@@ -45,7 +47,7 @@ class testtask extends control
|
||||
$products = $this->loadModel('project')->getProducts($projectID, false);
|
||||
}
|
||||
if($this->app->openApp == 'execution') $products = $this->loadModel('execution')->getProducts($this->session->execution, false);
|
||||
if($this->app->openApp == 'qa' or $this->app->openApp == 'my') $products = $this->loadModel('product')->getPairs();
|
||||
if($this->app->openApp == 'qa' or $this->app->openApp == 'my') $products = $this->product->getPairs();
|
||||
$this->view->products = $this->products = $products;
|
||||
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName={$this->app->openApp}&activeMenu=testtask&projectID=$projectID")));
|
||||
}
|
||||
@@ -211,6 +213,10 @@ class testtask extends control
|
||||
{
|
||||
$this->loadModel('execution')->setMenu($executionID);
|
||||
}
|
||||
elseif($this->app->openApp == 'qa')
|
||||
{
|
||||
$this->loadModel('qa')->setMenu($this->products, $productID);
|
||||
}
|
||||
|
||||
/* Create testtask from testtask of test.*/
|
||||
$productID = $productID ? $productID : key($this->products);
|
||||
@@ -219,7 +225,6 @@ class testtask extends control
|
||||
|
||||
/* Set menu. */
|
||||
$productID = $this->product->saveState($productID, $this->products);
|
||||
$this->loadModel('qa')->setMenu($this->products, $productID);
|
||||
|
||||
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testtask->create;
|
||||
$this->view->position[] = html::a($this->createLink('testtask', 'browse', "productID=$productID"), $this->products[$productID]);
|
||||
|
||||
@@ -6,7 +6,31 @@
|
||||
*/
|
||||
function loadProductRelated()
|
||||
{
|
||||
loadExecutionBuilds(parseInt($('#execution').val()));
|
||||
loadExecutions($('#product').val());
|
||||
data = '<select id="build" name="build" class="form-control"></select>';
|
||||
$('#build').replaceWith(data);
|
||||
$('#build_chosen').remove();
|
||||
$("#build").chosen();
|
||||
$('#build').trigger("chosen:updated");
|
||||
}
|
||||
|
||||
/**
|
||||
* Load executions.
|
||||
*
|
||||
* @param int productID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function loadExecutions(productID)
|
||||
{
|
||||
link = createLink('product', 'ajaxGetExecutions', 'productID=' + productID + '&projectID=' + projectID);
|
||||
$.get(link, function(data)
|
||||
{
|
||||
if(!data) data = '<select id="execution" name="execution" class="form-control"></select>';
|
||||
$('#execution').replaceWith(data);
|
||||
$('#execution_chosen').remove();
|
||||
$("#execution").chosen();
|
||||
});
|
||||
}
|
||||
|
||||
/* If the mouse hover over the manage contacts button, give tip. */
|
||||
|
||||
@@ -72,7 +72,7 @@ class testtaskModel extends model
|
||||
->leftJoin(TABLE_PROJECTPRODUCT)->alias('t5')->on('t1.execution = t5.project and t1.product = t5.product')
|
||||
|
||||
->where('t1.deleted')->eq(0)
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('t1.project')->eq($this->session->project)->fi()
|
||||
->beginIF($this->config->systemMode == 'new' and $this->app->openApp != 'qa')->andWhere('t1.project')->eq($this->session->project)->fi()
|
||||
->andWhere('t1.auto')->ne('unit')
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t3.id')->in("0,{$this->app->user->view->sprints}")->fi()
|
||||
->beginIF($scopeAndStatus[0] == 'local')->andWhere('t1.product')->eq((int)$productID)->fi()
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php js::import($jsRoot . 'misc/date.js');?>
|
||||
<?php js::set('projectID', $this->session->project);?>
|
||||
<?php js::set('projectID', $projectID);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
|
||||
@@ -164,8 +164,8 @@ class upgrade extends control
|
||||
$mode = fixer::input('post')->get('mode');
|
||||
$this->loadModel('setting')->setItem('system.common.global.mode', $mode);
|
||||
|
||||
if($mode == 'old') $this->locate(inlink('afterExec', "fromVersion=$fromVersion"));
|
||||
if($mode == 'new') $this->locate(inlink('mergeTips'));
|
||||
if($mode == 'classic') $this->locate(inlink('afterExec', "fromVersion=$fromVersion"));
|
||||
if($mode == 'new') $this->locate(inlink('mergeTips'));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->upgrade->to15Guide;
|
||||
|
||||
@@ -1025,10 +1025,11 @@ class userModel extends model
|
||||
*/
|
||||
public function getExecutions($account, $type = 'execution', $status = 'all', $orderBy = 'id_desc', $pager = null)
|
||||
{
|
||||
if($type == 'execution') $type = 'sprint,stage';
|
||||
$projectType = $type == 'execution' ? 'sprint,stage' : $type;
|
||||
$myProjectsList = $this->dao->select('t1. *,t2. *')->from(TABLE_TEAM)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.root = t2.id')
|
||||
->where('t1.type')->in($type)
|
||||
->andWhere('t2.type')->in($projectType)
|
||||
->beginIF(strpos('doing|wait|suspended|closed', $status) !== false)->andWhere('status')->eq($status)->fi()
|
||||
->beginIF($status == 'done')->andWhere('status')->in('done,closed')->fi()
|
||||
->beginIF($status == 'undone')->andWhere('status')->notin('done,closed')->fi()
|
||||
|
||||
@@ -39,9 +39,12 @@
|
||||
$active = $methodName == 'testcase' ? ' btn-active-text' : '';
|
||||
common::printLink('user', 'testcase', "userID={$user->id}", $label, '', "class='btn btn-link $active'");
|
||||
|
||||
$label = "<span class='text'>{$lang->user->execution}</span>";
|
||||
$active = $methodName == 'execution' ? ' btn-active-text' : '';
|
||||
common::printLink('user', 'execution', "userID={$user->id}", $label, '', "class='btn btn-link $active'");
|
||||
if($this->config->systemMode == 'new')
|
||||
{
|
||||
$label = "<span class='text'>{$lang->user->execution}</span>";
|
||||
$active = $methodName == 'execution' ? ' btn-active-text' : '';
|
||||
common::printLink('user', 'execution', "userID={$user->id}", $label, '', "class='btn btn-link $active'");
|
||||
}
|
||||
|
||||
if(isset($this->config->maxVersion))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user