Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -80,10 +80,14 @@ $filter->product->project = new stdclass();
|
||||
$filter->program->default = new stdclass();
|
||||
$filter->program->pgmproject = new stdclass();
|
||||
$filter->program->prjbrowse = new stdclass();
|
||||
$filter->program->project = new stdclass();
|
||||
$filter->program->browse = new stdclass();
|
||||
$filter->program->export = new stdclass();
|
||||
$filter->program->pgmbrowse = new stdclass();
|
||||
$filter->program->export = new stdclass();
|
||||
$filter->program->ajaxgetpgmdropmenu = new stdclass();
|
||||
$filter->project->default = new stdclass();
|
||||
$filter->project->browse = new stdclass();
|
||||
$filter->project->story = new stdclass();
|
||||
$filter->project->export = new stdclass();
|
||||
$filter->project->task = new stdclass();
|
||||
|
||||
@@ -337,3 +337,6 @@ INSERT INTO `zt_lang` (`lang`, `module`, `section`, `key`, `value`, `system`) VA
|
||||
('zh-cn', 'custom', 'URSRList', '3', '{\"SRName\":\"\\u8f6f\\u9700\",\"URName\":\"\\u7528\\u9700\"}', '1'),
|
||||
('zh-cn', 'custom', 'URSRList', '4', '{\"SRName\":\"\\u6545\\u4e8b\",\"URName\":\"\\u53f2\\u8bd7\"}', '1'),
|
||||
('zh-cn', 'custom', 'URSRList', '5', '{\"SRName\":\"\\u9700\\u6c42\",\"URName\":\"\\u7528\\u6237\\u9700\\u6c42\"}', '1');
|
||||
|
||||
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', '', 'CRProduct', '1');
|
||||
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', '', 'CRExecution', '1');
|
||||
|
||||
@@ -4147,3 +4147,5 @@ INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('
|
||||
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'custom', '', 'URSR', '6');
|
||||
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'project', '', 'unitList', 'CNY,USD');
|
||||
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'project', '', 'defaultCurrency', 'CNY');
|
||||
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', '', 'CRProduct', '1');
|
||||
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', '', 'CRExecution', '1');
|
||||
|
||||
@@ -64,7 +64,7 @@ class automation extends control
|
||||
$this->automation->setMenu($this->products, $productID, $branch);
|
||||
|
||||
$this->view->title = $this->lang->automation->common;
|
||||
$this->view->position[] = $this->lang->automation->index;
|
||||
$this->view->position[] = $this->lang->automation->browse;
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->automation->common = '自动化测试';
|
||||
$lang->automation->index = '首页';
|
||||
$lang->automation->browse = '首页';
|
||||
|
||||
$lang->automation->description = '自动化测试解决方案';
|
||||
$lang->automation->ztf = 'ZTF自动化测试管理框架';
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<?php endif;?>
|
||||
<th class='text-left'><?php echo $lang->testtask->name;?></th>
|
||||
<?php if($longBlock):?>
|
||||
<th class='text-left'><?php echo $lang->testtask->project . '/' . $lang->testtask->build;?></th>
|
||||
<th class='text-left'><?php echo $lang->testtask->execution . '/' . $lang->testtask->build;?></th>
|
||||
<?php endif;?>
|
||||
<th class='w-date'><?php echo $lang->testtask->begin;?></th>
|
||||
<th class='w-date'><?php echo $lang->testtask->end;?></th>
|
||||
|
||||
+26
-22
@@ -13,8 +13,8 @@ class branchModel extends model
|
||||
{
|
||||
/**
|
||||
* Get name by id.
|
||||
*
|
||||
* @param int $branchID
|
||||
*
|
||||
* @param int $branchID
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
@@ -32,15 +32,19 @@ class branchModel extends model
|
||||
|
||||
/**
|
||||
* Get pairs.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param string $params
|
||||
*
|
||||
* @param int $productID
|
||||
* @param string $params
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getPairs($productID, $params = '')
|
||||
{
|
||||
$branches = $this->dao->select('*')->from(TABLE_BRANCH)->where('product')->eq($productID)->andWhere('deleted')->eq(0)->orderBy('`order`')->fetchPairs('id', 'name');
|
||||
$branches = $this->dao->select('*')->from(TABLE_BRANCH)
|
||||
->where('deleted')->eq(0)
|
||||
->beginIF($productID)->andWhere('product')->eq($productID)->fi()
|
||||
->orderBy('`order`')
|
||||
->fetchPairs('id', 'name');
|
||||
foreach($branches as $branchID => $branchName) $branches[$branchID] = htmlspecialchars_decode($branchName);
|
||||
|
||||
if(strpos($params, 'noempty') === false)
|
||||
@@ -55,8 +59,8 @@ class branchModel extends model
|
||||
|
||||
/**
|
||||
* Get all pairs.
|
||||
*
|
||||
* @param string $params
|
||||
*
|
||||
* @param string $params
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -85,9 +89,9 @@ class branchModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage branch
|
||||
*
|
||||
* @param int $productID
|
||||
* Manage branch
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
@@ -112,11 +116,11 @@ class branchModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Get branch group by products
|
||||
*
|
||||
* @param array $products
|
||||
* @param string $params
|
||||
* @param array $appendBranch
|
||||
* Get branch group by products
|
||||
*
|
||||
* @param array $products
|
||||
* @param string $params
|
||||
* @param array $appendBranch
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -152,8 +156,8 @@ class branchModel extends model
|
||||
|
||||
/**
|
||||
* Get product bype by branch.
|
||||
*
|
||||
* @param int $branchID
|
||||
*
|
||||
* @param int $branchID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -166,8 +170,8 @@ class branchModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort branch.
|
||||
*
|
||||
* Sort branch.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -183,8 +187,8 @@ class branchModel extends model
|
||||
|
||||
/**
|
||||
* Check branch data.
|
||||
*
|
||||
* @param int $branchID
|
||||
*
|
||||
* @param int $branchID
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
|
||||
+40
-4
@@ -54,6 +54,11 @@ class bug extends control
|
||||
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
|
||||
$this->lang->noMenuModule[] = $this->app->rawModule;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->lang->bug->menu = $this->lang->projectQa->menu;
|
||||
$this->lang->bug->subMenu = $this->lang->projectQa->subMenu;
|
||||
}
|
||||
|
||||
$this->view->products = $this->products = $this->product->getProductPairsByProject($this->projectID);
|
||||
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', 'fromModule=bug&moduleGroup=' . $this->lang->navGroup->bug . '&activeMenu=bug')));
|
||||
@@ -184,9 +189,7 @@ class bug extends control
|
||||
$this->config->bug->search['onMenuBar'] = 'yes';
|
||||
$this->bug->buildSearchForm($productID, $this->products, $queryID, $actionURL);
|
||||
|
||||
$showModule = !empty($this->config->datatable->bugBrowse->showModule) ? $this->config->datatable->bugBrowse->showModule : '';
|
||||
$this->view->modulePairs = $showModule ? $this->tree->getModulePairs($productID, 'bug', $showModule) : array();
|
||||
|
||||
$showModule = !empty($this->config->datatable->bugBrowse->showModule) ? $this->config->datatable->bugBrowse->showModule : '';
|
||||
$productName = $productID ? $this->products[$productID] : $this->lang->product->allProduct;
|
||||
|
||||
/* Set view. */
|
||||
@@ -211,13 +214,14 @@ class bug extends control
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->memberPairs = $this->user->getPairs('noletter|nodeleted');
|
||||
$this->view->branch = $branch;
|
||||
$this->view->branches = $this->loadModel('branch')->getPairs($productID);
|
||||
$this->view->branches = $this->loadModel('branch')->getPairs($productID, 'noempty');
|
||||
$this->view->executions = $executions;
|
||||
$this->view->plans = $this->loadModel('productplan')->getPairs($productID);
|
||||
$this->view->stories = $storyList;
|
||||
$this->view->tasks = $taskList;
|
||||
$this->view->setModule = true;
|
||||
$this->view->isProjectBug = ($productID and !$this->projectID) ? false : true;
|
||||
$this->view->modulePairs = $showModule ? $this->tree->getModulePairs($productID, 'bug', $showModule) : array();
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -1768,4 +1772,36 @@ class bug extends control
|
||||
|
||||
die(json_encode(array('modules' => $modules, 'categories' => $type, 'versions' => $builds, 'severities' => $severity, 'priorities' => $pri)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Drop menu page.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param string $module
|
||||
* @param string $method
|
||||
* @param string $extra
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetDropMenu($productID, $module, $method, $extra = '', $from = '')
|
||||
{
|
||||
if($from == 'qa')
|
||||
{
|
||||
$this->app->loadConfig('qa');
|
||||
foreach($this->config->qa->menuList as $menu) $this->lang->navGroup->$menu = 'qa';
|
||||
}
|
||||
|
||||
$products = $this->product->getProducts($this->session->PRJ, $this->config->CRProduct ? 'all' : 'noclosed', 'program desc, line desc, ');
|
||||
|
||||
$this->view->link = $this->product->getProductLink($module, $method, $extra);
|
||||
$this->view->productID = $productID;
|
||||
$this->view->module = $module;
|
||||
$this->view->method = $method;
|
||||
$this->view->extra = $extra;
|
||||
$this->view->products = $products;
|
||||
$this->view->projectID = $this->session->PRJ;
|
||||
$this->view->programs = $this->loadModel('program')->getPairs(true);
|
||||
$this->view->lines = $this->product->getLinePairs();
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
+11
-1
@@ -28,6 +28,7 @@ class bugModel extends model
|
||||
public function setMenu($products, $productID, $branch = 0, $moduleID = 0, $browseType = 'unclosed', $orderBy = '')
|
||||
{
|
||||
$this->loadModel('product')->setMenu($products, $productID, $branch, $moduleID, 'bug');
|
||||
if($this->lang->navGroup->testcase == 'project' and $this->app->methodName == 'browse') $products = array(0 => $this->lang->bug->allProduct) + $products;
|
||||
$selectHtml = $this->product->select($products, $productID, 'bug', 'browse', '', $branch, $moduleID, 'bug');
|
||||
|
||||
$pageNav = '';
|
||||
@@ -1246,11 +1247,20 @@ class bugModel extends model
|
||||
$productParams = $productID ? array($productID => $products[$productID]) : $products;
|
||||
$productParams = $productParams + array('all' => $this->lang->bug->allProduct);
|
||||
|
||||
/* Get all modules. */
|
||||
$modules = array();
|
||||
$this->loadModel('tree');
|
||||
if($productID) $modules = $this->tree->getOptionMenu($productID, 'bug', 0);
|
||||
if(!$productID)
|
||||
{
|
||||
foreach($products as $id => $productName) $modules += $this->tree->getOptionMenu($id, 'bug');
|
||||
}
|
||||
|
||||
$this->config->bug->search['actionURL'] = $actionURL;
|
||||
$this->config->bug->search['queryID'] = $queryID;
|
||||
$this->config->bug->search['params']['product']['values'] = $productParams;
|
||||
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getPairs($productID);
|
||||
$this->config->bug->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0);
|
||||
$this->config->bug->search['params']['module']['values'] = $modules;
|
||||
$this->config->bug->search['params']['execution']['values'] = $this->product->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID);
|
||||
$this->config->bug->search['params']['severity']['values'] = array(0 => '') + $this->lang->bug->severityList; //Fix bug #939.
|
||||
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($productID, 0, $params = '');
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php js::set('productID', $productID);?>
|
||||
<?php js::set('module', $module);?>
|
||||
<?php js::set('method', $method);?>
|
||||
<?php js::set('extra', $extra);?>
|
||||
<?php
|
||||
$iCharges = 0;
|
||||
$others = 0;
|
||||
$closeds = 0;
|
||||
$productNames = array();
|
||||
|
||||
foreach($products as $product)
|
||||
{
|
||||
if($product->status == 'normal' and $product->PO == $this->app->user->account) $iCharges++;
|
||||
if($product->status == 'normal' and !($product->PO == $this->app->user->account)) $others++;
|
||||
if($product->status == 'closed') $closeds++;
|
||||
$productNames[] = $product->name;
|
||||
}
|
||||
$productsPinYin = common::convert2Pinyin($productNames);
|
||||
$linkHtml = $this->product->setParamsForLink($module, $link, $projectID, 0);
|
||||
$productsHtml = html::a($linkHtml, $this->lang->bug->allProduct, '', "class='text-important' title='{$this->lang->bug->allProduct}' data-key='" . zget($productsPinYin, $this->lang->bug->allProduct, '') . "' data-group='project'");
|
||||
|
||||
foreach($products as $product)
|
||||
{
|
||||
$productName = $product->program ? zget($programs, $product->program, '') . '/' : '';
|
||||
$productName .= $product->line ? zget($lines, $product->line, '') . '/' . $product->name : $product->name;
|
||||
$objectID = ($product->type != 'platform' && $module == 'branch' && $method == 'manage') ? $productID : $product->id;
|
||||
$linkHtml = $this->product->setParamsForLink($module, $link, $projectID, $product->id);
|
||||
$productsHtml .= html::a($linkHtml, $productName, '', "class='text-important' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-group='project'");
|
||||
}
|
||||
?>
|
||||
<div class="table-row">
|
||||
<div class="table-col col-left">
|
||||
<div class='list-group'>
|
||||
<?php echo $productsHtml; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -23,7 +23,6 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
|
||||
?>
|
||||
<?php if($config->global->flow == 'full'):?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<?php if(!$isProjectBug):?>
|
||||
<div id="sidebarHeader">
|
||||
<div class="title">
|
||||
<?php
|
||||
@@ -36,32 +35,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php if($isProjectBug):?>
|
||||
<div class='btn-group'>
|
||||
<a href='javascript:;' class='btn btn-link btn-limit text-ellipsis' data-toggle='dropdown' style="max-width: 120px;"><span class='text' title='<?php echo $productName;?>'><?php echo $productName;?></span> <span class='caret'></span></a>
|
||||
<ul class='dropdown-menu' style='max-height:240px; max-width: 300px; overflow-y:auto'>
|
||||
<?php
|
||||
echo "<li>" . html::a($this->createLink('bug', 'browse', "productID=0"), $lang->product->all) . "</li>";
|
||||
foreach($projectProducts as $product)
|
||||
{
|
||||
echo "<li>" . html::a($this->createLink('bug', 'browse', "productID=$product->id&branch=0"), $product->name, '', "title='{$product->name}' class='text-ellipsis'") . "</li>";
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<a href="javascript:;" class="btn btn-link" style="padding-right: 0;"> <?php echo $moduleName;?> </a>
|
||||
<?php
|
||||
if($moduleID)
|
||||
{
|
||||
$removeLink = $browseType == 'bymodule' ? $this->createLink($this->app->rawModule, $this->app->rawMethod, "productID=$productID&branch=$branch&browseType=$browseType¶m=0&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("bugModule")';
|
||||
echo html::a($removeLink, "<i class='icon icon-sm icon-close'></i>", '', "class='text-muted btn btn-link' style='padding-left: 0;'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
$menus = customModel::getFeatureMenu($this->moduleName, $this->methodName);
|
||||
foreach($menus as $menuItem)
|
||||
@@ -195,7 +169,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
|
||||
<?php endif;?>
|
||||
<?php echo $moduleTree;?>
|
||||
<div class="text-center">
|
||||
<?php common::printLink('tree', 'browse', "productID=$productID&view=bug¤tModuleID=0&branch=0&from={$this->lang->navGroup->bug}", $lang->tree->manage, '', "class='btn btn-info btn-wide'");?>
|
||||
<?php if($productID) common::printLink('tree', 'browse', "productID=$productID&view=bug¤tModuleID=0&branch=0&from={$this->lang->navGroup->bug}", $lang->tree->manage, '', "class='btn btn-info btn-wide'");?>
|
||||
<hr class="space-sm" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -103,6 +103,7 @@ class caselibModel extends model
|
||||
{
|
||||
if($this->config->global->flow == 'full' and $this->lang->navGroup->testcase != 'qa') $this->loadModel('qa')->setSubMenu('caselib', $key, $libID);
|
||||
$replace = $libID;
|
||||
if($this->lang->navGroup->testcase == 'project' and $key == 'bug') $replace = 0;
|
||||
common::setMenuVars($this->lang->caselib->menu, $key, $replace);
|
||||
}
|
||||
|
||||
|
||||
@@ -177,12 +177,12 @@ $lang->project->dividerMenu = ',execution,programplan,doc,dynamic,';
|
||||
$lang->program->viewMenu = new stdclass();
|
||||
$lang->program->viewMenu->product = array('link' => 'Product|program|product|program=%s', 'alias' => 'view');
|
||||
$lang->program->viewMenu->project = array('link' => "Project|program|project|program=%s");
|
||||
$lang->program->viewMenu->personnel = array('link' => "Member|personnel|putinto|program=%s");
|
||||
$lang->program->viewMenu->personnel = array('link' => "Member|personnel|invest|program=%s");
|
||||
$lang->program->viewMenu->stakeholder = array('link' => "Stakeholder|program|stakeholder|program=%s", 'alias' => 'createstakeholder');
|
||||
|
||||
$lang->personnel = new stdClass();
|
||||
$lang->personnel->menu = new stdClass();
|
||||
$lang->personnel->menu->putinto = array('link' => "Investment|personnel|putinto|program=%s");
|
||||
$lang->personnel->menu->invest = array('link' => "Investment|personnel|invest|program=%s");
|
||||
$lang->personnel->menu->accessible = array('link' => "Accessible|personnel|accessible|program=%s");
|
||||
$lang->personnel->menu->whitelist = array('link' => "Whitelist|personnel|whitelist|program=%s", 'alias' => 'addwhitelist');
|
||||
|
||||
|
||||
@@ -177,12 +177,12 @@ $lang->project->dividerMenu = ',execution,programplan,doc,other,';
|
||||
$lang->program->viewMenu = new stdclass();
|
||||
$lang->program->viewMenu->product = array('link' => 'Product|program|product|program=%s', 'alias' => 'view');
|
||||
$lang->program->viewMenu->project = array('link' => "Project|program|project|program=%s");
|
||||
$lang->program->viewMenu->personnel = array('link' => "Member|personnel|putinto|program=%s");
|
||||
$lang->program->viewMenu->personnel = array('link' => "Member|personnel|invest|program=%s");
|
||||
$lang->program->viewMenu->stakeholder = array('link' => "Stakeholder|program|stakeholder|program=%s", 'alias' => 'createstakeholder');
|
||||
|
||||
$lang->personnel = new stdClass();
|
||||
$lang->personnel->menu = new stdClass();
|
||||
$lang->personnel->menu->putinto = array('link' => "Investment|personnel|putinto|program=%s");
|
||||
$lang->personnel->menu->invest = array('link' => "Investment|personnel|invest|program=%s");
|
||||
$lang->personnel->menu->accessible = array('link' => "Accessible|personnel|accessible|program=%s");
|
||||
$lang->personnel->menu->whitelist = array('link' => "Whitelist|personnel|whitelist|program=%s", 'alias' => 'addwhitelist');
|
||||
|
||||
|
||||
@@ -177,12 +177,12 @@ $lang->project->dividerMenu = ',execution,programplan,doc,dynamic,';
|
||||
$lang->program->viewMenu = new stdclass();
|
||||
$lang->program->viewMenu->product = array('link' => 'Product|program|product|program=%s', 'alias' => 'view');
|
||||
$lang->program->viewMenu->project = array('link' => "Project|program|project|program=%s");
|
||||
$lang->program->viewMenu->personnel = array('link' => "Member|personnel|putinto|program=%s");
|
||||
$lang->program->viewMenu->personnel = array('link' => "Member|personnel|invest|program=%s");
|
||||
$lang->program->viewMenu->stakeholder = array('link' => "Stakeholder|program|stakeholder|program=%s", 'alias' => 'createstakeholder');
|
||||
|
||||
$lang->personnel = new stdClass();
|
||||
$lang->personnel->menu = new stdClass();
|
||||
$lang->personnel->menu->putinto = array('link' => "Investment|personnel|putinto|program=%s");
|
||||
$lang->personnel->menu->invest = array('link' => "Investment|personnel|invest|program=%s");
|
||||
$lang->personnel->menu->accessible = array('link' => "Accessible|personnel|accessible|program=%s");
|
||||
$lang->personnel->menu->whitelist = array('link' => "Whitelist|personnel|whitelist|program=%s", 'alias' => 'addwhitelist');
|
||||
|
||||
|
||||
@@ -86,12 +86,13 @@ $lang->execution->menuOrder[15] = 'burn';
|
||||
$lang->execution->menuOrder[20] = 'view';
|
||||
$lang->execution->menuOrder[25] = 'story';
|
||||
$lang->execution->menuOrder[30] = 'qa';
|
||||
$lang->execution->menuOrder[35] = 'ci';
|
||||
$lang->execution->menuOrder[40] = 'doc';
|
||||
$lang->execution->menuOrder[45] = 'build';
|
||||
$lang->execution->menuOrder[50] = 'release';
|
||||
$lang->execution->menuOrder[55] = 'action';
|
||||
$lang->execution->menuOrder[60] = 'setting';
|
||||
$lang->execution->menuOrder[35] = 'repo';
|
||||
$lang->execution->menuOrder[40] = 'ci';
|
||||
$lang->execution->menuOrder[45] = 'doc';
|
||||
$lang->execution->menuOrder[50] = 'build';
|
||||
$lang->execution->menuOrder[55] = 'release';
|
||||
$lang->execution->menuOrder[60] = 'action';
|
||||
$lang->execution->menuOrder[65] = 'setting';
|
||||
|
||||
$lang->task->menuOrder = $lang->execution->menuOrder;
|
||||
$lang->build->menuOrder = $lang->execution->menuOrder;
|
||||
|
||||
@@ -177,12 +177,12 @@ $lang->project->dividerMenu = ',execution,programplan,doc,dynamic,';
|
||||
$lang->program->viewMenu = new stdclass();
|
||||
$lang->program->viewMenu->product = array('link' => 'Product|program|product|program=%s', 'alias' => 'view');
|
||||
$lang->program->viewMenu->project = array('link' => "Project|program|project|program=%s");
|
||||
$lang->program->viewMenu->personnel = array('link' => "Member|personnel|putinto|program=%s");
|
||||
$lang->program->viewMenu->personnel = array('link' => "Member|personnel|invest|program=%s");
|
||||
$lang->program->viewMenu->stakeholder = array('link' => "Stakeholder|program|stakeholder|program=%s", 'alias' => 'createstakeholder');
|
||||
|
||||
$lang->personnel = new stdClass();
|
||||
$lang->personnel->menu = new stdClass();
|
||||
$lang->personnel->menu->putinto = array('link' => "Investment|personnel|putinto|program=%s");
|
||||
$lang->personnel->menu->invest = array('link' => "Investment|personnel|invest|program=%s");
|
||||
$lang->personnel->menu->accessible = array('link' => "Accessible|personnel|accessible|program=%s");
|
||||
$lang->personnel->menu->whitelist = array('link' => "Whitelist|personnel|whitelist|program=%s", 'alias' => 'addwhitelist');
|
||||
|
||||
|
||||
@@ -177,12 +177,12 @@ $lang->project->dividerMenu = ',execution,programplan,doc,dynamic,';
|
||||
$lang->program->viewMenu = new stdclass();
|
||||
$lang->program->viewMenu->product = array('link' => '产品|program|product|program=%s', 'alias' => 'view');
|
||||
$lang->program->viewMenu->project = array('link' => "项目|program|project|program=%s");
|
||||
$lang->program->viewMenu->personnel = array('link' => "人员|personnel|putinto|program=%s");
|
||||
$lang->program->viewMenu->personnel = array('link' => "人员|personnel|invest|program=%s");
|
||||
$lang->program->viewMenu->stakeholder = array('link' => "干系人|program|stakeholder|program=%s", 'alias' => 'createstakeholder');
|
||||
|
||||
$lang->personnel = new stdClass();
|
||||
$lang->personnel->menu = new stdClass();
|
||||
$lang->personnel->menu->putinto = array('link' => "投入人员|personnel|putinto|program=%s");
|
||||
$lang->personnel->menu->invest = array('link' => "投入人员|personnel|invest|program=%s");
|
||||
$lang->personnel->menu->accessible = array('link' => "可访问人员|personnel|accessible|program=%s");
|
||||
$lang->personnel->menu->whitelist = array('link' => "白名单|personnel|whitelist|program=%s", 'alias' => 'addwhitelist');
|
||||
|
||||
@@ -335,25 +335,34 @@ $lang->story->menu = $lang->product->menu;
|
||||
|
||||
/* 执行视图菜单设置。*/
|
||||
$lang->execution = new stdclass();
|
||||
$lang->execution->homeMenu = new stdclass();
|
||||
$lang->execution->homeMenu->index = '仪表盘|execution|index|';
|
||||
$lang->execution->homeMenu->list = array('link' => '执行|execution|all|', 'alias' => 'batchedit');
|
||||
|
||||
$lang->execution->menu = new stdclass();
|
||||
$lang->execution->menu->index = '仪表盘|execution|index|';
|
||||
$lang->execution->menu->list = '执行|execution|all|';
|
||||
$lang->execution->menu->task = array('link' => '任务|execution|task|executionID=%s', 'subModule' => 'task,tree', 'alias' => 'importtask,importbug');
|
||||
$lang->execution->menu->kanban = array('link' => '看板|execution|kanban|executionID=%s');
|
||||
$lang->execution->menu->burn = array('link' => '燃尽图|execution|burn|executionID=%s');
|
||||
$lang->execution->menu->view = array('link' => '视图|execution|grouptask|executionID=%s', 'alias' => 'grouptask,tree', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->execution->menu->story = array('link' => "{$lang->SRCommon}|execution|story|executionID=%s", 'subModule' => 'story', 'alias' => 'linkstory,storykanban');
|
||||
$lang->execution->menu->qa = array('link' => '测试|execution|qa|', 'alias' => 'qa,bug,testcase,testtask,testreport');
|
||||
$lang->execution->menu->repo = array('link' => '代码|repo|browse|projectID=%s');
|
||||
$lang->execution->menu->doc = array('link' => '文档|doc|objectLibs|type=execution&objectID=%s&from=execution', 'subModule' => 'doc');
|
||||
$lang->execution->menu->build = array('link' => '版本|execution|build|executionID=%s', 'subModule' => 'build');
|
||||
$lang->execution->menu->release = array('link' => '发布|projectrelease|browse|project=%s');
|
||||
$lang->execution->menu->action = array('link' => '动态|execution|dynamic|executionID=%s');
|
||||
$lang->execution->menu->setting = array('link' => '设置|execution|view|executionID=%s', 'subModule' => 'personnel', 'alias' => 'edit,manageproducts,team,whitelist,addwhitelist,managemembers', 'class' => 'dropdown dropdown-hover');
|
||||
|
||||
$lang->execution->viewMenu = new stdclass();
|
||||
$lang->execution->viewMenu->task = array('link' => '任务|execution|task|executionID=%s', 'subModule' => 'task,tree', 'alias' => 'importtask,importbug');
|
||||
$lang->execution->viewMenu->kanban = array('link' => '看板|execution|kanban|executionID=%s');
|
||||
$lang->execution->viewMenu->burn = array('link' => '燃尽图|execution|burn|executionID=%s');
|
||||
$lang->execution->viewMenu->view = array('link' => '视图|execution|grouptask|executionID=%s', 'alias' => 'grouptask,tree', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->execution->viewMenu->story = array('link' => "{$lang->SRCommon}|execution|story|executionID=%s", 'subModule' => 'story', 'alias' => 'linkstory,storykanban');
|
||||
$lang->execution->viewMenu->qa = array('link' => '测试|qa|index|');
|
||||
$lang->execution->viewMenu->doc = array('link' => '文档|doc|objectLibs|type=execution&objectID=%s&from=execution', 'subModule' => 'doc');
|
||||
$lang->execution->viewMenu->build = array('link' => '版本|execution|build|executionID=%s', 'subModule' => 'build');
|
||||
$lang->execution->viewMenu->action = array('link' => '动态|execution|dynamic|executionID=%s');
|
||||
$lang->execution->viewMenu->setting = array('link' => '设置|execution|view|executionID=%s', 'subModule' => 'personnel', 'alias' => 'edit', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->execution->viewMenu->groupTask = '分组视图|execution|grouptask|executionID=%s';
|
||||
$lang->execution->viewMenu->tree = '树状图|execution|tree|executionID=%s';
|
||||
|
||||
$lang->execution->groupMenu = new stdclass();
|
||||
$lang->execution->groupMenu->groupTask = '分组视图|execution|grouptask|executionID={EXECUTION}';
|
||||
$lang->execution->groupMenu->tree = '树状图|execution|tree|executionID={EXECUTION}';
|
||||
$lang->execution->qaMenu = new stdclass();
|
||||
$lang->execution->qaMenu->qa = array('link' => '仪表盘|execution|qa|executionID=%s');
|
||||
$lang->execution->qaMenu->bug = array('link' => 'Bug|execution|bug|executionID=%s');
|
||||
$lang->execution->qaMenu->testcase = array('link' => '用例|execution|testcase|executionID=%s');
|
||||
$lang->execution->qaMenu->testtask = array('link' => '测试单|execution|testtask|executionID=%s');
|
||||
$lang->execution->qaMenu->testreport = array('link' => '报告|execution|testreport|exeutionID=%s');
|
||||
|
||||
$lang->execution->settingMenu = new stdclass();
|
||||
$lang->execution->settingMenu = new stdclass();
|
||||
@@ -381,9 +390,9 @@ $lang->qa->menu->automation = array('link' => '自动化|automation|browse|produ
|
||||
|
||||
$lang->qa->subMenu = new stdclass();
|
||||
$lang->qa->subMenu->testcase = new stdclass();
|
||||
$lang->qa->subMenu->testcase->feature = array('link' => '功能测试|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importfromlib', 'subModule' => 'tree,story');
|
||||
$lang->qa->subMenu->testcase->feature = array('link' => '功能测试|testcase|browse|productID=%s', 'subModule' => 'testcase,tree,story');
|
||||
$lang->qa->subMenu->testcase->unit = array('link' => '单元测试|testtask|browseUnits|productID=%s', 'alias' => 'browseunits');
|
||||
$lang->qa->subMenu->testcase->testsuite = array('link' => '套件|testsuite|browse|productID=%s', 'alias' => 'view,create,edit,linkcase');
|
||||
$lang->qa->subMenu->testcase->testsuite = array('link' => '套件|testsuite|browse|productID=%s', 'subModule' => 'testsuite');
|
||||
$lang->qa->subMenu->testcase->caselib = array('link' => '用例库|caselib|browse|libID=0');
|
||||
|
||||
$lang->qa->subMenu->testtask = new stdclass();
|
||||
@@ -895,13 +904,25 @@ $lang->menu->scrum->index = '仪表盘|project|index|project={PROJECT}'
|
||||
$lang->menu->scrum->execution = "$lang->executionCommon|execution|all|status=all&projectID={PROJECT}&from=project";
|
||||
$lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|projectstory|story', 'alias' => 'story,track');
|
||||
$lang->menu->scrum->doc = '文档|doc|index|';
|
||||
$lang->menu->scrum->qa = '测试|qa|index';
|
||||
$lang->menu->scrum->qa = array('link' => '测试|qa|index', 'subModule' => 'testcase,testtask');
|
||||
$lang->menu->scrum->ci = '代码|repo|browse';
|
||||
$lang->menu->scrum->projectbuild = array('link' => '版本|projectbuild|browse|project={PROJECT}');
|
||||
$lang->menu->scrum->projectrelease = array('link' => '发布|projectrelease|browse|project={PROJECT}');
|
||||
$lang->menu->scrum->dynamic = array('link' => '动态|project|dynamic|project={PROJECT}');
|
||||
$lang->menu->scrum->projectsetting = array('link' => '设置|project|view|project={PROJECT}', 'subModule' => 'stakeholder', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
|
||||
|
||||
$lang->projectQa = new stdclass();
|
||||
$lang->projectQa->menu = new stdclass();
|
||||
$lang->projectQa->menu->index = array('link' => '仪表盘|qa|index');
|
||||
$lang->projectQa->menu->bug = array('link' => 'Bug|bug|browse|productID=%s', 'subModule' => 'bug');
|
||||
$lang->projectQa->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'subModule' => 'testsuite,testcase,caselib');
|
||||
$lang->projectQa->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s', 'subModule' => 'testtask', 'class' => 'dropdown dropdown-hover');
|
||||
|
||||
$lang->projectQa->subMenu = new stdclass();
|
||||
$lang->projectQa->subMenu->testtask = new stdclass();
|
||||
$lang->projectQa->subMenu->testtask->testtask = array('link' => '测试单|testtask|browse|productID=%s');
|
||||
$lang->projectQa->subMenu->testtask->report = array('link' => '报告|testreport|browse|productID=%s');
|
||||
|
||||
$lang->scrum = new stdclass();
|
||||
$lang->scrum->setMenu = new stdclass();
|
||||
$lang->scrum->setMenu->view = array('link' => '概况|project|view|project={PROJECT}', 'alias' => 'edit');
|
||||
|
||||
@@ -186,7 +186,7 @@ $lang->personnel = new stdClass();
|
||||
$lang->personnel->menu = new stdClass();
|
||||
$lang->personnel->menu->accessible = array('link' => "可訪問人員|personnel|accessible|program=%s");
|
||||
$lang->personnel->menu->whitelist = array('link' => "白名單|personnel|whitelist|program=%s", 'alias' => 'addwhitelist');
|
||||
$lang->personnel->menu->putinto = array('link' => "投入人員|personnel|putinto|program=%s");
|
||||
$lang->personnel->menu->invest = array('link' => "投入人員|personnel|invest|program=%s");
|
||||
|
||||
/* Scrum menu. */
|
||||
$lang->product = new stdclass();
|
||||
|
||||
@@ -782,8 +782,9 @@ class commonModel extends model
|
||||
}
|
||||
if($group == 'execution')
|
||||
{
|
||||
if(in_array($methodName, array('grouptask', 'tree'))) $lang->execution->menu = self::processMenuVars($lang->execution->groupMenu);
|
||||
if(in_array($methodName, array('view', 'manageproducts', 'team', 'whitelist'))) $lang->execution->menu = self::processMenuVars($lang->execution->settingMenu);
|
||||
if(in_array($methodName, array('grouptask', 'tree'))) $lang->execution->menu = $lang->execution->viewMenu;
|
||||
if(in_array($methodName, array('qa', 'bug', 'testtask', 'testcase', 'testreport'))) $lang->execution->menu = $lang->execution->qaMenu;
|
||||
if(in_array($methodName, array('view', 'manageproducts', 'team', 'whitelist', 'edit', 'managemembers', 'addwhitelist'))) $lang->execution->menu = self::processMenuVars($lang->execution->settingMenu);
|
||||
}
|
||||
if(strpos('qa|bug|testcase|testreport|testtask', $moduleName) !== false and $group == 'project')
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ $app->loadLang('task');
|
||||
$config->execution->task = new stdclass();
|
||||
$config->execution->create = new stdclass();
|
||||
$config->execution->edit = new stdclass();
|
||||
$config->execution->create->requiredFields = 'name,code,begin,end';
|
||||
$config->execution->create->requiredFields = 'project,name,code,begin,end';
|
||||
$config->execution->edit->requiredFields = 'name,code,begin,end';
|
||||
|
||||
$config->execution->customBatchEditFields = 'days,type,teamname,status,desc,PO,QD,PM,RD';
|
||||
|
||||
@@ -59,6 +59,7 @@ class execution extends control
|
||||
*/
|
||||
public function index($locate = 'auto', $executionID = 0)
|
||||
{
|
||||
$this->lang->execution->menu = $this->lang->execution->homeMenu;
|
||||
if($locate == 'yes') $this->locate($this->createLink('execution', 'task'));
|
||||
|
||||
$this->commonAction($executionID);
|
||||
@@ -265,9 +266,7 @@ class execution extends control
|
||||
*/
|
||||
public function grouptask($executionID = 0, $groupBy = 'story', $filter = '')
|
||||
{
|
||||
$moduleIndex = array_search('execution', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
|
||||
$this->showModuleMenu();
|
||||
$execution = $this->commonAction($executionID);
|
||||
$executionID = $execution->id;
|
||||
|
||||
@@ -819,6 +818,21 @@ class execution extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Exectuion qa dashboard.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function qa($executionID = 0)
|
||||
{
|
||||
$this->showModuleMenu();
|
||||
$this->commonAction($executionID);
|
||||
$this->view->title = $this->lang->execution->qa;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Browse bugs of a execution.
|
||||
*
|
||||
@@ -835,6 +849,8 @@ class execution extends control
|
||||
*/
|
||||
public function bug($executionID = 0, $orderBy = 'status,id_desc', $build = 0, $type = 'all', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$this->showModuleMenu();
|
||||
|
||||
/* Load these two models. */
|
||||
$this->loadModel('bug');
|
||||
$this->loadModel('user');
|
||||
@@ -893,6 +909,33 @@ class execution extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execution case list.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function testcase($executionID = 0, $type = 'all', $param = 0, $productID = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$this->loadModel('testcase');
|
||||
$this->showModuleMenu();
|
||||
$this->commonAction($executionID);
|
||||
|
||||
$products = $this->execution->getProducts($executionID, false);
|
||||
if(empty($products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=testcase")));
|
||||
|
||||
$productID = $this->loadModel('product')->saveState($productID, $products);
|
||||
$this->product->setMenu($products, $productID);
|
||||
|
||||
$this->view->title = $this->lang->execution->testcase;
|
||||
$this->view->executionID = $executionID;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->execution = $this->execution->getByID($executionID);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Browse builds of a execution.
|
||||
*
|
||||
@@ -967,6 +1010,8 @@ class execution extends control
|
||||
*/
|
||||
public function testtask($executionID = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$this->showModuleMenu();
|
||||
|
||||
$this->loadModel('testtask');
|
||||
/* Save session. */
|
||||
$this->session->set('testtaskList', $this->app->getURI(true));
|
||||
@@ -1136,8 +1181,8 @@ class execution extends control
|
||||
die(js::confirm($this->lang->execution->importPlanStory, inlink('create', "productID=&executionID=$executionID©ExecutionID=&planID=$planID&confirm=yes"), inlink('create', "productID=&executionID=$executionID"), 'parent', 'parent'));
|
||||
}
|
||||
}
|
||||
$this->view->title = $this->lang->execution->tips;
|
||||
$this->view->tips = $this->fetch('execution', 'tips', "executionID=$executionID");
|
||||
$this->view->title = $this->lang->execution->tips;
|
||||
$this->view->tips = $this->fetch('execution', 'tips', "executionID=$executionID");
|
||||
$this->view->executionID = $executionID;
|
||||
$this->display();
|
||||
exit;
|
||||
@@ -1180,7 +1225,7 @@ class execution extends control
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$executionID = $copyExecutionID == '' ? $this->execution->create() : $this->execution->create($copyExecutionID);
|
||||
$executionID = $this->execution->create($copyExecutionID);
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$this->execution->updateProducts($executionID);
|
||||
@@ -1226,7 +1271,7 @@ class execution extends control
|
||||
|
||||
$this->view->title = $this->lang->execution->create;
|
||||
$this->view->position[] = $this->view->title;
|
||||
$this->view->executions = array('' => '') + $this->executions;
|
||||
$this->view->executions = array('' => '') + $this->execution->getList();
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->allProducts = array(0 => '') + $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
|
||||
$this->view->acl = $acl;
|
||||
@@ -1234,6 +1279,7 @@ class execution extends control
|
||||
$this->view->name = $name;
|
||||
$this->view->code = $code;
|
||||
$this->view->team = $team;
|
||||
$this->view->allProjects = array('' => '') + $this->project->getPairsByModel();
|
||||
$this->view->executionID = $executionID;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->products = $products;
|
||||
@@ -1259,6 +1305,8 @@ class execution extends control
|
||||
*/
|
||||
public function edit($executionID, $action = 'edit', $extra = '')
|
||||
{
|
||||
$this->showModuleMenu();
|
||||
|
||||
/* Load language files and get browseExecutionLink. */
|
||||
$this->app->loadLang('program');
|
||||
$this->app->loadLang('stage');
|
||||
@@ -1396,6 +1444,8 @@ class execution extends control
|
||||
*/
|
||||
public function batchEdit($executionID = 0)
|
||||
{
|
||||
$this->lang->execution->menu = $this->lang->execution->homeMenu;
|
||||
|
||||
$this->app->loadLang('stage');
|
||||
|
||||
if($this->post->names)
|
||||
@@ -1651,8 +1701,7 @@ class execution extends control
|
||||
*/
|
||||
public function view($executionID)
|
||||
{
|
||||
$moduleIndex = array_search('execution', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
$this->showModuleMenu();
|
||||
|
||||
$execution = $this->execution->getById($executionID, true);
|
||||
if(empty($execution) || strpos('stage,sprint', $execution->type) === false) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
@@ -1767,8 +1816,7 @@ class execution extends control
|
||||
*/
|
||||
public function tree($executionID, $type = 'task')
|
||||
{
|
||||
$moduleIndex = array_search('execution', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
$this->showModuleMenu();
|
||||
|
||||
$this->execution->setMenu($this->executions, $executionID);
|
||||
$execution = $this->loadModel('execution')->getById($executionID);
|
||||
@@ -2087,6 +2135,8 @@ class execution extends control
|
||||
*/
|
||||
public function manageMembers($executionID = 0, $team2Import = 0, $dept = 0)
|
||||
{
|
||||
$this->showModuleMenu();
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->execution->manageMembers($executionID);
|
||||
@@ -2526,7 +2576,7 @@ class execution extends control
|
||||
$executionsPinYin = common::convert2Pinyin($executionsName);
|
||||
foreach($executions as $execution)
|
||||
{
|
||||
$link = helper::createLink('execution', 'task', 'executionID=' . $execution->id, '', false, $execution->execution);
|
||||
$link = helper::createLink('execution', 'task', 'executionID=' . $execution->id, '', false, $execution->project);
|
||||
$execution->code = empty($execution->code) ? $execution->name : $execution->code;
|
||||
$dataKey = 'date-key="' . zget($executionsPinYin, $execution->name, $execution->name) . '"';
|
||||
$class = "class='search-list-item $color' title='$execution->name' $dataKey";
|
||||
@@ -2596,6 +2646,8 @@ class execution extends control
|
||||
*/
|
||||
public function all($status = 'all', $projectID = 0, $from = 'execution', $orderBy = 'id_desc', $productID = 0, $recTotal = 0, $recPerPage = 10, $pageID = 1)
|
||||
{
|
||||
$this->lang->execution->menu = $this->lang->execution->homeMenu;
|
||||
|
||||
$this->app->loadLang('my');
|
||||
$this->app->loadLang('product');
|
||||
$this->app->loadLang('programplan');
|
||||
@@ -2661,6 +2713,8 @@ class execution extends control
|
||||
*/
|
||||
public function addWhitelist($executionID = 0, $deptID = 0)
|
||||
{
|
||||
$this->showModuleMenu();
|
||||
|
||||
/* use first execution if executionID does not exist. */
|
||||
if(!isset($this->executions[$executionID])) $executionID = key($this->executions);
|
||||
|
||||
@@ -2678,9 +2732,9 @@ class execution extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function unbindWhielist($id = 0, $confirm = 'no')
|
||||
public function unbindWhitelist($id = 0, $confirm = 'no')
|
||||
{
|
||||
echo $this->fetch('personnel', 'unbindWhielist', "id=$id&confirm=$confirm");
|
||||
echo $this->fetch('personnel', 'unbindWhitelist', "id=$id&confirm=$confirm");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2934,4 +2988,16 @@ class execution extends control
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Show module menu for some module.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function showModuleMenu()
|
||||
{
|
||||
$moduleIndex = array_search('execution', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
function setCopyProject(projectID)
|
||||
function setCopyProject(executionID)
|
||||
{
|
||||
location.href = createLink('project', 'create', 'productID=&projectID=0©ProjectID=' + projectID);
|
||||
location.href = createLink('execution', 'create', 'productID=&executionID=0©ExecutionID=' + executionID);
|
||||
}
|
||||
|
||||
$(function()
|
||||
|
||||
@@ -16,6 +16,7 @@ $lang->execution->id = $lang->executionCommon . ' ID';
|
||||
$lang->execution->type = 'Typ';
|
||||
$lang->execution->name = 'Name';
|
||||
$lang->execution->code = 'Alias';
|
||||
$lang->execution->project = 'Project';
|
||||
$lang->execution->statge = 'Stage';
|
||||
$lang->execution->pri = 'Priorität';
|
||||
$lang->execution->openedBy = 'OpenedBy';
|
||||
@@ -42,7 +43,6 @@ $lang->execution->PO = 'PO';
|
||||
$lang->execution->PM = 'PM';
|
||||
$lang->execution->QD = 'QS Manager';
|
||||
$lang->execution->RD = 'Release Manager';
|
||||
$lang->execution->qa = 'Test';
|
||||
$lang->execution->release = 'Release';
|
||||
$lang->execution->acl = 'Zugriffskontrolle';
|
||||
$lang->execution->teamname = 'Team Name';
|
||||
@@ -51,7 +51,7 @@ $lang->execution->orderAB = "Rank";
|
||||
$lang->execution->products = "Verknüpfung {$lang->productCommon}";
|
||||
$lang->execution->whitelist = 'Whitelist';
|
||||
$lang->execution->addWhitelist = 'Add Whitelist';
|
||||
$lang->execution->unbindWhielist = 'Remove Whitelist';
|
||||
$lang->execution->unbindWhitelist = 'Remove Whitelist';
|
||||
$lang->execution->totalEstimate = 'Geplant';
|
||||
$lang->execution->totalConsumed = 'Genutzt';
|
||||
$lang->execution->totalLeft = 'Rest';
|
||||
@@ -142,6 +142,7 @@ $lang->execution->index = "Home";
|
||||
$lang->execution->task = 'Aufgaben';
|
||||
$lang->execution->groupTask = 'Nach Gruppen';
|
||||
$lang->execution->story = 'Storys';
|
||||
$lang->execution->qa = 'QA';
|
||||
$lang->execution->bug = 'Bugs';
|
||||
$lang->execution->dynamic = 'Verlauf';
|
||||
$lang->execution->latestDynamic = 'Letzter Verlauf';
|
||||
|
||||
@@ -16,6 +16,7 @@ $lang->execution->id = $lang->executionCommon . ' ID';
|
||||
$lang->execution->type = 'Type';
|
||||
$lang->execution->name = "{$lang->executionCommon} Name";
|
||||
$lang->execution->code = 'Code';
|
||||
$lang->execution->project = 'Project';
|
||||
$lang->execution->statge = 'Stage';
|
||||
$lang->execution->pri = 'Priority';
|
||||
$lang->execution->openedBy = 'OpenedBy';
|
||||
@@ -42,7 +43,6 @@ $lang->execution->PO = "{$lang->executionCommon} Owner";
|
||||
$lang->execution->PM = "{$lang->executionCommon} Manager";
|
||||
$lang->execution->QD = 'Test Manager';
|
||||
$lang->execution->RD = 'Release Manager';
|
||||
$lang->execution->qa = 'Test';
|
||||
$lang->execution->release = 'Release';
|
||||
$lang->execution->acl = 'Access Control';
|
||||
$lang->execution->teamname = 'Team Name';
|
||||
@@ -51,7 +51,7 @@ $lang->execution->orderAB = "Rank";
|
||||
$lang->execution->products = "Link {$lang->productCommon}";
|
||||
$lang->execution->whitelist = 'Whitelist';
|
||||
$lang->execution->addWhitelist = 'Add Whitelist';
|
||||
$lang->execution->unbindWhielist = 'Remove Whitelist';
|
||||
$lang->execution->unbindWhitelist = 'Remove Whitelist';
|
||||
$lang->execution->totalEstimate = 'Estimates';
|
||||
$lang->execution->totalConsumed = 'Cost';
|
||||
$lang->execution->totalLeft = 'Left';
|
||||
@@ -146,6 +146,7 @@ $lang->execution->index = "{$lang->executionCommon} Home";
|
||||
$lang->execution->task = 'Task List';
|
||||
$lang->execution->groupTask = 'Group View';
|
||||
$lang->execution->story = 'Story List';
|
||||
$lang->execution->qa = 'QA';
|
||||
$lang->execution->bug = 'Bug List';
|
||||
$lang->execution->dynamic = 'Dynamics';
|
||||
$lang->execution->latestDynamic = 'Dynamics';
|
||||
@@ -179,12 +180,13 @@ $lang->execution->treeAction = "{$lang->executionCommon} Tree View";
|
||||
$lang->execution->exportAction = "Export {$lang->executionCommon}";
|
||||
$lang->execution->computeBurnAction = "Update Burndown";
|
||||
$lang->execution->create = "Create {$lang->executionCommon}";
|
||||
$lang->execution->createExec = "Create execution";
|
||||
$lang->execution->copy = "Copy {$lang->executionCommon}";
|
||||
$lang->execution->delete = "Delete {$lang->executionCommon}";
|
||||
$lang->execution->browse = "{$lang->executionCommon} List";
|
||||
$lang->execution->list = "{$lang->executionCommon} List";
|
||||
$lang->execution->edit = "Edit {$lang->executionCommon}";
|
||||
$lang->execution->batchEdit = "Batch Edit";
|
||||
$lang->execution->batchEdit = "Edit";
|
||||
$lang->execution->manageMembers = 'Manage Team';
|
||||
$lang->execution->unlinkMember = 'Remove Member';
|
||||
$lang->execution->unlinkStory = 'Unlink Story';
|
||||
@@ -194,6 +196,7 @@ $lang->execution->importTask = 'Transfer Task';
|
||||
$lang->execution->importPlanStories = 'Link Stories By Plan';
|
||||
$lang->execution->importBug = 'Import Bug';
|
||||
$lang->execution->updateOrder = "Rank {$lang->executionCommon}";
|
||||
$lang->execution->execUpdateOrder = "Rank execution";
|
||||
$lang->execution->tree = 'Tree';
|
||||
$lang->execution->treeTask = 'Show Task Only';
|
||||
$lang->execution->treeStory = 'Show Story Only';
|
||||
@@ -306,12 +309,7 @@ $lang->execution->fixFirstWithLeft = 'Update hours left too';
|
||||
$lang->execution->unfinishedExecution = "This {$lang->executionCommon} has ";
|
||||
$lang->execution->unfinishedTask = "[%s] unfinished tasks. ";
|
||||
$lang->execution->unresolvedBug = "[%s] unresolved bugs. ";
|
||||
|
||||
$lang->execution->action = new stdclass();
|
||||
$lang->execution->action->opened = '$date, created by <strong>$actor</strong> . $extra' . "\n";
|
||||
$lang->execution->action->managed = '$date, managed by <strong>$actor</strong> . $extra' . "\n";
|
||||
$lang->execution->action->edited = '$date, edited by <strong>$actor</strong> . $extra' . "\n";
|
||||
$lang->execution->action->extra = "The linked {$lang->productCommon}s are %s.";
|
||||
$lang->execution->projectNotEmpty = 'Project cannot be empty.';
|
||||
|
||||
/* Statistics. */
|
||||
$lang->execution->charts = new stdclass();
|
||||
|
||||
@@ -42,7 +42,6 @@ $lang->execution->PO = "Propriétaire {$lang->executionCommon}";
|
||||
$lang->execution->PM = "Directeur {$lang->executionCommon}";
|
||||
$lang->execution->QD = 'Quality Manager';
|
||||
$lang->execution->RD = 'Release Manager';
|
||||
$lang->execution->qa = 'QA';
|
||||
$lang->execution->release = 'Release';
|
||||
$lang->execution->acl = "Contrôle d'accès";
|
||||
$lang->execution->teamname = "Nom de l'équipe";
|
||||
@@ -51,7 +50,7 @@ $lang->execution->orderAB = "Rang";
|
||||
$lang->execution->products = "{$lang->productCommon} liés";
|
||||
$lang->execution->whitelist = 'Liste Blanche';
|
||||
$lang->execution->addWhitelist = 'Add Whitelist';
|
||||
$lang->execution->unbindWhielist = 'Remove Whitelist';
|
||||
$lang->execution->unbindWhitelist = 'Remove Whitelist';
|
||||
$lang->execution->totalEstimate = 'Estimé';
|
||||
$lang->execution->totalConsumed = 'Coût';
|
||||
$lang->execution->totalLeft = 'Reste';
|
||||
@@ -142,6 +141,7 @@ $lang->execution->index = "Accueil {$lang->executionCommon}";
|
||||
$lang->execution->task = 'Liste Tâches';
|
||||
$lang->execution->groupTask = 'Vision Groupée';
|
||||
$lang->execution->story = 'Liste Stories';
|
||||
$lang->execution->qa = 'QA';
|
||||
$lang->execution->bug = 'Liste Bugs';
|
||||
$lang->execution->dynamic = 'Historique';
|
||||
$lang->execution->latestDynamic = 'Historique';
|
||||
|
||||
@@ -51,7 +51,7 @@ $lang->execution->orderAB = "Đánh giá";
|
||||
$lang->execution->products = "Liên kết {$lang->productCommon}";
|
||||
$lang->execution->whitelist = 'Danh sách trắng';
|
||||
$lang->execution->addWhitelist = 'Add Whitelist';
|
||||
$lang->execution->unbindWhielist = 'Remove Whitelist';
|
||||
$lang->execution->unbindWhitelist = 'Remove Whitelist';
|
||||
$lang->execution->totalEstimate = 'Dự tính';
|
||||
$lang->execution->totalConsumed = 'Đã làm';
|
||||
$lang->execution->totalLeft = 'Còn';
|
||||
@@ -142,6 +142,7 @@ $lang->execution->index = "{$lang->executionCommon} Home";
|
||||
$lang->execution->task = 'Danh sách nhiệm vụ';
|
||||
$lang->execution->groupTask = 'Xem kiểu nhóm';
|
||||
$lang->execution->story = 'Danh sách câu chuyện';
|
||||
$lang->execution->qa = 'QA';
|
||||
$lang->execution->bug = 'Danh sách Bug';
|
||||
$lang->execution->dynamic = 'Lịch sử';
|
||||
$lang->execution->latestDynamic = 'Lịch sử';
|
||||
|
||||
@@ -17,6 +17,7 @@ $lang->execution->id = $lang->executionCommon . '编号';
|
||||
$lang->execution->type = $lang->executionCommon . '类型';
|
||||
$lang->execution->name = $lang->executionCommon . '名称';
|
||||
$lang->execution->code = $lang->executionCommon . '代号';
|
||||
$lang->execution->project = '所属项目';
|
||||
$lang->execution->execName = '执行名称';
|
||||
$lang->execution->execCode = '执行代号';
|
||||
$lang->execution->statge = '阶段';
|
||||
@@ -46,7 +47,6 @@ $lang->execution->PO = $lang->productCommon . '负责人';
|
||||
$lang->execution->PM = $lang->executionCommon . '负责人';
|
||||
$lang->execution->QD = '测试负责人';
|
||||
$lang->execution->RD = '发布负责人';
|
||||
$lang->execution->qa = '测试';
|
||||
$lang->execution->release = '发布';
|
||||
$lang->execution->acl = '访问控制';
|
||||
$lang->execution->teamname = '团队名称';
|
||||
@@ -55,7 +55,7 @@ $lang->execution->orderAB = '排序';
|
||||
$lang->execution->products = '相关' . $lang->productCommon;
|
||||
$lang->execution->whitelist = '白名单';
|
||||
$lang->execution->addWhitelist = '添加白名单';
|
||||
$lang->execution->unbindWhielist = '删除白名单';
|
||||
$lang->execution->unbindWhitelist = '删除白名单';
|
||||
$lang->execution->totalEstimate = '预计';
|
||||
$lang->execution->totalConsumed = '消耗';
|
||||
$lang->execution->totalLeft = '剩余';
|
||||
@@ -150,7 +150,9 @@ $lang->execution->index = "{$lang->executionCommon}主页";
|
||||
$lang->execution->task = '任务列表';
|
||||
$lang->execution->groupTask = '分组浏览任务';
|
||||
$lang->execution->story = "{$lang->SRCommon}列表";
|
||||
$lang->execution->qa = '测试仪表盘';
|
||||
$lang->execution->bug = 'Bug列表';
|
||||
$lang->execution->testcase = '用例列表';
|
||||
$lang->execution->dynamic = '动态';
|
||||
$lang->execution->latestDynamic = '最新动态';
|
||||
$lang->execution->build = '所有版本';
|
||||
@@ -183,12 +185,13 @@ $lang->execution->treeAction = "{$lang->executionCommon}树状图";
|
||||
$lang->execution->exportAction = "导出{$lang->executionCommon}";
|
||||
$lang->execution->computeBurnAction = "计算燃尽图";
|
||||
$lang->execution->create = "添加{$lang->executionCommon}";
|
||||
$lang->execution->createExec = "添加执行";
|
||||
$lang->execution->copy = "复制{$lang->executionCommon}";
|
||||
$lang->execution->delete = "删除{$lang->executionCommon}";
|
||||
$lang->execution->browse = "浏览{$lang->executionCommon}";
|
||||
$lang->execution->list = "{$lang->executionCommon}列表";
|
||||
$lang->execution->edit = "编辑{$lang->executionCommon}";
|
||||
$lang->execution->batchEdit = "批量编辑";
|
||||
$lang->execution->batchEdit = "编辑";
|
||||
$lang->execution->manageMembers = '团队管理';
|
||||
$lang->execution->unlinkMember = '移除成员';
|
||||
$lang->execution->unlinkStory = "移除{$lang->SRCommon}";
|
||||
@@ -198,6 +201,7 @@ $lang->execution->importTask = '转入任务';
|
||||
$lang->execution->importPlanStories = "按计划关联{$lang->SRCommon}";
|
||||
$lang->execution->importBug = '导入Bug';
|
||||
$lang->execution->updateOrder = "{$lang->executionCommon}排序";
|
||||
$lang->execution->execUpdateOrder = "执行排序";
|
||||
$lang->execution->tree = '树状图';
|
||||
$lang->execution->treeTask = '只看任务';
|
||||
$lang->execution->treeStory = "只看{$lang->SRCommon}";
|
||||
@@ -310,12 +314,7 @@ $lang->execution->fixFirstWithLeft = '修改剩余工时';
|
||||
$lang->execution->unfinishedExecution = "该{$lang->executionCommon}下还有";
|
||||
$lang->execution->unfinishedTask = "[%s]个未完成的任务,";
|
||||
$lang->execution->unresolvedBug = "[%s]个未解决的bug,";
|
||||
|
||||
$lang->execution->action = new stdclass();
|
||||
$lang->execution->action->opened = '$date, 由 <strong>$actor</strong> 创建。$extra' . "\n";
|
||||
$lang->execution->action->managed = '$date, 由 <strong>$actor</strong> 维护。$extra' . "\n";
|
||||
$lang->execution->action->edited = '$date, 由 <strong>$actor</strong> 编辑。$extra' . "\n";
|
||||
$lang->execution->action->extra = '相关产品为 %s。';
|
||||
$lang->execution->projectNotEmpty = '所属项目不能为空。';
|
||||
|
||||
/* 统计。*/
|
||||
$lang->execution->charts = new stdclass();
|
||||
|
||||
@@ -51,7 +51,7 @@ $lang->project->orderAB = '排序';
|
||||
$lang->project->products = '相關' . $lang->productCommon;
|
||||
$lang->project->whitelist = '白名單';
|
||||
$lang->project->addWhitelist = '添加白名單';
|
||||
$lang->project->unbindWhielist = '刪除白名單';
|
||||
$lang->project->unbindWhitelist = '刪除白名單';
|
||||
$lang->project->totalEstimate = '預計';
|
||||
$lang->project->totalConsumed = '消耗';
|
||||
$lang->project->totalLeft = '剩餘';
|
||||
|
||||
+54
-26
@@ -62,8 +62,6 @@ class executionModel extends model
|
||||
*/
|
||||
public function setMenu($executions, $executionID, $buildID = 0, $extra = '')
|
||||
{
|
||||
if($this->app->rawMethod != 'index' and $this->app->rawMethod != 'all') $this->lang->execution->menu = $this->lang->execution->viewMenu;
|
||||
|
||||
if(empty($executions))
|
||||
{
|
||||
$project = $this->loadModel('project')->getByID($this->session->PRJ);
|
||||
@@ -115,8 +113,8 @@ class executionModel extends model
|
||||
if($methodName == 'all') $label = $this->lang->execution->allExecutions;
|
||||
if($methodName == 'create' and $moduleName == 'execution') $label = $this->lang->execution->create;
|
||||
|
||||
//$executionIndex = $this->select($executions, $executionID, null, $moduleName, $methodName, $extra);
|
||||
//if($this->config->systemMode == 'new') $this->lang->modulePageNav = $executionIndex;
|
||||
foreach($this->lang->execution->viewMenu as $key => $menu) common::setMenuVars($this->lang->execution->viewMenu, $key, $executionID);
|
||||
foreach($this->lang->execution->qaMenu as $key => $menu) common::setMenuVars($this->lang->execution->qaMenu, $key, $executionID);
|
||||
|
||||
foreach($this->lang->execution->menu as $key => $menu)
|
||||
{
|
||||
@@ -326,9 +324,15 @@ class executionModel extends model
|
||||
{
|
||||
$this->lang->execution->team = $this->lang->execution->teamname;
|
||||
|
||||
if(empty($_POST['project']))
|
||||
{
|
||||
dao::$errors['message'][] = $this->lang->execution->projectNotEmpty;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Determine whether to add a sprint or a stage according to the model of the execution. */
|
||||
$execution = $this->getByID($this->session->PRJ);
|
||||
$sprintType = $this->config->systemMode == 'new' ? zget($this->config->execution->modelList, $execution->model, '') : 'sprint';
|
||||
$project = $this->getByID($_POST['project']);
|
||||
$sprintType = $this->config->systemMode == 'new' ? zget($this->config->execution->modelList, $project->model, '') : 'sprint';
|
||||
|
||||
/* If the execution model is a stage, determine whether the product is linked. */
|
||||
if($sprintType == 'stage' and empty($this->post->products[0]))
|
||||
@@ -346,8 +350,7 @@ class executionModel extends model
|
||||
->setDefault('lastEditedBy', $this->app->user->account)
|
||||
->setDefault('lastEditedDate', helper::now())
|
||||
->setDefault('team', substr($this->post->name,0, 30))
|
||||
->setIF($this->config->systemMode == 'new', 'project', $this->session->PRJ)
|
||||
->setIF($this->config->systemMode == 'new', 'parent', $this->session->PRJ)
|
||||
->setIF($this->config->systemMode == 'new', 'parent', $this->post->project)
|
||||
->setIF($this->post->acl == 'open', 'whitelist', '')
|
||||
->join('whitelist', ',')
|
||||
->add('type', $sprintType)
|
||||
@@ -387,7 +390,7 @@ class executionModel extends model
|
||||
$this->file->updateObjectID($this->post->uid, $executionID, 'execution');
|
||||
|
||||
/* Update the path. */
|
||||
if(isset($this->config->maxVersion)) $this->loadModel('programplan')->setTreePath($executionID);
|
||||
$this->setTreePath($executionID);
|
||||
|
||||
/* Copy team of execution. */
|
||||
if($copyExecutionID != '')
|
||||
@@ -419,7 +422,7 @@ class executionModel extends model
|
||||
$member->hours = $this->config->execution->defaultWorkhours;
|
||||
$this->dao->insert(TABLE_TEAM)->data($member)->exec();
|
||||
|
||||
$this->addExecutionMembers($this->session->PRJ, array($member));
|
||||
$this->addExecutionMembers($sprint->project, array($member));
|
||||
}
|
||||
|
||||
/* Create doc lib. */
|
||||
@@ -878,7 +881,7 @@ class executionModel extends model
|
||||
*/
|
||||
public function getMainAction($module, $method)
|
||||
{
|
||||
if($method == 'index' or $method == 'all') return;
|
||||
if(in_array($method, array('index', 'all', 'batchedit'))) return;
|
||||
|
||||
$link = html::a(helper::createLink('execution', 'all'), "<i class='icon icon-list'></i>", '', "style='border: none;'");
|
||||
$html = "<p style='padding-top:5px;'>" . $link . "</p>";
|
||||
@@ -897,7 +900,7 @@ class executionModel extends model
|
||||
*/
|
||||
public function getSwitcher($executionID, $currentModule, $currentMethod)
|
||||
{
|
||||
if($currentMethod == 'index' or $currentMethod == 'all') return;
|
||||
if(in_array($currentMethod, array('index', 'all', 'batchedit'))) return;
|
||||
|
||||
$this->session->set('moreExecutionLink', $this->app->getURI(true));
|
||||
|
||||
@@ -3556,10 +3559,10 @@ class executionModel extends model
|
||||
*/
|
||||
public function getRecentExecutions()
|
||||
{
|
||||
$isView = (empty($this->app->user->view->sprints) || empty($this->app->user->view->executions)) ? false : true;
|
||||
$isView = (empty($this->app->user->view->sprints) || empty($this->app->user->view->projects)) ? false : true;
|
||||
if(!$this->app->user->admin && $isView === false) return array();
|
||||
|
||||
$executions = $this->dao->select('t1.id,t1.execution,t1.code,t1.name,t1.type')->from(TABLE_EXECUTION)->alias('t1')
|
||||
$executions = $this->dao->select('t1.id,t1.project,t1.code,t1.name,t1.type')->from(TABLE_EXECUTION)->alias('t1')
|
||||
->leftJoin(TABLE_TEAM)->alias('t2')->on('t1.id=t2.root')
|
||||
->where('t1.type')->in('stage,sprint')
|
||||
->andWhere('t2.account')->eq($this->app->user->account)
|
||||
@@ -3567,37 +3570,37 @@ class executionModel extends model
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t1.project')->in($this->app->user->view->projects)->fi()
|
||||
->andWhere('t1.status')->ne('closed')
|
||||
->andWhere('t1.deleted')->eq('0')
|
||||
->orderBy('execution_desc, id_desc')
|
||||
->orderBy('project_desc, id_desc')
|
||||
->fetchAll();
|
||||
|
||||
/* Get the execution or product to which the execution belongs. */
|
||||
$executionIdList = array();
|
||||
/* Get the project or product to which the execution belongs. */
|
||||
$projectIdList = array();
|
||||
$stageIdList = array();
|
||||
foreach($executions as $execution)
|
||||
{
|
||||
if($execution->type == 'stage') $stageIdList[$execution->id] = $execution->id;
|
||||
$executionIdList[$execution->execution] = $execution->execution;
|
||||
$projectIdList[$execution->project] = $execution->project;
|
||||
}
|
||||
$executionPairs = $this->loadModel('execution')->getPairsByIdList($executionIdList);
|
||||
$projectPairs = $this->loadModel('project')->getPairsByIdList($projectIdList);
|
||||
$productPairs = $this->getStageLinkProductPairs($stageIdList);
|
||||
|
||||
$recentExecutions = isset($this->config->execution->recentExecutions) ? explode(',', $this->config->execution->recentExecutions) : array();
|
||||
$allExecutions = array('recent' => array(), 'mine' => array());
|
||||
$allExecution = array('recent' => array(), 'mine' => array());
|
||||
foreach($executions as $execution)
|
||||
{
|
||||
if($execution->type == 'stage') $execution->name = zget($executionPairs, $execution->execution) . '/' . zget($productPairs, $execution->id) . '/' . $execution->name;
|
||||
if($execution->type == 'sprint') $execution->name = zget($executionPairs, $execution->execution) . '/' . $execution->name;
|
||||
if($execution->type == 'stage') $execution->name = zget($projectPairs, $execution->project) . '/' . zget($productPairs, $execution->id) . '/' . $execution->name;
|
||||
if($execution->type == 'sprint') $execution->name = zget($projectPairs, $execution->project) . '/' . $execution->name;
|
||||
if(in_array($execution->id, $recentExecutions))
|
||||
{
|
||||
$index = array_search($execution->id, $recentExecutions);
|
||||
$allExecutions['recent'][$index] = $execution;
|
||||
$allExecution['recent'][$index] = $execution;
|
||||
continue;
|
||||
}
|
||||
$allExecutions['mine'][] = $execution;
|
||||
$allExecution['mine'][] = $execution;
|
||||
}
|
||||
|
||||
ksort($allExecutions['recent']);
|
||||
return $allExecutions;
|
||||
ksort($allExecution['recent']);
|
||||
return $allExecution;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3615,4 +3618,29 @@ class executionModel extends model
|
||||
->fetchPairs('project', 'name');
|
||||
return $productpairs;
|
||||
}
|
||||
|
||||
/**
|
||||
** Set stage tree path.
|
||||
**
|
||||
** @param int $executionID
|
||||
** @access public
|
||||
** @return bool
|
||||
**/
|
||||
public function setTreePath($executionID)
|
||||
{
|
||||
$execution = $this->dao->select('id,type,parent,path,grade')->from(TABLE_PROJECT)->where('id')->eq($executionID)->fetch();
|
||||
$parent = $this->dao->select('id,type,parent,path,grade')->from(TABLE_PROJECT)->where('id')->eq($execution->parent)->fetch();
|
||||
|
||||
if($parent->type == 'project')
|
||||
{
|
||||
$path['path'] = ",{$parent->id},{$execution->id},";
|
||||
$path['grade'] = 1;
|
||||
}
|
||||
elseif($parent->type == 'stage')
|
||||
{
|
||||
$path['path'] = $parent->path . "{$execution->id},";
|
||||
$path['grade'] = $parent->grade + 1;
|
||||
}
|
||||
$this->dao->update(TABLE_PROJECT)->set('path')->eq($path['path'])->set('grade')->eq($path['grade'])->where('id')->eq($execution->id)->exec();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</div>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php common::printLink('execution', 'export', "status=$status&productID=$productID&orderBy=$orderBy", "<i class='icon-export muted'> </i>" . $lang->export, '', "class='btn btn-link export'")?>
|
||||
<?php if(common::hasPriv('execution', 'create')) echo html::a($this->createLink('execution', 'create'), "<i class='icon icon-sm icon-plus'></i> " . $this->lang->execution->create, '', "class='btn btn-primary'");?>
|
||||
<?php if(common::hasPriv('execution', 'create')) echo html::a($this->createLink('execution', 'create'), "<i class='icon icon-sm icon-plus'></i> " . ($from == 'execution' ? $lang->execution->createExec : $lang->execution->create), '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
</div>
|
||||
<div id='mainContent' class="main-row">
|
||||
@@ -72,14 +72,13 @@
|
||||
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
|
||||
</th>
|
||||
<th><?php common::printOrderLink('name', $orderBy, $vars, $from == 'execution' ? $lang->execution->execName : $lang->execution->name);?></th>
|
||||
<th class='w-150px'><?php common::printOrderLink('code', $orderBy, $vars, $from == 'execution' ? $lang->execution->execCode : $lang->execution->code);?></th>
|
||||
<th class='thWidth'><?php common::printOrderLink('PM', $orderBy, $vars, $lang->execution->owner);?></th>
|
||||
<th class='w-90px'><?php common::printOrderLink('end', $orderBy, $vars, $lang->execution->end);?></th>
|
||||
<th class='w-90px'><?php common::printOrderLink('status', $orderBy, $vars, $from == 'execution' ? $lang->execution->execStatus : $lang->execution->status);?></th>
|
||||
<th class='w-70px hours'><?php echo $lang->execution->totalEstimate;?></th>
|
||||
<th class='w-70px hours'><?php echo $lang->execution->totalConsumed;?></th>
|
||||
<th class='w-70px hours'><?php echo $lang->execution->totalLeft;?></th>
|
||||
<th class='w-150px'><?php echo $lang->execution->progress;?></th>
|
||||
<th class='w-40px'><?php echo $lang->execution->totalEstimate;?></th>
|
||||
<th class='w-40px'><?php echo $lang->execution->totalConsumed;?></th>
|
||||
<th class='w-40px'><?php echo $lang->execution->totalLeft;?></th>
|
||||
<th class='w-60px'><?php echo $lang->execution->progress;?></th>
|
||||
<th class='w-100px'><?php echo $lang->execution->burn;?></th>
|
||||
<?php if($canOrder):?>
|
||||
<th class='w-60px sort-default'><?php common::printOrderLink('order', $orderBy, $vars, $lang->execution->orderAB);?></th>
|
||||
@@ -107,21 +106,18 @@
|
||||
<a class="plan-toggle" data-id="<?php echo $execution->id;?>"><i class="icon icon-angle-double-right"></i></a>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
<td class='text-left' title="<?php echo $execution->code;?>"><?php echo $execution->code;?></td>
|
||||
<td><?php echo zget($users, $execution->PM);?></td>
|
||||
<td><?php echo $execution->end;?></td>
|
||||
<?php $executionStatus = $this->processStatus('execution', $execution);?>
|
||||
<td class='c-status' title='<?php echo $executionStatus;?>'>
|
||||
<span class="status-execution status-<?php echo $execution->status?>"><?php echo $executionStatus;?></span>
|
||||
</td>
|
||||
<td class='hours'><?php echo $execution->hours->totalEstimate . ' ' . $config->hourUnit;?></td>
|
||||
<td class='hours'><?php echo $execution->hours->totalConsumed . ' ' . $config->hourUnit;?></td>
|
||||
<td class='hours'><?php echo $execution->hours->totalLeft . ' ' . $config->hourUnit;?></td>
|
||||
<td class='hours' title='<?php echo $execution->hours->totalEstimate . ' ' . $this->lang->execution->workHour;?>'><?php echo $execution->hours->totalEstimate . ' ' . $this->lang->execution->workHourUnit;?></td>
|
||||
<td class='hours' title='<?php echo $execution->hours->totalConsumed . ' ' . $this->lang->execution->workHour;?>'><?php echo $execution->hours->totalConsumed . ' ' . $this->lang->execution->workHourUnit;?></td>
|
||||
<td class='hours' title='<?php echo $execution->hours->totalLeft . ' ' . $this->lang->execution->workHour;?>'><?php echo $execution->hours->totalLeft . ' ' . $this->lang->execution->workHourUnit;?></td>
|
||||
<td class="c-progress">
|
||||
<div class="progress progress-text-left">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="<?php echo $execution->hours->progress;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $execution->hours->progress;?>%">
|
||||
<span class="progress-text"><?php echo $execution->hours->progress;?>%</span>
|
||||
</div>
|
||||
<div class='progress-pie' data-doughnut-size='90' data-color='#00da88' data-value='<?php echo $execution->hours->progress;?>' data-width='24' data-height='24' data-back-color='#e8edf3'>
|
||||
<div class='progress-info'><?php echo $execution->hours->progress;?></div>
|
||||
</div>
|
||||
</td>
|
||||
<td id='spark-<?php echo $execution->id?>' class='sparkline text-left no-padding' values='<?php echo join(',', $execution->burns);?>'></td>
|
||||
@@ -151,21 +147,18 @@
|
||||
echo html::a($this->createLink('execution', 'view', 'execution=' . $child->id), $child->name);
|
||||
?>
|
||||
</td>
|
||||
<td class='text-left' title="<?php echo $child->code;?>"><?php echo $child->code;?></td>
|
||||
<td><?php echo zget($users, $child->PM);?></td>
|
||||
<td><?php echo $child->end;?></td>
|
||||
<?php $executionStatus = $this->processStatus('execution', $child);?>
|
||||
<td class='c-status' title='<?php echo $executionStatus;?>'>
|
||||
<span class="status-execution status-<?php echo $child->status?>"><?php echo $executionStatus;?></span>
|
||||
</td>
|
||||
<td class='hours'><?php echo $child->hours->totalEstimate;?></td>
|
||||
<td class='hours'><?php echo $child->hours->totalConsumed;?></td>
|
||||
<td class='hours'><?php echo $child->hours->totalLeft;?></td>
|
||||
<td class='hours' title='<?php echo $child->hours->totalEstimate . ' ' . $this->lang->execution->workHour;?>'><?php echo $child->hours->totalEstimate . ' ' . $this->lang->execution->workHourUnit;?></td>
|
||||
<td class='hours' title='<?php echo $child->hours->totalConsumed . ' ' . $this->lang->execution->workHour;?>'><?php echo $child->hours->totalConsumed . ' ' . $this->lang->execution->workHourUnit;?></td>
|
||||
<td class='hours' title='<?php echo $child->hours->totalLeft . ' ' . $this->lang->execution->workHour;?>'><?php echo $child->hours->totalLeft . ' ' . $this->lang->execution->workHourUnit;?></td>
|
||||
<td class="c-progress">
|
||||
<div class="progress progress-text-left">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="<?php echo $child->hours->progress;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $child->hours->progress;?>%">
|
||||
<span class="progress-text"><?php echo $child->hours->progress;?>%</span>
|
||||
</div>
|
||||
<div class='progress-pie' data-doughnut-size='90' data-color='#00da88' data-value='<?php echo $child->hours->progress;?>' data-width='24' data-height='24' data-back-color='#e8edf3'>
|
||||
<div class='progress-info'><?php echo $child->hours->progress;?></div>
|
||||
</div>
|
||||
</td>
|
||||
<td id='spark-<?php echo $child->id?>' class='sparkline text-left no-padding' values='<?php echo join(',', $child->burns);?>'></td>
|
||||
@@ -185,7 +178,7 @@
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class="table-actions btn-toolbar"><?php echo html::submitButton($lang->execution->batchEdit, '', 'btn');?></div>
|
||||
<?php endif;?>
|
||||
<?php if(!$canOrder and common::hasPriv('execution', 'updateOrder')) echo html::a(inlink('all', "status=$status&projectID=$projectID&from=$from&order=order_desc&productID=$productID&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}"), $lang->execution->updateOrder, '', "class='btn'");?>
|
||||
<?php if(!$canOrder and common::hasPriv('execution', 'updateOrder')) echo html::a(inlink('all', "status=$status&projectID=$projectID&from=$from&order=order_desc&productID=$productID&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}"), $from == 'execution' ? $lang->execution->execUpdateOrder : $lang->execution->updateOrder, '', "class='btn'");?>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::select("lifetimes[$executionID]", $lang->program->PRJLifeTimeList, $executions[$executionID]->lifetime, 'class=form-control');
|
||||
echo html::select("lifetimes[$executionID]", $lang->execution->lifeTimeList, $executions[$executionID]->lifetime, 'class=form-control');
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
@@ -108,7 +108,12 @@
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr><td colspan='<?php echo count($visibleFields) + 6?>' class='text-center form-actions'><?php echo html::submitButton();?></td></tr>
|
||||
<tr>
|
||||
<td colspan='<?php echo count($visibleFields) + 6?>' class='text-center form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php echo html::backButton();?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -46,6 +46,11 @@
|
||||
</div>
|
||||
<form class='form-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-120px'><?php echo $lang->execution->project;?></th>
|
||||
<td class="col-main"><?php echo html::select("project", $allProjects, '', "class='form-control chosen' required onchange='loadBranches(this)'");?></td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='w-120px'><?php echo $lang->execution->name;?></th>
|
||||
<td class="col-main"><?php echo html::input('name', $name, "class='form-control' required");?></td>
|
||||
@@ -201,13 +206,13 @@
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div id='copyProjects' class='row'>
|
||||
<?php foreach ($executions as $id => $name):?>
|
||||
<?php foreach ($executions as $id => $execution):?>
|
||||
<?php if(empty($id)):?>
|
||||
<?php if($copyExecutionID != 0):?>
|
||||
<div class='col-md-4 col-sm-6'><a href='javascript:;' data-id='' class='cancel'><?php echo html::icon($lang->icons['cancel']) . ' ' . $lang->execution->cancelCopy;?></a></div>
|
||||
<?php endif;?>
|
||||
<?php else: ?>
|
||||
<div class='col-md-4 col-sm-6'><a href='javascript:;' data-id='<?php echo $id;?>' class='nobr <?php echo ($copyExecutionID == $id) ? ' active' : '';?>'><?php echo html::icon($lang->icons[$iconObject], 'text-muted') . ' ' . $name;?></a></div>
|
||||
<div class='col-md-4 col-sm-6'><a href='javascript:;' data-id='<?php echo $id;?>' class='nobr <?php echo ($copyExecutionID == $id) ? ' active' : '';?>'><?php echo html::icon($lang->icons[$execution->type], 'text-muted') . ' ' . $execution->name;?></a></div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if(common::canModify('execution', $execution)) echo html::a(helper::createLink('testcase', 'create', "productID=$productID&branch=0&extra=executionID=$execution->id", '', '', '', true), "<i class='icon icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainContent">
|
||||
<?php if(empty($cases)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->testcase->noCase;?></span>
|
||||
<?php if(common::canModify('execution', $execution) and common::hasPriv('testcase', 'create')):?>
|
||||
<?php echo html::a(helper::createLink('testcase', 'create', "productID=$productID&branch=0&extra=executionID=$execution->id", '', '', '', true), "<i class='icon icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-info'");?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<form class='main-table' method='post' id='executionBugForm' data-ride="table">
|
||||
<table class='table has-sort-head' id='bugList'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -34,33 +34,34 @@ $lang->moduleOrder[80] = 'testcase';
|
||||
$lang->moduleOrder[85] = 'testtask';
|
||||
$lang->moduleOrder[90] = 'testsuite';
|
||||
$lang->moduleOrder[95] = 'testreport';
|
||||
$lang->moduleOrder[100] = 'caselib';
|
||||
$lang->moduleOrder[100] = 'caselib';
|
||||
$lang->moduleOrder[105] = 'automation';
|
||||
|
||||
$lang->moduleOrder[105] = 'doc';
|
||||
$lang->moduleOrder[110] = 'report';
|
||||
$lang->moduleOrder[110] = 'doc';
|
||||
$lang->moduleOrder[115] = 'report';
|
||||
|
||||
$lang->moduleOrder[115] = 'company';
|
||||
$lang->moduleOrder[120] = 'dept';
|
||||
$lang->moduleOrder[125] = 'group';
|
||||
$lang->moduleOrder[130] = 'user';
|
||||
$lang->moduleOrder[120] = 'company';
|
||||
$lang->moduleOrder[125] = 'dept';
|
||||
$lang->moduleOrder[130] = 'group';
|
||||
$lang->moduleOrder[135] = 'user';
|
||||
|
||||
$lang->moduleOrder[135] = 'admin';
|
||||
$lang->moduleOrder[140] = 'extension';
|
||||
$lang->moduleOrder[145] = 'custom';
|
||||
$lang->moduleOrder[150] = 'action';
|
||||
$lang->moduleOrder[140] = 'admin';
|
||||
$lang->moduleOrder[145] = 'extension';
|
||||
$lang->moduleOrder[150] = 'custom';
|
||||
$lang->moduleOrder[155] = 'action';
|
||||
|
||||
$lang->moduleOrder[155] = 'mail';
|
||||
$lang->moduleOrder[160] = 'svn';
|
||||
$lang->moduleOrder[165] = 'git';
|
||||
$lang->moduleOrder[170] = 'search';
|
||||
$lang->moduleOrder[175] = 'tree';
|
||||
$lang->moduleOrder[180] = 'api';
|
||||
$lang->moduleOrder[185] = 'file';
|
||||
$lang->moduleOrder[190] = 'misc';
|
||||
$lang->moduleOrder[195] = 'backup';
|
||||
$lang->moduleOrder[200] = 'cron';
|
||||
$lang->moduleOrder[205] = 'dev';
|
||||
$lang->moduleOrder[210] = 'message';
|
||||
$lang->moduleOrder[160] = 'mail';
|
||||
$lang->moduleOrder[165] = 'svn';
|
||||
$lang->moduleOrder[170] = 'git';
|
||||
$lang->moduleOrder[175] = 'search';
|
||||
$lang->moduleOrder[180] = 'tree';
|
||||
$lang->moduleOrder[185] = 'api';
|
||||
$lang->moduleOrder[190] = 'file';
|
||||
$lang->moduleOrder[195] = 'misc';
|
||||
$lang->moduleOrder[200] = 'backup';
|
||||
$lang->moduleOrder[205] = 'cron';
|
||||
$lang->moduleOrder[210] = 'dev';
|
||||
$lang->moduleOrder[215] = 'message';
|
||||
|
||||
$lang->resource = new stdclass();
|
||||
|
||||
@@ -220,7 +221,7 @@ if($config->systemMode == 'new')
|
||||
$lang->resource->project->view = 'view';
|
||||
$lang->resource->project->whitelist = 'whitelist';
|
||||
$lang->resource->project->addWhitelist = 'addWhitelist';
|
||||
$lang->resource->project->unbindWhielist = 'unbindWhielist';
|
||||
$lang->resource->project->unbindWhitelist = 'unbindWhitelist';
|
||||
$lang->resource->project->manageProducts = 'manageProducts';
|
||||
$lang->resource->project->view = 'view';
|
||||
$lang->resource->project->dynamic = 'dynamic';
|
||||
@@ -248,24 +249,24 @@ if($config->systemMode == 'new')
|
||||
$lang->project->methodOrder[100] = 'view';
|
||||
$lang->project->methodOrder[105] = 'whitelist';
|
||||
$lang->project->methodOrder[110] = 'addWhitelist';
|
||||
$lang->project->methodOrder[115] = 'unbindWhielist';
|
||||
$lang->project->methodOrder[115] = 'unbindWhitelist';
|
||||
$lang->project->methodOrder[120] = 'manageProducts';
|
||||
$lang->project->methodOrder[125] = 'view';
|
||||
$lang->project->methodOrder[130] = 'dynamic';
|
||||
|
||||
/* Personnel . */
|
||||
$lang->resource->personnel = new stdclass();
|
||||
$lang->resource->personnel->accessible = 'accessible';
|
||||
$lang->resource->personnel->putInto = 'putInto';
|
||||
$lang->resource->personnel->whitelist = 'whitelist';
|
||||
$lang->resource->personnel->addWhitelist = 'addWhitelist';
|
||||
$lang->resource->personnel->unbindWhielist = 'unbindWhielist';
|
||||
$lang->resource->personnel->accessible = 'accessible';
|
||||
$lang->resource->personnel->invest = 'invest';
|
||||
$lang->resource->personnel->whitelist = 'whitelist';
|
||||
$lang->resource->personnel->addWhitelist = 'addWhitelist';
|
||||
$lang->resource->personnel->unbindWhitelist = 'unbindWhitelist';
|
||||
|
||||
$lang->personnel->methodOrder[5] = 'accessible';
|
||||
$lang->personnel->methodOrder[10] = 'putInto';
|
||||
$lang->personnel->methodOrder[10] = 'invest';
|
||||
$lang->personnel->methodOrder[15] = 'whitelist';
|
||||
$lang->personnel->methodOrder[20] = 'addWhitelist';
|
||||
$lang->personnel->methodOrder[25] = 'unbindWhielist';
|
||||
$lang->personnel->methodOrder[25] = 'unbindWhitelist';
|
||||
|
||||
/* Project Story. */
|
||||
$lang->resource->projectstory = new stdclass();
|
||||
@@ -339,7 +340,7 @@ $lang->resource->product->build = 'build';
|
||||
$lang->resource->product->export = 'exportAction';
|
||||
$lang->resource->product->whitelist = 'whitelist';
|
||||
$lang->resource->product->addWhitelist = 'addWhitelist';
|
||||
$lang->resource->product->unbindWhielist = 'unbindWhielist';
|
||||
$lang->resource->product->unbindWhitelist = 'unbindWhitelist';
|
||||
|
||||
$lang->product->methodOrder[0] = 'index';
|
||||
$lang->product->methodOrder[5] = 'browse';
|
||||
@@ -360,7 +361,7 @@ $lang->product->methodOrder[80] = 'build';
|
||||
$lang->product->methodOrder[85] = 'export';
|
||||
$lang->product->methodOrder[90] = 'whitelist';
|
||||
$lang->product->methodOrder[95] = 'addWhitelist';
|
||||
$lang->product->methodOrder[100] = 'unbindWhielist';
|
||||
$lang->product->methodOrder[100] = 'unbindWhitelist';
|
||||
|
||||
/* Branch. */
|
||||
$lang->resource->branch = new stdclass();
|
||||
@@ -576,7 +577,7 @@ $lang->resource->execution->storyKanban = 'storyKanban';
|
||||
$lang->resource->execution->storySort = 'storySort';
|
||||
$lang->resource->execution->whitelist = 'whitelist';
|
||||
$lang->resource->execution->addWhitelist = 'addWhitelist';
|
||||
$lang->resource->execution->unbindWhielist = 'unbindWhielist';
|
||||
$lang->resource->execution->unbindWhitelist = 'unbindWhitelist';
|
||||
//if($config->systemMode == 'classic') $lang->resource->project->list = 'list';
|
||||
|
||||
$lang->execution->methodOrder[0] = 'index';
|
||||
@@ -628,7 +629,7 @@ $lang->execution->methodOrder[220] = 'storyKanban';
|
||||
$lang->execution->methodOrder[225] = 'storySort';
|
||||
$lang->execution->methodOrder[230] = 'whitelist';
|
||||
$lang->execution->methodOrder[235] = 'addWhitelist';
|
||||
$lang->execution->methodOrder[240] = 'unbindWhielist';
|
||||
$lang->execution->methodOrder[240] = 'unbindWhitelist';
|
||||
|
||||
/* Task. */
|
||||
$lang->resource->task = new stdclass();
|
||||
@@ -926,6 +927,11 @@ $lang->caselib->methodOrder[40] = 'exportTemplet';
|
||||
$lang->caselib->methodOrder[45] = 'import';
|
||||
$lang->caselib->methodOrder[50] = 'showImport';
|
||||
|
||||
$lang->resource->automation = new stdclass();
|
||||
$lang->resource->automation->browse = 'browse';
|
||||
|
||||
$lang->automation->methodOrder[0] = 'browse';
|
||||
|
||||
$lang->resource->repo = new stdclass();
|
||||
$lang->resource->repo->browse = 'browse';
|
||||
$lang->resource->repo->view = 'view';
|
||||
|
||||
@@ -95,6 +95,7 @@ body.menu-hide {padding-left: 0;}
|
||||
|
||||
#upgradeContent {display: none; position: absolute; right: 10px; top: -290px; height: 282px; background-color: #fff; left: 0px; padding: 5px 0; border: 1px solid rgba(0,0,0,.15); border-color: rgba(0,0,0,.1); opacity: 1; border-radius: 4px; box-shadow: 0 6px 12px rgba(0,0,0,.12), 0 1px 3px rgba(0,0,0,.1);}
|
||||
#latestVersionList {height: 190px; overflow: auto;}
|
||||
#empty-tip {top: 1px; position: relative;}
|
||||
|
||||
.version-name {width: 20%;}
|
||||
.version-date {width: 15%; color: #8a8a8a;}
|
||||
|
||||
@@ -518,7 +518,7 @@ function getExecutions()
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
url: createLink('project', 'ajaxGetRecentExecutions'),
|
||||
url: createLink('execution', 'ajaxGetRecentExecutions'),
|
||||
dataType: 'html',
|
||||
type: 'post',
|
||||
success: function(data)
|
||||
|
||||
@@ -90,10 +90,12 @@ js::set('defaultOpen', $open);
|
||||
<div id="latestVersionList">
|
||||
<?php if(empty($latestVersionList)):?>
|
||||
<div class="table-empty-tip" style='padding: 66px 10px;'>
|
||||
<div style='display: inline-block'><?php echo $lang->noData;?></div>
|
||||
<div style='display: inline-block'>
|
||||
<span id='empty-tip'><?php echo $lang->noData;?></span>
|
||||
<a href='<?php echo $lang->website;?>' target='_blank'>
|
||||
<span class="label label-badge label-info label-outline"><?php echo $lang->index->website . ': '. $lang->website;?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<table class='table has-sort-head'>
|
||||
|
||||
@@ -500,7 +500,7 @@ class my extends control
|
||||
|
||||
/* Get PM id list. */
|
||||
$accounts = array();
|
||||
$projects = $this->user->getProjects($this->app->user->account, 'project', $status, $pager);
|
||||
$projects = $this->user->getExecutions($this->app->user->account, 'project', $status, 'id_desc', $pager);
|
||||
foreach($projects as $project)
|
||||
{
|
||||
if(!empty($project->PM) and !in_array($project->PM, $accounts)) $accounts[] = $project->PM;
|
||||
@@ -540,7 +540,7 @@ class my extends control
|
||||
$this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->execution;
|
||||
$this->view->position[] = $this->lang->my->execution;
|
||||
$this->view->tabID = 'project';
|
||||
$this->view->executions = $this->user->getProjects($this->app->user->account, 'execution', $type, $pager);
|
||||
$this->view->executions = $this->user->getExecutions($this->app->user->account, 'execution', $type, $orderBy, $pager);
|
||||
$this->view->type = $type;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->mode = 'execution';
|
||||
|
||||
@@ -26,7 +26,7 @@ class personnel extends control
|
||||
*/
|
||||
public function accessible($programID = 0, $deptID = 0, $browseType='browse', $param = 0, $recTotal = 0, $recPerPage = 15, $pageID = 1)
|
||||
{
|
||||
$this->setProgramNavMenu($programID);
|
||||
$this->setProgramMenu($programID);
|
||||
$this->app->loadLang('user');
|
||||
|
||||
$program = $this->loadModel('program')->getByID($programID);
|
||||
@@ -70,13 +70,13 @@ class personnel extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function putInto($programID = 0)
|
||||
public function invest($programID = 0)
|
||||
{
|
||||
$this->setProgramNavMenu($programID);
|
||||
$this->setProgramMenu($programID);
|
||||
|
||||
$this->view->title = $this->lang->personnel->putInto;
|
||||
$this->view->position[] = $this->lang->personnel->putInto;
|
||||
$this->view->inputPersonnel = $this->personnel->getInputPersonnel($programID);
|
||||
$this->view->title = $this->lang->personnel->invest;
|
||||
$this->view->position[] = $this->lang->personnel->invest;
|
||||
$this->view->invest = $this->personnel->getInvest($programID);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -98,7 +98,7 @@ class personnel extends control
|
||||
*/
|
||||
public function whitelist($objectID = 0, $module = 'personnel', $objectType = 'program', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1, $programID = 0, $from = '')
|
||||
{
|
||||
if($module == 'personnel') $this->setProgramNavMenu($objectID);
|
||||
if($module == 'personnel') $this->setProgramMenu($objectID);
|
||||
|
||||
if($module == 'product')
|
||||
{
|
||||
@@ -148,8 +148,8 @@ class personnel extends control
|
||||
*/
|
||||
public function addWhitelist($objectID = 0, $deptID = 0, $objectType = 'program', $module = 'personnel', $programID = 0, $from = '')
|
||||
{
|
||||
if($module == 'personnel') $this->setProgramNavMenu($objectID);
|
||||
$this->app->loadLang('project');
|
||||
if($module == 'personnel') $this->setProgramMenu($objectID);
|
||||
$this->app->loadLang('execution');
|
||||
|
||||
if($_POST)
|
||||
{
|
||||
@@ -190,11 +190,11 @@ class personnel extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function unbindWhielist($id = 0, $confirm = 'no')
|
||||
public function unbindWhitelist($id = 0, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->personnel->confirmDelete, inLink('unbindWhielist',"id=$id&confirm=yes")));
|
||||
die(js::confirm($this->lang->personnel->confirmDelete, inLink('unbindWhitelist',"id=$id&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -215,13 +215,13 @@ class personnel extends control
|
||||
}
|
||||
|
||||
/*
|
||||
* Setting up the program's navigation menu.
|
||||
* Setting up the program menu.
|
||||
*
|
||||
* @param int $programID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function setProgramNavMenu($programID = 0)
|
||||
public function setProgramMenu($programID = 0)
|
||||
{
|
||||
$this->loadModel('program');
|
||||
$this->lang->navGroup->program = 'program';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
$lang->personnel->common = 'Program Personnel';
|
||||
$lang->personnel->accessible = 'Acess List';
|
||||
$lang->personnel->putInto = 'Input Resource';
|
||||
$lang->personnel->invest = 'Input Resource';
|
||||
$lang->personnel->department = 'Department';
|
||||
$lang->personnel->realName = 'Name';
|
||||
$lang->personnel->userName = 'Account';
|
||||
@@ -21,7 +21,7 @@ $lang->personnel->bug = 'Bug';
|
||||
$lang->personnel->createStories = 'Story';
|
||||
$lang->personnel->risk = 'Risk';
|
||||
$lang->personnel->issue = 'Issue';
|
||||
$lang->personnel->putInto = 'Input';
|
||||
$lang->personnel->invest = 'Input';
|
||||
$lang->personnel->left = 'Remained';
|
||||
$lang->personnel->created = 'Created';
|
||||
$lang->personnel->finished = 'Finished';
|
||||
@@ -32,7 +32,7 @@ $lang->personnel->SR = $lang->SRCommon;
|
||||
|
||||
$lang->personnel->whitelist = 'Whitelist';
|
||||
$lang->personnel->addWhitelist = 'Add Whitelist';
|
||||
$lang->personnel->unbindWhielist = 'Remove Whitelist';
|
||||
$lang->personnel->unbindWhitelist = 'Remove Whitelist';
|
||||
$lang->personnel->confirmDelete = 'Confirm removal of the user from the whitelist?';
|
||||
|
||||
$lang->personnel->openedPGMTip = 'The program is public and can be accessed by users with Program privileges.';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
$lang->personnel->common = 'Program Personnel';
|
||||
$lang->personnel->accessible = 'Acess List';
|
||||
$lang->personnel->putInto = 'Input Resource';
|
||||
$lang->personnel->invest = 'Input Resource';
|
||||
$lang->personnel->department = 'Department';
|
||||
$lang->personnel->realName = 'Name';
|
||||
$lang->personnel->userName = 'Account';
|
||||
@@ -21,7 +21,7 @@ $lang->personnel->bug = 'Bug';
|
||||
$lang->personnel->createStories = 'Story';
|
||||
$lang->personnel->risk = 'Risk';
|
||||
$lang->personnel->issue = 'Issue';
|
||||
$lang->personnel->putInto = 'Input';
|
||||
$lang->personnel->invest = 'Input';
|
||||
$lang->personnel->left = 'Remained';
|
||||
$lang->personnel->created = 'Created';
|
||||
$lang->personnel->finished = 'Finished';
|
||||
@@ -32,7 +32,7 @@ $lang->personnel->SR = $lang->SRCommon;
|
||||
|
||||
$lang->personnel->whitelist = 'Whitelist';
|
||||
$lang->personnel->addWhitelist = 'Add Whitelist';
|
||||
$lang->personnel->unbindWhielist = 'Remove Whitelist';
|
||||
$lang->personnel->unbindWhitelist = 'Remove Whitelist';
|
||||
$lang->personnel->confirmDelete = 'Confirm removal of the user from the whitelist?';
|
||||
|
||||
$lang->personnel->openedPGMTip = 'The program is public and can be accessed by users with Program privileges.';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
$lang->personnel->common = 'Program Personnel';
|
||||
$lang->personnel->accessible = 'Acess List';
|
||||
$lang->personnel->putInto = 'Input Resource';
|
||||
$lang->personnel->invest = 'Input Resource';
|
||||
$lang->personnel->department = 'Department';
|
||||
$lang->personnel->realName = 'Name';
|
||||
$lang->personnel->userName = 'Account';
|
||||
@@ -21,7 +21,7 @@ $lang->personnel->bug = 'Bug';
|
||||
$lang->personnel->createStories = 'Story';
|
||||
$lang->personnel->risk = 'Risk';
|
||||
$lang->personnel->issue = 'Issue';
|
||||
$lang->personnel->putInto = 'Input';
|
||||
$lang->personnel->invest = 'Input';
|
||||
$lang->personnel->left = 'Remained';
|
||||
$lang->personnel->created = 'Created';
|
||||
$lang->personnel->finished = 'Finished';
|
||||
@@ -32,7 +32,7 @@ $lang->personnel->SR = $lang->SRCommon;
|
||||
|
||||
$lang->personnel->whitelist = 'Whitelist';
|
||||
$lang->personnel->addWhitelist = 'Add Whitelist';
|
||||
$lang->personnel->unbindWhielist = 'Remove Whitelist';
|
||||
$lang->personnel->unbindWhitelist = 'Remove Whitelist';
|
||||
$lang->personnel->confirmDelete = 'Confirm removal of the user from the whitelist?';
|
||||
|
||||
$lang->personnel->openedPGMTip = 'The program is public and can be accessed by users with Program privileges.';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
$lang->personnel->common = 'Program Personnel';
|
||||
$lang->personnel->accessible = 'Acess List';
|
||||
$lang->personnel->putInto = 'Input Resource';
|
||||
$lang->personnel->invest = 'Input Resource';
|
||||
$lang->personnel->department = 'Department';
|
||||
$lang->personnel->realName = 'Name';
|
||||
$lang->personnel->userName = 'Account';
|
||||
@@ -21,7 +21,7 @@ $lang->personnel->bug = 'Bug';
|
||||
$lang->personnel->createStories = 'Story';
|
||||
$lang->personnel->risk = 'Risk';
|
||||
$lang->personnel->issue = 'Issue';
|
||||
$lang->personnel->putInto = 'Input';
|
||||
$lang->personnel->invest = 'Input';
|
||||
$lang->personnel->left = 'Remained';
|
||||
$lang->personnel->created = 'Created';
|
||||
$lang->personnel->finished = 'Finished';
|
||||
@@ -32,7 +32,7 @@ $lang->personnel->SR = $lang->SRCommon;
|
||||
|
||||
$lang->personnel->whitelist = 'Whitelist';
|
||||
$lang->personnel->addWhitelist = 'Add Whitelist';
|
||||
$lang->personnel->unbindWhielist = 'Remove Whitelist';
|
||||
$lang->personnel->unbindWhitelist = 'Remove Whitelist';
|
||||
$lang->personnel->confirmDelete = 'Confirm removal of the user from the whitelist?';
|
||||
|
||||
$lang->personnel->openedPGMTip = 'The program is public and can be accessed by users with Program privileges.';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
$lang->personnel->common = '项目集人员';
|
||||
$lang->personnel->accessible = '可访问人员列表';
|
||||
$lang->personnel->putInto = '投入人员列表';
|
||||
$lang->personnel->invest = '投入人员列表';
|
||||
$lang->personnel->department = '部门';
|
||||
$lang->personnel->realName = '真实姓名';
|
||||
$lang->personnel->userName = '用户名';
|
||||
@@ -21,7 +21,7 @@ $lang->personnel->bug = 'Bug';
|
||||
$lang->personnel->createStories = '创建需求数';
|
||||
$lang->personnel->risk = '风险';
|
||||
$lang->personnel->issue = '问题';
|
||||
$lang->personnel->putInto = '已投入';
|
||||
$lang->personnel->invest = '已投入';
|
||||
$lang->personnel->left = '剩余';
|
||||
$lang->personnel->created = '创建';
|
||||
$lang->personnel->finished = '完成';
|
||||
@@ -32,7 +32,7 @@ $lang->personnel->SR = $lang->SRCommon;
|
||||
|
||||
$lang->personnel->whitelist = '白名单列表';
|
||||
$lang->personnel->addWhitelist = '添加白名单';
|
||||
$lang->personnel->unbindWhielist = '删除白名单';
|
||||
$lang->personnel->unbindWhitelist = '删除白名单';
|
||||
$lang->personnel->confirmDelete = '确认将该用户移除白名单?';
|
||||
|
||||
$lang->personnel->openedPGMTip = '该项目集是公开状态,有项目集视图权限的人员即可访问。';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
$lang->personnel->common = '項目集人員';
|
||||
$lang->personnel->accessible = '可訪問人員列表';
|
||||
$lang->personnel->putInto = '投入人員列表';
|
||||
$lang->personnel->invest = '投入人員列表';
|
||||
$lang->personnel->department = '部門';
|
||||
$lang->personnel->realName = '真實姓名';
|
||||
$lang->personnel->userName = '用戶名';
|
||||
@@ -21,7 +21,7 @@ $lang->personnel->bug = 'Bug';
|
||||
$lang->personnel->createStories = '創建需求數';
|
||||
$lang->personnel->risk = '風險';
|
||||
$lang->personnel->issue = '問題';
|
||||
$lang->personnel->putInto = '已投入';
|
||||
$lang->personnel->invest = '已投入';
|
||||
$lang->personnel->left = '剩餘';
|
||||
$lang->personnel->created = '創建';
|
||||
$lang->personnel->finished = '完成';
|
||||
@@ -32,7 +32,7 @@ $lang->personnel->SR = $lang->SRCommon;
|
||||
|
||||
$lang->personnel->whitelist = '白名單列表';
|
||||
$lang->personnel->addWhitelist = '添加白名單';
|
||||
$lang->personnel->unbindWhielist = '刪除白名單';
|
||||
$lang->personnel->unbindWhitelist = '刪除白名單';
|
||||
$lang->personnel->confirmDelete = '確認將該用戶移除白名單?';
|
||||
|
||||
$lang->personnel->openedPGMTip = '該項目集是公開狀態,有項目集視圖權限的人員即可訪問。';
|
||||
|
||||
+65
-65
@@ -12,7 +12,7 @@
|
||||
class personnelModel extends model
|
||||
{
|
||||
/**
|
||||
* Access to program set input staff.
|
||||
* Access to program set invest staff.
|
||||
*
|
||||
* @param int $programID
|
||||
* @param int $deptID
|
||||
@@ -56,13 +56,13 @@ class personnelModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Access to program set input staff.
|
||||
* Get invest person list.
|
||||
*
|
||||
* @param int $programID
|
||||
* @param int $programID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getInputPersonnel($programID = 0)
|
||||
public function getInvest($programID = 0)
|
||||
{
|
||||
$personnelList = array();
|
||||
|
||||
@@ -79,14 +79,14 @@ class personnelModel extends model
|
||||
if(empty($accountPairs)) return $personnelList;
|
||||
|
||||
$executionPairs = $this->getInvolvedExecutions($projects);
|
||||
$taskInput = $this->getProjectTaskInput($projects, $accountPairs);
|
||||
$bugAndStoryInput = $this->getBugAndStoryInput($accountPairs, $programID);
|
||||
$taskInvest = $this->getProjectTaskInvest($projects, $accountPairs);
|
||||
$bugAndStoryInvest = $this->getBugAndStoryInvest($accountPairs, $programID);
|
||||
if(isset($this->config->maxVersion))
|
||||
{
|
||||
$issueInput = $this->getIssueInput($accountPairs, $projects);
|
||||
$riskInput = $this->getRiskInput($accountPairs, $projects);
|
||||
$issueInvest = $this->getIssueInvest($accountPairs, $projects);
|
||||
$riskInvest = $this->getRiskInvest($accountPairs, $projects);
|
||||
}
|
||||
$userPairs = $this->loadModel('user')->getListByAccounts(array_keys($accountPairs), 'account');
|
||||
$userPairs = $this->loadModel('user')->getListByAccounts(array_keys($accountPairs), 'account');
|
||||
foreach($userPairs as $user) $user->role = zget($this->lang->user->roleList, $user->role, $user->role);
|
||||
|
||||
foreach($accountPairs as $account => $projects)
|
||||
@@ -97,12 +97,12 @@ class personnelModel extends model
|
||||
$personnelList[$account]['projects'] = $projects;
|
||||
$personnelList[$account]['executions'] = zget($executionPairs, $account, 0);
|
||||
|
||||
$personnelList[$account] += $taskInput[$account];
|
||||
$personnelList[$account] += $bugAndStoryInput[$account];
|
||||
$personnelList[$account] += $taskInvest[$account];
|
||||
$personnelList[$account] += $bugAndStoryInvest[$account];
|
||||
if(isset($this->config->maxVersion))
|
||||
{
|
||||
$personnelList[$account] += $issueInput[$account];
|
||||
$personnelList[$account] += $riskInput[$account];
|
||||
$personnelList[$account] += $issueInvest[$account];
|
||||
$personnelList[$account] += $riskInvest[$account];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,14 +110,14 @@ class personnelModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user project risk input.
|
||||
* Get user project risk invest.
|
||||
*
|
||||
* @param array $accounts
|
||||
* @param object $projects
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getRiskInput($accounts, $projects)
|
||||
public function getRiskInvest($accounts, $projects)
|
||||
{
|
||||
$risks = $this->dao->select('id,createdBy,resolvedBy,status,assignedTo')->from(TABLE_RISK)
|
||||
->where('project')->in(array_keys($projects))
|
||||
@@ -125,33 +125,33 @@ class personnelModel extends model
|
||||
->fetchAll('id');
|
||||
|
||||
/* Initialization personnel risks. */
|
||||
$putInto = array();
|
||||
$invest = array();
|
||||
foreach($accounts as $account => $project)
|
||||
{
|
||||
$putInto[$account]['createdRisk'] = 0;
|
||||
$putInto[$account]['resolvedRisk'] = 0;
|
||||
$putInto[$account]['pendingRisk'] = 0;
|
||||
$invest[$account]['createdRisk'] = 0;
|
||||
$invest[$account]['resolvedRisk'] = 0;
|
||||
$invest[$account]['pendingRisk'] = 0;
|
||||
}
|
||||
|
||||
foreach($risks as $risk)
|
||||
{
|
||||
if($risk->createdBy && isset($putInto[$risk->createdBy])) $putInto[$risk->createdBy]['createdRisk'] += 1;
|
||||
if($risk->resolvedBy && isset($putInto[$risk->resolvedBy])) $putInto[$risk->resolvedBy]['resolvedRisk'] += 1;
|
||||
if($risk->assignedTo && $risk->status == 'active' && isset($putInto[$risk->assignedTo])) $putInto[$risk->assignedTo]['pendingRisk'] += 1;
|
||||
if($risk->createdBy && isset($invest[$risk->createdBy])) $invest[$risk->createdBy]['createdRisk'] += 1;
|
||||
if($risk->resolvedBy && isset($invest[$risk->resolvedBy])) $invest[$risk->resolvedBy]['resolvedRisk'] += 1;
|
||||
if($risk->assignedTo && $risk->status == 'active' && isset($invest[$risk->assignedTo])) $invest[$risk->assignedTo]['pendingRisk'] += 1;
|
||||
}
|
||||
|
||||
return $putInto;
|
||||
return $invest;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user project issue input.
|
||||
* Get user project issue invest.
|
||||
*
|
||||
* @param array $accounts
|
||||
* @param object $projects
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getIssueInput($accounts, $projects)
|
||||
public function getIssueInvest($accounts, $projects)
|
||||
{
|
||||
$issues = $this->dao->select('id,createdBy,resolvedBy,status,assignedTo')->from(TABLE_ISSUE)
|
||||
->where('project')->in(array_keys($projects))
|
||||
@@ -159,33 +159,33 @@ class personnelModel extends model
|
||||
->fetchAll('id');
|
||||
|
||||
/* Initialization personnel issues. */
|
||||
$putInto = array();
|
||||
$invest = array();
|
||||
foreach($accounts as $account => $project)
|
||||
{
|
||||
$putInto[$account]['createdIssue'] = 0;
|
||||
$putInto[$account]['resolvedIssue'] = 0;
|
||||
$putInto[$account]['pendingIssue'] = 0;
|
||||
$invest[$account]['createdIssue'] = 0;
|
||||
$invest[$account]['resolvedIssue'] = 0;
|
||||
$invest[$account]['pendingIssue'] = 0;
|
||||
}
|
||||
|
||||
foreach($issues as $issue)
|
||||
{
|
||||
if($issue->createdBy && isset($putInto[$issue->createdBy])) $putInto[$issue->createdBy]['createdIssue'] += 1;
|
||||
if($issue->resolvedBy && isset($putInto[$issue->resolvedBy])) $putInto[$issue->resolvedBy]['resolvedIssue'] += 1;
|
||||
if($issue->assignedTo && in_array($issue->status, array('unconfirmed', 'confirmed', 'active')) && isset($putInto[$issue->assignedTo])) $putInto[$issue->assignedTo]['pendingIssue'] += 1;
|
||||
if($issue->createdBy && isset($invest[$issue->createdBy])) $invest[$issue->createdBy]['createdIssue'] += 1;
|
||||
if($issue->resolvedBy && isset($invest[$issue->resolvedBy])) $invest[$issue->resolvedBy]['resolvedIssue'] += 1;
|
||||
if($issue->assignedTo && in_array($issue->status, array('unconfirmed', 'confirmed', 'active')) && isset($invest[$issue->assignedTo])) $invest[$issue->assignedTo]['pendingIssue'] += 1;
|
||||
}
|
||||
|
||||
return $putInto;
|
||||
return $invest;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user bug and story input.
|
||||
* Get user bug and story invest.
|
||||
*
|
||||
* @param array $accounts
|
||||
* @param int $programID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getBugAndStoryInput($accounts, $programID)
|
||||
public function getBugAndStoryInvest($accounts, $programID)
|
||||
{
|
||||
$productPairs = $this->loadModel('product')->getPairs('', $programID);
|
||||
$productKeys = array_keys($productPairs);
|
||||
@@ -212,26 +212,26 @@ class personnelModel extends model
|
||||
->fetchPairs('openedBy');
|
||||
|
||||
/* Initialize bugs and requirements related to personnel. */
|
||||
$putInto = array();
|
||||
$invest = array();
|
||||
foreach($accounts as $account => $project)
|
||||
{
|
||||
$putInto[$account]['createdBug'] = 0;
|
||||
$putInto[$account]['resolvedBug'] = 0;
|
||||
$putInto[$account]['pendingBug'] = 0;
|
||||
$putInto[$account]['UR'] = 0;
|
||||
$putInto[$account]['SR'] = 0;
|
||||
$invest[$account]['createdBug'] = 0;
|
||||
$invest[$account]['resolvedBug'] = 0;
|
||||
$invest[$account]['pendingBug'] = 0;
|
||||
$invest[$account]['UR'] = 0;
|
||||
$invest[$account]['SR'] = 0;
|
||||
}
|
||||
|
||||
foreach($requirement as $account => $number) $putInto[$account]['UR'] = $number;
|
||||
foreach($story as $account => $number) $putInto[$account]['SR'] = $number;
|
||||
foreach($requirement as $account => $number) $invest[$account]['UR'] = $number;
|
||||
foreach($story as $account => $number) $invest[$account]['SR'] = $number;
|
||||
|
||||
foreach($bugs as $bug)
|
||||
{
|
||||
if($bug->openedBy && isset($putInto[$bug->openedBy])) $putInto[$bug->openedBy]['createdBug'] += 1;
|
||||
if($bug->resolvedBy && isset($putInto[$bug->resolvedBy])) $putInto[$bug->resolvedBy]['resolvedBug'] += 1;
|
||||
if($bug->assignedTo && $bug->status == 'active' && isset($putInto[$bug->assignedTo])) $putInto[$bug->assignedTo]['pendingBug'] += 1;
|
||||
if($bug->openedBy && isset($invest[$bug->openedBy])) $invest[$bug->openedBy]['createdBug'] += 1;
|
||||
if($bug->resolvedBy && isset($invest[$bug->resolvedBy])) $invest[$bug->resolvedBy]['resolvedBug'] += 1;
|
||||
if($bug->assignedTo && $bug->status == 'active' && isset($invest[$bug->assignedTo])) $invest[$bug->assignedTo]['pendingBug'] += 1;
|
||||
}
|
||||
return $putInto;
|
||||
return $invest;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -273,14 +273,14 @@ class personnelModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Get project task inputs.
|
||||
* Get project task invest.
|
||||
*
|
||||
* @param object $projects
|
||||
* @param array $accounts
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getProjectTaskInput($projects, $accounts)
|
||||
public function getProjectTaskInvest($projects, $accounts)
|
||||
{
|
||||
$tasks = $this->dao->select('id,status,openedBy,finishedBy,assignedTo,project')->from(TABLE_TASK)
|
||||
->where('project')->in(array_keys($projects))
|
||||
@@ -288,35 +288,35 @@ class personnelModel extends model
|
||||
->fetchAll('id');
|
||||
|
||||
/* Initialize personnel related tasks. */
|
||||
$putInto = array();
|
||||
$invest = array();
|
||||
foreach($accounts as $account => $project)
|
||||
{
|
||||
$putInto[$account]['createdTask'] = 0;
|
||||
$putInto[$account]['finishedTask'] = 0;
|
||||
$putInto[$account]['pendingTask'] = 0;
|
||||
$putInto[$account]['consumedTask'] = 0;
|
||||
$putInto[$account]['leftTask'] = 0;
|
||||
$invest[$account]['createdTask'] = 0;
|
||||
$invest[$account]['finishedTask'] = 0;
|
||||
$invest[$account]['pendingTask'] = 0;
|
||||
$invest[$account]['consumedTask'] = 0;
|
||||
$invest[$account]['leftTask'] = 0;
|
||||
}
|
||||
|
||||
/* Number of tasks per person. */
|
||||
$userTasks = array();
|
||||
foreach($tasks as $task)
|
||||
{
|
||||
if($task->openedBy && isset($putInto[$task->openedBy]))
|
||||
if($task->openedBy && isset($invest[$task->openedBy]))
|
||||
{
|
||||
$putInto[$task->openedBy]['createdTask'] += 1;
|
||||
$invest[$task->openedBy]['createdTask'] += 1;
|
||||
$userTasks[$task->openedBy][$task->id] = $task->id;
|
||||
}
|
||||
|
||||
if($task->finishedBy && isset($putInto[$task->finishedBy]))
|
||||
if($task->finishedBy && isset($invest[$task->finishedBy]))
|
||||
{
|
||||
$putInto[$task->finishedBy]['finishedTask'] += 1;
|
||||
$invest[$task->finishedBy]['finishedTask'] += 1;
|
||||
$userTasks[$task->finishedBy][$task->id] = $task->id;
|
||||
}
|
||||
|
||||
if($task->assignedTo && $task->status == 'wait' && isset($putInto[$task->assignedTo]))
|
||||
if($task->assignedTo && $task->status == 'wait' && isset($invest[$task->assignedTo]))
|
||||
{
|
||||
$putInto[$task->assignedTo]['pendingTask'] += 1;
|
||||
$invest[$task->assignedTo]['pendingTask'] += 1;
|
||||
$userTasks[$task->assignedTo][$task->id] = $task->id;
|
||||
}
|
||||
}
|
||||
@@ -334,11 +334,11 @@ class personnelModel extends model
|
||||
|
||||
foreach($userHours as $account => $hours)
|
||||
{
|
||||
$putInto[$account]['leftTask'] = $hours->left;
|
||||
$putInto[$account]['consumedTask'] = $hours->consumed;
|
||||
$invest[$account]['leftTask'] = $hours->left;
|
||||
$invest[$account]['consumedTask'] = $hours->consumed;
|
||||
}
|
||||
|
||||
return $putInto;
|
||||
return $invest;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -409,7 +409,7 @@ class personnelModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Access to program set input staff.
|
||||
* Access to program set invest staff.
|
||||
*
|
||||
* @param int $objectID
|
||||
* @param string $objectType program|project|product|sprint
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* The html template file of putInto method of personnel module of ZenTaoPMS.
|
||||
* The html template file of invest method of personnel 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)
|
||||
@@ -22,20 +22,20 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan='2' class="w-80px"> <?php echo $lang->personnel->name;?></th>
|
||||
<th rowspan='2'> <?php echo $lang->personnel->role;?></th>
|
||||
<th rowspan='2'> <?php echo $lang->personnel->projects;?></th>
|
||||
<th rowspan='2'> <?php echo $lang->personnel->executions;?></th>
|
||||
<th colspan="2"> <?php echo $lang->personnel->workingHours;?></th>
|
||||
<th colspan="3"> <?php echo $lang->personnel->task;?></th>
|
||||
<th colspan="3"> <?php echo $lang->personnel->bug;?></th>
|
||||
<th rowspan='2'><?php echo $lang->personnel->role;?></th>
|
||||
<th rowspan='2'><?php echo $lang->personnel->projects;?></th>
|
||||
<th rowspan='2'><?php echo $lang->personnel->executions;?></th>
|
||||
<th colspan="2"><?php echo $lang->personnel->workingHours;?></th>
|
||||
<th colspan="3"><?php echo $lang->personnel->task;?></th>
|
||||
<th colspan="3"><?php echo $lang->personnel->bug;?></th>
|
||||
<th colspan="2" class="w-150px"><?php echo $lang->personnel->createStories;?></th>
|
||||
<?php if(isset($this->config->maxVersion)): ?>
|
||||
<th colspan="3"> <?php echo $lang->personnel->issue;?></th>
|
||||
<th colspan="3"> <?php echo $lang->personnel->risk;?></th>
|
||||
<th colspan="3"><?php echo $lang->personnel->issue;?></th>
|
||||
<th colspan="3"><?php echo $lang->personnel->risk;?></th>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->personnel->putInto;?></th>
|
||||
<th><?php echo $lang->personnel->invest;?></th>
|
||||
<th><?php echo $lang->personnel->left;?></th>
|
||||
<th><?php echo $lang->personnel->created;?></th>
|
||||
<th><?php echo $lang->personnel->finished;?></th>
|
||||
@@ -56,7 +56,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="sortable">
|
||||
<?php foreach($inputPersonnel as $personnel):?>
|
||||
<?php foreach($invest as $personnel):?>
|
||||
<tr>
|
||||
<td title='<?php echo $personnel['realname'];?>'><?php echo $personnel['realname'];?></td>
|
||||
<td title='<?php echo $personnel['role'];?>'><?php echo $personnel['role'];?></td>
|
||||
@@ -58,8 +58,8 @@
|
||||
<td title="<?php echo $user->email;?>"><?php echo $user->email;?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
$deleteClass = common::hasPriv($module, 'unbindWhielist') ? 'btn' : 'btn disabled';
|
||||
echo html::a($this->createLink($module, 'unbindWhielist', "id=$user->id&confirm=no"), '<i class="icon-unlink"></i>', 'hiddenwin', "title='{$lang->personnel->delete}' class='{$deleteClass}' $openApp");
|
||||
$deleteClass = common::hasPriv($module, 'unbindWhitelist') ? 'btn' : 'btn disabled';
|
||||
echo html::a($this->createLink($module, 'unbindWhitelist', "id=$user->id&confirm=no"), '<i class="icon-unlink"></i>', 'hiddenwin', "title='{$lang->personnel->delete}' class='{$deleteClass}' $openApp");
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -1136,9 +1136,9 @@ class product extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function unbindWhielist($id = 0, $confirm = 'no')
|
||||
public function unbindWhitelist($id = 0, $confirm = 'no')
|
||||
{
|
||||
echo $this->fetch('personnel', 'unbindWhielist', "id=$id&confirm=$confirm");
|
||||
echo $this->fetch('personnel', 'unbindWhitelist', "id=$id&confirm=$confirm");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -92,7 +92,7 @@ $lang->product->RD = 'Release Manager';
|
||||
$lang->product->acl = 'Zugriffskontrolle';
|
||||
$lang->product->whitelist = 'Whitelist';
|
||||
$lang->product->addWhitelist = 'Add Whitelist';
|
||||
$lang->product->unbindWhielist = 'Remove Whitelist';
|
||||
$lang->product->unbindWhitelist = 'Remove Whitelist';
|
||||
$lang->product->branch = '%s';
|
||||
$lang->product->qa = 'QA';
|
||||
$lang->product->release = 'Release';
|
||||
|
||||
@@ -92,7 +92,7 @@ $lang->product->RD = 'Release Manager';
|
||||
$lang->product->acl = 'Access Control';
|
||||
$lang->product->whitelist = 'Whitelist';
|
||||
$lang->product->addWhitelist = 'Add Whitelist';
|
||||
$lang->product->unbindWhielist = 'Remove Whitelist';
|
||||
$lang->product->unbindWhitelist = 'Remove Whitelist';
|
||||
$lang->product->branch = '%s';
|
||||
$lang->product->qa = 'Test';
|
||||
$lang->product->release = 'Release';
|
||||
|
||||
@@ -92,7 +92,7 @@ $lang->product->RD = 'Release Manager';
|
||||
$lang->product->acl = "Contrôle accès";
|
||||
$lang->product->whitelist = 'Liste Blanche';
|
||||
$lang->product->addWhitelist = 'Add Whitelist';
|
||||
$lang->product->unbindWhielist = 'Remove Whitelist';
|
||||
$lang->product->unbindWhitelist = 'Remove Whitelist';
|
||||
$lang->product->branch = '%s';
|
||||
$lang->product->qa = 'QA';
|
||||
$lang->product->release = 'Release';
|
||||
|
||||
@@ -92,7 +92,7 @@ $lang->product->RD = 'Quản lý phát hành';
|
||||
$lang->product->acl = 'Quyền truy cập';
|
||||
$lang->product->whitelist = 'Danh sách trắng';
|
||||
$lang->product->addWhitelist = 'Add Whitelist';
|
||||
$lang->product->unbindWhielist = 'Remove Whitelist';
|
||||
$lang->product->unbindWhitelist = 'Remove Whitelist';
|
||||
$lang->product->branch = '%s';
|
||||
$lang->product->qa = 'QA';
|
||||
$lang->product->release = 'Phát hành';
|
||||
|
||||
@@ -92,7 +92,7 @@ $lang->product->RD = '发布负责人';
|
||||
$lang->product->acl = '访问控制';
|
||||
$lang->product->whitelist = '白名单';
|
||||
$lang->product->addWhitelist = '添加白名单';
|
||||
$lang->product->unbindWhielist = '删除白名单';
|
||||
$lang->product->unbindWhitelist = '删除白名单';
|
||||
$lang->product->branch = '所属%s';
|
||||
$lang->product->qa = '测试';
|
||||
$lang->product->release = '发布';
|
||||
|
||||
@@ -88,7 +88,7 @@ $lang->product->RD = '發佈負責人';
|
||||
$lang->product->acl = '訪問控制';
|
||||
$lang->product->whitelist = '白名單';
|
||||
$lang->product->addWhitelist = '添加白名單';
|
||||
$lang->product->unbindWhielist = '刪除白名單';
|
||||
$lang->product->unbindWhitelist = '刪除白名單';
|
||||
$lang->product->branch = '所屬%s';
|
||||
$lang->product->qa = '測試';
|
||||
$lang->product->release = '發佈';
|
||||
|
||||
@@ -102,8 +102,10 @@ class productModel extends model
|
||||
*/
|
||||
public function select($products, $productID, $currentModule, $currentMethod, $extra = '', $branch = 0, $module = 0, $moduleType = '')
|
||||
{
|
||||
$isProjectBug = isset($products[0]) ? true : false;
|
||||
|
||||
$this->app->loadLang('product');
|
||||
if(!$productID)
|
||||
if(!$isProjectBug and !$productID)
|
||||
{
|
||||
unset($this->lang->product->setMenu->branch);
|
||||
return;
|
||||
@@ -111,13 +113,19 @@ class productModel extends model
|
||||
$isMobile = $this->app->viewType == 'mhtml';
|
||||
|
||||
setCookie("lastProduct", $productID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
$currentProduct = $this->getById($productID);
|
||||
if($productID) $currentProduct = $this->getById($productID);
|
||||
if($isProjectBug and !$productID)
|
||||
{
|
||||
$currentProduct = new stdclass();
|
||||
$currentProduct->name = $products[$productID];
|
||||
$currentProduct->type = 'normal';
|
||||
}
|
||||
$this->session->set('currentProductType', $currentProduct->type);
|
||||
|
||||
$output = '';
|
||||
if(!empty($products))
|
||||
{
|
||||
$dropMenuLink = helper::createLink('product', 'ajaxGetDropMenu', "objectID=$productID&module=$currentModule&method=$currentMethod&extra=$extra");
|
||||
$dropMenuLink = helper::createLink($isProjectBug ? 'bug' : 'product', 'ajaxGetDropMenu', "objectID=$productID&module=$currentModule&method=$currentMethod&extra=$extra");
|
||||
$output = "<div class='btn-group angle-btn'><div class='btn-group'><button data-toggle='dropdown' type='button' class='btn btn-limit' id='currentItem' title='{$currentProduct->name}'><span class='text'>{$currentProduct->name}</span> <span class='caret'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='$dropMenuLink'>";
|
||||
$output .= '<div class="input-control search-box has-icon-left has-icon-right search-example"><input type="search" class="form-control search-input" /><label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label><a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a></div>';
|
||||
$output .= "</div></div>";
|
||||
|
||||
@@ -31,7 +31,7 @@ $lang->program->PRJUpdateOrder = '排序';
|
||||
$lang->program->PRJSort = '項目排序';
|
||||
$lang->program->PRJWhitelist = '項目白名單';
|
||||
$lang->program->PRJAddWhitelist = '項目添加白名單';
|
||||
$lang->program->unbindWhielist = '項目刪除白名單';
|
||||
$lang->program->unbindWhitelist = '項目刪除白名單';
|
||||
$lang->program->PRJManageProducts = '關聯產品';
|
||||
$lang->program->view = '項目集詳情';
|
||||
$lang->program->copyTitle = '請選擇要複製的項目';
|
||||
|
||||
@@ -1189,9 +1189,9 @@ class project extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function unbindWhielist($id = 0, $confirm = 'no')
|
||||
public function unbindWhitelist($id = 0, $confirm = 'no')
|
||||
{
|
||||
echo $this->fetch('personnel', 'unbindWhielist', "id=$id&confirm=$confirm");
|
||||
echo $this->fetch('personnel', 'unbindWhitelist', "id=$id&confirm=$confirm");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,7 +32,7 @@ $lang->project->updateOrder = 'Order';
|
||||
$lang->project->sort = 'Order';
|
||||
$lang->project->whitelist = 'Project Whitelist';
|
||||
$lang->project->addWhitelist = 'Project Add Whitelist';
|
||||
$lang->project->unbindWhielist = 'Project Remove Whitelist';
|
||||
$lang->project->unbindWhitelist = 'Project Remove Whitelist';
|
||||
$lang->project->manageProducts = 'Manage Products';
|
||||
$lang->project->copyTitle = 'Please select an project to copy';
|
||||
$lang->project->errorSameProducts = 'Project cannot be associated with multiple identical products.';
|
||||
|
||||
@@ -32,7 +32,7 @@ $lang->project->updateOrder = 'Order';
|
||||
$lang->project->sort = 'Order';
|
||||
$lang->project->whitelist = 'Project Whitelist';
|
||||
$lang->project->addWhitelist = 'Project Add Whitelist';
|
||||
$lang->project->unbindWhielist = 'Project Remove Whitelist';
|
||||
$lang->project->unbindWhitelist = 'Project Remove Whitelist';
|
||||
$lang->project->manageProducts = 'Manage Products';
|
||||
$lang->project->copyTitle = 'Please select an project to copy';
|
||||
$lang->project->errorSameProducts = 'Project cannot be associated with multiple identical products.';
|
||||
|
||||
@@ -32,7 +32,7 @@ $lang->project->updateOrder = 'Order';
|
||||
$lang->project->sort = 'Order';
|
||||
$lang->project->whitelist = 'Project Whitelist';
|
||||
$lang->project->addWhitelist = 'Project Add Whitelist';
|
||||
$lang->project->unbindWhielist = 'Project Remove Whitelist';
|
||||
$lang->project->unbindWhitelist = 'Project Remove Whitelist';
|
||||
$lang->project->manageProducts = 'Manage Products';
|
||||
$lang->project->copyTitle = 'Please select an project to copy';
|
||||
$lang->project->errorSameProducts = 'Project cannot be associated with multiple identical products.';
|
||||
|
||||
@@ -32,7 +32,7 @@ $lang->project->updateOrder = 'Order';
|
||||
$lang->project->sort = 'Order';
|
||||
$lang->project->whitelist = 'Project Whitelist';
|
||||
$lang->project->addWhitelist = 'Project Add Whitelist';
|
||||
$lang->project->unbindWhielist = 'Project Remove Whitelist';
|
||||
$lang->project->unbindWhitelist = 'Project Remove Whitelist';
|
||||
$lang->project->manageProducts = 'Manage Products';
|
||||
$lang->project->copyTitle = 'Please select an project to copy';
|
||||
$lang->project->errorSameProducts = 'Project cannot be associated with multiple identical products.';
|
||||
|
||||
@@ -33,7 +33,7 @@ $lang->project->updateOrder = '排序';
|
||||
$lang->project->sort = '项目排序';
|
||||
$lang->project->whitelist = '项目白名单';
|
||||
$lang->project->addWhitelist = '项目添加白名单';
|
||||
$lang->project->unbindWhielist = '项目删除白名单';
|
||||
$lang->project->unbindWhitelist = '项目删除白名单';
|
||||
$lang->project->manageProducts = '关联产品';
|
||||
$lang->project->copyTitle = '请选择要复制的项目';
|
||||
$lang->project->errorSameProducts = '项目不能关联多个相同的产品。';
|
||||
|
||||
@@ -31,7 +31,7 @@ $lang->project->PRJUpdateOrder = '排序';
|
||||
$lang->project->PRJSort = '項目排序';
|
||||
$lang->project->PRJWhitelist = '項目白名單';
|
||||
$lang->project->PRJAddWhitelist = '項目添加白名單';
|
||||
$lang->project->unbindWhielist = '項目刪除白名單';
|
||||
$lang->project->unbindWhitelist = '項目刪除白名單';
|
||||
$lang->project->PRJManageProducts = '關聯產品';
|
||||
$lang->project->view = '項目集詳情';
|
||||
$lang->project->copyTitle = '請選擇要複製的項目';
|
||||
|
||||
@@ -36,6 +36,11 @@ class qa extends control
|
||||
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
|
||||
$this->lang->noMenuModule[] = $this->app->rawModule;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->lang->qa->menu = $this->lang->projectQa->menu;
|
||||
$this->lang->qa->subMenu = $this->lang->projectQa->subMenu;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -48,6 +48,11 @@ class testcase extends control
|
||||
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
|
||||
//$this->lang->noMenuModule[] = $this->app->rawModule;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->lang->testcase->menu = $this->lang->projectQa->menu;
|
||||
$this->lang->testcase->subMenu = $this->lang->projectQa->subMenu;
|
||||
}
|
||||
|
||||
$this->view->products = $this->products = $this->product->getProductPairsByProject($this->projectID);
|
||||
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=testcase")));
|
||||
@@ -206,7 +211,7 @@ class testcase extends control
|
||||
}
|
||||
}
|
||||
|
||||
$this->app->loadLang('project');
|
||||
$this->app->loadLang('execution');
|
||||
$this->app->loadLang('task');
|
||||
|
||||
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testcase->common;
|
||||
|
||||
@@ -74,6 +74,8 @@ $lang->testcase->ignore = 'Ignore';
|
||||
$lang->testcase->fromTesttask = 'From Test Request';
|
||||
$lang->testcase->fromCaselib = 'From CaseLib';
|
||||
$lang->testcase->deleted = 'Deleted';
|
||||
$lang->testcase->browseUnits = 'Unit Test';
|
||||
|
||||
$lang->case = $lang->testcase; // For dao checking using. Because 'case' is a php keywords, so the module name is testcase, table name is still case.
|
||||
|
||||
$lang->testcase->stepID = 'ID';
|
||||
@@ -223,7 +225,8 @@ $lang->testcase->action->unlinkedfromexecution = array('main' => '$date, 由 <st
|
||||
$lang->testcase->featureBar['browse']['all'] = $lang->testcase->allCases;
|
||||
$lang->testcase->featureBar['browse']['wait'] = 'Wartend';
|
||||
$lang->testcase->featureBar['browse']['needconfirm'] = $lang->testcase->needConfirm;
|
||||
$lang->testcase->featureBar['browse']['group'] = '';
|
||||
$lang->testcase->featureBar['browse']['group'] = 'Group View';
|
||||
$lang->testcase->featureBar['browse']['suite'] = 'Suite';
|
||||
$lang->testcase->featureBar['browse']['zerocase'] = '';
|
||||
$lang->testcase->featureBar['browse']['zerocase'] = 'Zero Case Story';
|
||||
$lang->testcase->featureBar['browse']['browseunits'] = 'Unit Test';
|
||||
$lang->testcase->featureBar['groupcase'] = $lang->testcase->featureBar['browse'];
|
||||
|
||||
@@ -74,6 +74,8 @@ $lang->testcase->ignore = 'Ignore';
|
||||
$lang->testcase->fromTesttask = 'From Test Request';
|
||||
$lang->testcase->fromCaselib = 'From Case Library';
|
||||
$lang->testcase->deleted = 'Deleted';
|
||||
$lang->testcase->browseUnits = 'Unit Test';
|
||||
|
||||
$lang->case = $lang->testcase; // For dao checking using. Because 'case' is a php keywords, so the module name is testcase, table name is still case.
|
||||
|
||||
$lang->testcase->stepID = 'ID';
|
||||
@@ -223,7 +225,8 @@ $lang->testcase->action->unlinkedfromexecution = array('main' => '$date, 由 <st
|
||||
$lang->testcase->featureBar['browse']['all'] = $lang->testcase->allCases;
|
||||
$lang->testcase->featureBar['browse']['wait'] = 'Waiting';
|
||||
$lang->testcase->featureBar['browse']['needconfirm'] = $lang->testcase->needConfirm;
|
||||
$lang->testcase->featureBar['browse']['group'] = '';
|
||||
$lang->testcase->featureBar['browse']['group'] = 'Group View';
|
||||
$lang->testcase->featureBar['browse']['suite'] = 'Suite';
|
||||
$lang->testcase->featureBar['browse']['zerocase'] = '';
|
||||
$lang->testcase->featureBar['browse']['zerocase'] = 'Zero Case Story';
|
||||
$lang->testcase->featureBar['browse']['browseunits'] = 'Unit Test';
|
||||
$lang->testcase->featureBar['groupcase'] = $lang->testcase->featureBar['browse'];
|
||||
|
||||
@@ -74,6 +74,8 @@ $lang->testcase->ignore = 'Ignorer';
|
||||
$lang->testcase->fromTesttask = 'De Campagne';
|
||||
$lang->testcase->fromCaselib = 'De Library';
|
||||
$lang->testcase->deleted = 'Deleted';
|
||||
$lang->testcase->browseUnits = 'Unit Test';
|
||||
|
||||
$lang->case = $lang->testcase; // For dao checking using. Because 'case' is a php keywords, so the module name is testcase, table name is still case.
|
||||
|
||||
$lang->testcase->stepID = 'ID';
|
||||
@@ -223,7 +225,8 @@ $lang->testcase->action->unlinkedfromexecution = array('main' => '$date, 由 <st
|
||||
$lang->testcase->featureBar['browse']['all'] = $lang->testcase->allCases;
|
||||
$lang->testcase->featureBar['browse']['wait'] = 'En Attente';
|
||||
$lang->testcase->featureBar['browse']['needconfirm'] = $lang->testcase->needConfirm;
|
||||
$lang->testcase->featureBar['browse']['group'] = '';
|
||||
$lang->testcase->featureBar['browse']['suite'] = 'Cahier Recette';
|
||||
$lang->testcase->featureBar['browse']['zerocase'] = '';
|
||||
$lang->testcase->featureBar['browse']['group'] = 'Group View';
|
||||
$lang->testcase->featureBar['browse']['suite'] = 'Suite';
|
||||
$lang->testcase->featureBar['browse']['zerocase'] = 'Zero Case Story';
|
||||
$lang->testcase->featureBar['browse']['browseunits'] = 'Unit Test';
|
||||
$lang->testcase->featureBar['groupcase'] = $lang->testcase->featureBar['browse'];
|
||||
|
||||
@@ -74,6 +74,8 @@ $lang->testcase->ignore = 'Bỏ qua';
|
||||
$lang->testcase->fromTesttask = 'Từ Yêu cầu Test';
|
||||
$lang->testcase->fromCaselib = 'Từ thư viện tình huống';
|
||||
$lang->testcase->deleted = 'Đã xóa';
|
||||
$lang->testcase->browseUnits = 'Unit Test';
|
||||
|
||||
$lang->case = $lang->testcase; // For dao checking using. Because 'case' is a php keywords, so the module name is testcase, table name is still case.
|
||||
|
||||
$lang->testcase->stepID = 'ID';
|
||||
@@ -223,7 +225,8 @@ $lang->testcase->action->unlinkedfromexecution = array('main' => '$date, 由 <st
|
||||
$lang->testcase->featureBar['browse']['all'] = $lang->testcase->allCases;
|
||||
$lang->testcase->featureBar['browse']['wait'] = 'Đang đợi';
|
||||
$lang->testcase->featureBar['browse']['needconfirm'] = $lang->testcase->needConfirm;
|
||||
$lang->testcase->featureBar['browse']['group'] = '';
|
||||
$lang->testcase->featureBar['browse']['group'] = 'Group View';
|
||||
$lang->testcase->featureBar['browse']['suite'] = 'Suite';
|
||||
$lang->testcase->featureBar['browse']['zerocase'] = '';
|
||||
$lang->testcase->featureBar['browse']['zerocase'] = 'Zero Case Story';
|
||||
$lang->testcase->featureBar['browse']['browseunits'] = 'Unit Test';
|
||||
$lang->testcase->featureBar['groupcase'] = $lang->testcase->featureBar['browse'];
|
||||
|
||||
@@ -74,6 +74,8 @@ $lang->testcase->ignore = '忽略';
|
||||
$lang->testcase->fromTesttask = '来自测试单用例';
|
||||
$lang->testcase->fromCaselib = '来自用例库用例';
|
||||
$lang->testcase->deleted = '是否删除';
|
||||
$lang->testcase->browseUnits = '单元测试';
|
||||
|
||||
$lang->case = $lang->testcase; // 用于DAO检查时使用。因为case是系统关键字,所以无法定义该模块为case,只能使用testcase,但表还是使用的case。
|
||||
|
||||
$lang->testcase->stepID = '编号';
|
||||
@@ -226,4 +228,5 @@ $lang->testcase->featureBar['browse']['needconfirm'] = $lang->testcase->needConf
|
||||
$lang->testcase->featureBar['browse']['group'] = '分组查看';
|
||||
$lang->testcase->featureBar['browse']['suite'] = '套件';
|
||||
$lang->testcase->featureBar['browse']['zerocase'] = "零用例{$lang->SRCommon}";
|
||||
$lang->testcase->featureBar['browse']['browseunits'] = '单元测试';
|
||||
$lang->testcase->featureBar['groupcase'] = $lang->testcase->featureBar['browse'];
|
||||
|
||||
+90
-43
@@ -45,7 +45,10 @@ class testcaseModel extends model
|
||||
foreach($this->lang->testcase->menu as $key => $menu)
|
||||
{
|
||||
if($this->lang->navGroup->testcase != 'qa') $this->loadModel('qa')->setSubMenu('testcase', $key, $productID);
|
||||
common::setMenuVars($this->lang->testcase->menu, $key, $productID);
|
||||
|
||||
$replace = $productID;
|
||||
if($this->lang->navGroup->testcase == 'project' and $key == 'bug') $replace = 0;
|
||||
common::setMenuVars($this->lang->testcase->menu, $key, $replace);
|
||||
}
|
||||
|
||||
if($this->lang->navGroup->testcase == 'qa')
|
||||
@@ -117,26 +120,7 @@ class testcaseModel extends model
|
||||
}
|
||||
|
||||
/* If the story is linked project, make the case link the project. */
|
||||
if(!empty($case->story))
|
||||
{
|
||||
$projects = $this->dao->select('project')->from(TABLE_PROJECTSTORY)->Where('story')->eq($case->story)->fetchAll('project');
|
||||
$projects = array_keys($projects);
|
||||
}
|
||||
if($this->lang->navGroup->testcase != 'qa' and empty($case->story)) $projects = array($this->session->PRJ);
|
||||
if(!empty($projects))
|
||||
{
|
||||
foreach($projects as $projectID)
|
||||
{
|
||||
$lastOrder = (int)$this->dao->select('*')->from(TABLE_PROJECTCASE)->where('project')->eq($projectID)->orderBy('order_desc')->limit(1)->fetch('order');
|
||||
$data = new stdclass();
|
||||
$data->project = $projectID;
|
||||
$data->product = $case->product;
|
||||
$data->case = $caseID;
|
||||
$data->version = 1;
|
||||
$data->order = ++ $lastOrder;
|
||||
$this->dao->insert(TABLE_PROJECTCASE)->data($data)->exec();
|
||||
}
|
||||
}
|
||||
$this->syncCase2Project($case);
|
||||
|
||||
return array('status' => 'created', 'id' => $caseID);
|
||||
}
|
||||
@@ -246,27 +230,7 @@ class testcaseModel extends model
|
||||
$caseID = $this->dao->lastInsertID();
|
||||
|
||||
/* If the story is linked project, make the case link the project. */
|
||||
if(!empty($case->story))
|
||||
{
|
||||
$projects = $this->dao->select('project')->from(TABLE_PROJECTSTORY)->Where('story')->eq($case->story)->fetchAll('project');
|
||||
$projects = array_keys($projects);
|
||||
}
|
||||
if($this->lang->navGroup->testcase != 'qa' and empty($case->story)) $projects = array($this->session->PRJ);
|
||||
if(!empty($projects))
|
||||
{
|
||||
foreach($projects as $projectID)
|
||||
{
|
||||
$lastOrder = (int)$this->dao->select('*')->from(TABLE_PROJECTCASE)->where('project')->eq($projectID)->orderBy('order_desc')->limit(1)->fetch('order');
|
||||
$data = new stdclass();
|
||||
$data->project = $projectID;
|
||||
$data->product = $case->product;
|
||||
$data->case = $caseID;
|
||||
$data->version = 1;
|
||||
$data->order = ++ $lastOrder;
|
||||
$this->dao->insert(TABLE_PROJECTCASE)->data($data)->exec();
|
||||
}
|
||||
}
|
||||
|
||||
$this->syncCase2Project($case);
|
||||
$this->executeHooks($caseID);
|
||||
|
||||
$this->loadModel('score')->create('testcase', 'create', $caseID);
|
||||
@@ -659,6 +623,40 @@ class testcaseModel extends model
|
||||
$titleChanged = ($case->title != $oldCase->title);
|
||||
if($isLibCase and $titleChanged) $this->dao->update(TABLE_CASE)->set('`title`')->eq($case->title)->where('`fromCaseID`')->eq($caseID)->exec();
|
||||
|
||||
/* The case is linked the project. */
|
||||
if($oldCase->project != 0)
|
||||
{
|
||||
$productChanged = ($oldCase->product != $case->product);
|
||||
$storyChanged = ($oldCase->story != $case->story);
|
||||
|
||||
if($productChanged)
|
||||
{
|
||||
$this->dao->update(TABLE_PROJECTCASE)
|
||||
->set('product')->eq($case->product)
|
||||
->set('version')->eq($case->version)
|
||||
->where('project')->eq($oldCase->project)
|
||||
->andWhere('`case`')->eq($oldCase->id)
|
||||
->exec();
|
||||
}
|
||||
|
||||
/* If the related story is changed and the new related story isn't linked the project, unlink the case. */
|
||||
if($storyChanged)
|
||||
{
|
||||
$projectStory = $this->dao->select('*')->from(TABLE_PROJECTSTORY)
|
||||
->where('project')->eq($oldCase->project)
|
||||
->andWhere('story')->eq($case->story)
|
||||
->fetchAll();
|
||||
if(!$projectStory)
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_PROJECTCASE)
|
||||
->where('project')->eq($oldCase->project)
|
||||
->andWhere('`case`')->eq($oldCase->id)
|
||||
->exec();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if($stepChanged)
|
||||
{
|
||||
$parentStepID = 0;
|
||||
@@ -1336,7 +1334,7 @@ class testcaseModel extends model
|
||||
{
|
||||
$case->fromCaseID = $case->id;
|
||||
$case->fromCaseVersion = $case->version;
|
||||
$case->product = $productID;
|
||||
$case->product = $productID;
|
||||
if(isset($data->module[$case->id])) $case->module = $data->module[$case->id];
|
||||
if(isset($data->branch[$case->id])) $case->branch = $data->branch[$case->id];
|
||||
unset($case->id);
|
||||
@@ -1356,6 +1354,20 @@ class testcaseModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
/* If under the project module, the cases is imported need linking to the project. */
|
||||
if($this->lang->navGroup->testcase != 'qa')
|
||||
{
|
||||
$lastOrder = (int)$this->dao->select('*')->from(TABLE_PROJECTCASE)->where('project')->eq($this->session->PRJ)->orderBy('order_desc')->limit(1)->fetch('order');
|
||||
|
||||
$this->dao->insert(TABLE_PROJECTCASE)
|
||||
->set('project')->eq($case->project)
|
||||
->set('product')->eq($case->product)
|
||||
->set('case')->eq($caseID)
|
||||
->set('version')->eq($case->version)
|
||||
->set('order')->eq(++ $lastOrder)
|
||||
->exec();
|
||||
}
|
||||
|
||||
/* Fix bug #1518. */
|
||||
$oldFiles = zget($libFiles, $libCaseID, array());
|
||||
foreach($oldFiles as $fileID => $file)
|
||||
@@ -1669,6 +1681,41 @@ class testcaseModel extends model
|
||||
return sprintf($this->lang->testcase->summary, count($cases), $executed);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sync case to project.
|
||||
*
|
||||
* @param object $case
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function syncCase2Project($case)
|
||||
{
|
||||
if(!empty($case->story))
|
||||
{
|
||||
$projects = $this->dao->select('project')->from(TABLE_PROJECTSTORY)->where('story')->eq($case->story)->fetchAll('project');
|
||||
$projects = array_keys($projects);
|
||||
}
|
||||
elseif($this->lang->navGroup->testcase == 'project' and empty($case->story))
|
||||
{
|
||||
$projects = array($this->session->PRJ);
|
||||
}
|
||||
|
||||
if(!empty($projects))
|
||||
{
|
||||
foreach($projects as $projectID)
|
||||
{
|
||||
$lastOrder = (int)$this->dao->select('*')->from(TABLE_PROJECTCASE)->where('project')->eq($projectID)->orderBy('order_desc')->limit(1)->fetch('order');
|
||||
$data = new stdclass();
|
||||
$data->project = $projectID;
|
||||
$data->product = $case->product;
|
||||
$data->case = $caseID;
|
||||
$data->version = 1;
|
||||
$data->order = ++ $lastOrder;
|
||||
$this->dao->insert(TABLE_PROJECTCASE)->data($data)->exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get status for different method.
|
||||
*
|
||||
|
||||
@@ -5,11 +5,18 @@
|
||||
<div id="sidebarHeader">
|
||||
<div class="title">
|
||||
<?php
|
||||
echo !empty($moduleID) ? $moduleName : $this->lang->tree->all;
|
||||
if(!empty($moduleID))
|
||||
if($this->app->rawMethod == 'browseunits')
|
||||
{
|
||||
$removeLink = $browseType == 'bymodule' ? $this->createLink('testcase', 'browse', "productID=$productID&branch=$branch&browseType=$browseType¶m=0&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("caseModule")';
|
||||
echo html::a($removeLink, "<i class='icon icon-sm icon-close'></i>", '', "class='text-muted'");
|
||||
echo $lang->testtask->unitTag[$browseType];
|
||||
}
|
||||
else
|
||||
{
|
||||
echo !empty($moduleID) ? $moduleName : $this->lang->tree->all;
|
||||
if(!empty($moduleID))
|
||||
{
|
||||
$removeLink = $browseType == 'bymodule' ? $this->createLink('testcase', 'browse', "productID=$productID&branch=$branch&browseType=$browseType¶m=0&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("caseModule")';
|
||||
echo html::a($removeLink, "<i class='icon icon-sm icon-close'></i>", '', "class='text-muted'");
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@@ -19,6 +26,7 @@
|
||||
$hasBrowsePriv = common::hasPriv('testcase', 'browse');
|
||||
$hasGroupPriv = common::hasPriv('testcase', 'groupcase');
|
||||
$hasZeroPriv = common::hasPriv('story', 'zerocase');
|
||||
$hasUnitPriv = common::hasPriv('testtask', 'browseunits');
|
||||
?>
|
||||
<?php foreach(customModel::getFeatureMenu('testcase', 'browse') as $menuItem):?>
|
||||
<?php
|
||||
@@ -78,6 +86,10 @@
|
||||
{
|
||||
echo html::a($this->createLink('story', 'zeroCase', "productID=$productID&orderBy=id_desc&from={$this->lang->navGroup->testcase}"), "<span class='text'>{$lang->story->zeroCase}</span>", '', "class='btn btn-link' id='zerocaseTab'");
|
||||
}
|
||||
elseif($hasUnitPriv and $menuType == 'browseunits')
|
||||
{
|
||||
echo html::a($this->createLink('testtask', 'browseUnits', "productID=$productID"), "<span class='text'>{$lang->testcase->browseUnits}</span>", '', "class='btn btn-link' id='browseunitsTab'");
|
||||
}
|
||||
?>
|
||||
<?php endforeach;?>
|
||||
<?php
|
||||
@@ -136,6 +148,9 @@
|
||||
echo html::a($link, "<i class='icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-primary'");
|
||||
}
|
||||
?>
|
||||
<?php if($this->app->rawMethod == 'browseunits' and common::canModify('product', $product)):?>
|
||||
<?php common::printLink('testtask', 'importUnitResult', "product=$productID", "<i class='icon icon-import'></i> " . $lang->testtask->importUnitResult, '', "class='btn btn-primary'");?>
|
||||
<?php endif;?>
|
||||
<?php else:?>
|
||||
<div class='btn-group dropdown-hover'>
|
||||
<?php
|
||||
|
||||
@@ -43,6 +43,11 @@ class testreport extends control
|
||||
$this->app->loadConfig('qa');
|
||||
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->lang->testreport->menu = $this->lang->projectQa->menu;
|
||||
$this->lang->testreport->subMenu = $this->lang->projectQa->subMenu;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -43,6 +43,7 @@ class testsuiteModel extends model
|
||||
{
|
||||
if($this->config->global->flow == 'full' and $this->lang->navGroup->testcase != 'qa') $this->loadModel('qa')->setSubMenu('testsuite', $key, $productID);
|
||||
$replace = $productID;
|
||||
if($this->lang->navGroup->testsuite == 'project' and $key == 'bug') $replace = 0;
|
||||
common::setMenuVars($this->lang->testsuite->menu, $key, $replace);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,11 @@ class testtask extends control
|
||||
$this->app->loadConfig('qa');
|
||||
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->lang->testtask->menu = $this->lang->projectQa->menu;
|
||||
$this->lang->testtask->subMenu = $this->lang->projectQa->subMenu;
|
||||
}
|
||||
|
||||
$this->loadModel('product');
|
||||
$this->view->products = $this->products = $this->product->getProductPairsByProject($this->projectID);
|
||||
@@ -135,12 +140,11 @@ class testtask extends control
|
||||
{
|
||||
/* Save session. */
|
||||
$this->session->set('testtaskList', $this->app->getURI(true));
|
||||
$this->loadModel('testcase');
|
||||
$this->app->loadLang('tree');
|
||||
|
||||
/* Set menu. */
|
||||
$productID = $this->product->saveState($productID, $this->products);
|
||||
$this->lang->testtask->menu = $this->lang->testcase->menu;
|
||||
$this->lang->testtask->menuOrder = $this->lang->testcase->menuOrder;
|
||||
$this->lang->testtask->subMenu->testcase->unit['subModule'] = 'testtask';
|
||||
$this->loadModel('testtask')->setUnitMenu($this->products, $productID);
|
||||
|
||||
/* Load pager. */
|
||||
@@ -162,6 +166,7 @@ class testtask extends control
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
|
||||
$this->view->pager = $pager;
|
||||
$this->view->product = $this->product->getByID($productID);
|
||||
$this->view->suiteList = $this->loadModel('testsuite')->getSuites($productID);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -12,83 +12,90 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<?php include '../../testcase/view/caseheader.html.php';?>
|
||||
<?php js::set('confirmDelete', $lang->testtask->confirmDelete)?>
|
||||
<?php js::set('flow', $config->global->flow);?>
|
||||
<style>
|
||||
#action-divider{display: inline-block; line-height: 0px; border-right: 2px solid #ddd}
|
||||
</style>
|
||||
<div id="mainMenu" class='clearfix'>
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php foreach($lang->testtask->unitTag as $key => $label):?>
|
||||
<?php echo html::a(inlink('browseUnits', "productID=$productID&browseType=$key&orderBy=$orderBy"), "<span class='text'>$label</span>", '', "id='{$key}Tab' class='btn btn-link'");?>
|
||||
<?php endforeach;?>
|
||||
<div id='mainContent' class='main-row'>
|
||||
<div id="sidebar" class="side-col">
|
||||
<div class="sidebar-toggle">
|
||||
<i class="icon icon-angle-left"></i>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class='panel-body'>
|
||||
<div class='list-group'>
|
||||
<?php foreach($lang->testtask->unitTag as $key => $label):?>
|
||||
<?php echo html::a(inlink('browseUnits', "productID=$productID&browseType=$key&orderBy=$orderBy"), "<span class='text'>$label</span>", '', "id='{$key}UnitTab' class='btn btn-link'");?>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(common::canModify('product', $product)):?>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php common::printLink('testtask', 'importUnitResult', "product=$productID", "<i class='icon icon-import'></i> " . $lang->testtask->importUnitResult, '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div id='mainContent' class='main-table' data-ride='table'>
|
||||
<?php if(empty($tasks)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->testtask->noTesttask;?></span>
|
||||
</p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<table class='table has-sort-head' id='taskList'>
|
||||
<thead>
|
||||
<?php $vars = "productID=$productID&browseType=$browseType&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
|
||||
<tr>
|
||||
<th class='c-id text-left'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th class='w-300px text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->testtask->name);?></th>
|
||||
<th class='text-left'> <?php common::printOrderLink('execution', $orderBy, $vars, $lang->testtask->execution);?></th>
|
||||
<th class='text-left'> <?php common::printOrderLink('build', $orderBy, $vars, $lang->testtask->build);?></th>
|
||||
<th class='c-user text-left'> <?php common::printOrderLink('owner', $orderBy, $vars, $lang->testtask->owner);?></th>
|
||||
<th class='w-90px text-left'> <?php common::printOrderLink('begin', $orderBy, $vars, $lang->testtask->execTime);?></th>
|
||||
<th class='w-50px text-center'><?php echo $lang->testtask->caseCount;?></th>
|
||||
<th class='w-40px text-center'><?php echo $lang->testtask->passCount;?></th>
|
||||
<th class='w-40px text-center'><?php echo $lang->testtask->failCount;?></th>
|
||||
<th class='c-actions-3 text-center'><?php echo $lang->actions;?></th>
|
||||
|
||||
<div class="main-col main-table">
|
||||
<?php if(empty($tasks)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->testtask->noTesttask;?></span>
|
||||
</p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<table class='table' data-ride='table' id='taskList'>
|
||||
<thead>
|
||||
<?php $vars = "productID=$productID&browseType=$browseType&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
|
||||
<tr>
|
||||
<th class='c-id text-left'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th class='w-300px text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->testtask->name);?></th>
|
||||
<th class='text-left'> <?php common::printOrderLink('execution', $orderBy, $vars, $lang->testtask->execution);?></th>
|
||||
<th class='text-left'> <?php common::printOrderLink('build', $orderBy, $vars, $lang->testtask->build);?></th>
|
||||
<th class='c-user text-left'> <?php common::printOrderLink('owner', $orderBy, $vars, $lang->testtask->owner);?></th>
|
||||
<th class='w-90px text-left'> <?php common::printOrderLink('begin', $orderBy, $vars, $lang->testtask->execTime);?></th>
|
||||
<th class='w-50px text-center'><?php echo $lang->testtask->caseCount;?></th>
|
||||
<th class='w-40px text-center'><?php echo $lang->testtask->passCount;?></th>
|
||||
<th class='w-40px text-center'><?php echo $lang->testtask->failCount;?></th>
|
||||
<th class='c-actions-3 text-center'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($tasks as $task):?>
|
||||
<tr class='text-left'>
|
||||
<td><?php printf('%03d', $task->id);?></td>
|
||||
<td class='c-name' title="<?php echo $task->name?>"><?php echo html::a(inlink('unitCases', "taskID=$task->id"), $task->name);?></td>
|
||||
<td class='c-name' title="<?php echo $task->executionName?>"><?php echo $task->executionName?></td>
|
||||
<td class='c-name'><?php echo ($task->build == 'trunk' || empty($task->buildName)) ? $lang->trunk : html::a($this->createLink('build', 'view', "buildID=$task->build",'',true), $task->buildName);?></td>
|
||||
<td><?php echo zget($users, $task->owner);?></td>
|
||||
<td><?php echo $task->begin?></td>
|
||||
<td class='text-center'><?php echo $task->caseCount?></td>
|
||||
<td class='text-center pass'><?php echo $task->passCount?></td>
|
||||
<td class='text-center fail'><?php echo $task->failCount?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
common::printIcon('testtask', 'unitCases', "taskID=$task->id", '', 'list', 'list-alt', '', 'iframe', true, 'data-width="70%"');
|
||||
common::printIcon('testtask', 'edit', "taskID=$task->id", $task, 'list', '', '', 'iframe', true);
|
||||
if(common::hasPriv('testtask', 'delete', $task))
|
||||
{
|
||||
$deleteURL = $this->createLink('testtask', 'delete', "taskID=$task->id&confirm=yes");
|
||||
echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"taskList\",confirmDelete)", '<i class="icon-common-delete icon-trash"></i>', '', "title='{$lang->testtask->delete}' class='btn'");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($tasks as $task):?>
|
||||
<tr class='text-left'>
|
||||
<td><?php printf('%03d', $task->id);?></td>
|
||||
<td class='c-name' title="<?php echo $task->name?>"><?php echo html::a(inlink('unitCases', "taskID=$task->id"), $task->name);?></td>
|
||||
<td class='c-name' title="<?php echo $task->executionName?>"><?php echo $task->executionName?></td>
|
||||
<td class='c-name'><?php echo ($task->build == 'trunk' || empty($task->buildName)) ? $lang->trunk : html::a($this->createLink('build', 'view', "buildID=$task->build",'',true), $task->buildName);?></td>
|
||||
<td><?php echo zget($users, $task->owner);?></td>
|
||||
<td><?php echo $task->begin?></td>
|
||||
<td class='text-center'><?php echo $task->caseCount?></td>
|
||||
<td class='text-center pass'><?php echo $task->passCount?></td>
|
||||
<td class='text-center fail'><?php echo $task->failCount?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
common::printIcon('testtask', 'unitCases', "taskID=$task->id", '', 'list', 'list-alt', '', 'iframe', true, 'data-width="70%"');
|
||||
common::printIcon('testtask', 'edit', "taskID=$task->id", $task, 'list', '', '', 'iframe', true);
|
||||
if(common::hasPriv('testtask', 'delete', $task))
|
||||
{
|
||||
$deleteURL = $this->createLink('testtask', 'delete', "taskID=$task->id&confirm=yes");
|
||||
echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"taskList\",confirmDelete)", '<i class="icon-common-delete icon-trash"></i>', '', "title='{$lang->testtask->delete}' class='btn'");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if($browseType != 'newest'):?>
|
||||
<div class='table-footer'><?php $pager->show('right', 'pagerjs');?></div>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if($browseType != 'newest'):?>
|
||||
<div class='table-footer'><?php $pager->show('right', 'pagerjs');?></div>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('#<?php echo $browseType?>Tab').addClass('btn-active-text').append(" <span class='label label-light label-badge'><?php echo ($browseType == 'newest' and $pager->recTotal >= $pager->recPerPage) ? $pager->recPerPage : $pager->recTotal;?></span>");
|
||||
$('#<?php echo $browseType?>UnitTab').addClass('selected');
|
||||
$('#browseunitsTab').addClass('btn-active-text');
|
||||
})
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -193,8 +193,12 @@ class treeModel extends model
|
||||
{
|
||||
/* When case with libIdList then append lib modules. */
|
||||
$modules = array();
|
||||
if($this->isMergeModule($rootID, $viewType)) $viewType .= ',story';
|
||||
$modules += $this->dao->select('id,name,path,short')->from(TABLE_MODULE)->where('root')->eq($rootID)->andWhere('type')->in($viewType)->andWhere('deleted')->eq(0)->fetchAll('id');
|
||||
if($this->isMergeModule($rootID, $viewType) or !$rootID) $viewType .= ',story';
|
||||
$modules += $this->dao->select('id,name,path,short')->from(TABLE_MODULE)
|
||||
->where('type')->in($viewType)
|
||||
->beginIF($rootID)->andWhere('root')->eq($rootID)->fi()
|
||||
->andWhere('deleted')->eq(0)
|
||||
->fetchAll('id');
|
||||
}
|
||||
|
||||
$modulePairs = array();
|
||||
@@ -659,7 +663,7 @@ class treeModel extends model
|
||||
foreach($branchGroups[$id] as $branch => $branchName)
|
||||
{
|
||||
$treeMenu = array();
|
||||
$query = $this->dao->select('*')->from(TABLE_MODULE)->where("((root = '" . (int)$rootID . "' and type = 'bug' and parent != 0) OR (root = $id and type = 'story' and branch ='$branch'))")
|
||||
$query = $this->dao->select('*')->from(TABLE_MODULE)->where("((root = $id and type = 'bug') OR (root = $id and type = 'story' and branch ='$branch'))")
|
||||
->beginIF($startModulePath)->andWhere('path')->like($startModulePath)->fi()
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy('grade desc, `order`, type')
|
||||
|
||||
@@ -1023,7 +1023,7 @@ class userModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getExecutions($account, $type = 'execution', $status = 'all', $orderBy, $pager = null)
|
||||
public function getExecutions($account, $type = 'execution', $status = 'all', $orderBy = 'id_desc', $pager = null)
|
||||
{
|
||||
if($type == 'execution') $type = 'sprint,stage';
|
||||
$myProjectsList = $this->dao->select('t1. *,t2. *')->from(TABLE_TEAM)->alias('t1')
|
||||
|
||||
Reference in New Issue
Block a user