Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -56,17 +56,17 @@ class baseHelper
|
||||
* @param string|array $vars the params passed to the method, can be array('key' => 'value') or key1=value1&key2=value2) or key1=value1&key2=value2
|
||||
* @param string $viewType the view type
|
||||
* @param bool $onlyBody pass onlyBody=yes to the link thus the app can control the header and footer hide or show..
|
||||
* @param bool $projectID set project id in to session.
|
||||
* @param bool $removeProject if true, remove project param.
|
||||
* @param bool $PRJID set PRJ id in to session.
|
||||
* @param bool $removePRJ if true, remove PRJ param.
|
||||
* @static
|
||||
* @access public
|
||||
* @return string the link string.
|
||||
*/
|
||||
static public function createLink($moduleName, $methodName = 'index', $vars = '', $viewType = '', $onlyBody = false, $projectID = 0, $removeProject = false)
|
||||
static public function createLink($moduleName, $methodName = 'index', $vars = '', $viewType = '', $onlyBody = false, $PRJID = 0, $removePRJ = false)
|
||||
{
|
||||
/* 设置$appName和$moduleName。Set appName and moduleName. */
|
||||
global $app, $config;
|
||||
$projectID = $projectID ? $projectID : $app->session->project;
|
||||
$PRJID = $PRJID ? $PRJID : $app->session->PRJ;
|
||||
|
||||
if(strpos($moduleName, '.') !== false)
|
||||
{
|
||||
@@ -99,7 +99,7 @@ class baseHelper
|
||||
foreach($vars as $key => $value) $link .= "&$key=$value";
|
||||
|
||||
$link = self::processOnlyBodyParam($link, $onlyBody);
|
||||
return self::processProjectParam($link, $projectID, $onlyBody, $moduleName, $removeProject);
|
||||
return self::processProjectParam($link, $PRJID, $onlyBody, $moduleName, $removePRJ);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -115,7 +115,7 @@ class baseHelper
|
||||
$link .= '.' . $viewType;
|
||||
|
||||
$link = self::processOnlyBodyParam($link, $onlyBody);
|
||||
return self::processProjectParam($link, $projectID, $onlyBody, $moduleName, $removeProject);
|
||||
return self::processProjectParam($link, $PRJID, $onlyBody, $moduleName, $removePRJ);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -127,7 +127,7 @@ class baseHelper
|
||||
{
|
||||
$link .= $config->default->method . '.' . $viewType;
|
||||
$link = self::processOnlyBodyParam($link, $onlyBody);
|
||||
return self::processProjectParam($link, $projectID, $onlyBody, $moduleName, $removeProject);
|
||||
return self::processProjectParam($link, $PRJID, $onlyBody, $moduleName, $removePRJ);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -139,7 +139,7 @@ class baseHelper
|
||||
{
|
||||
$link .= $moduleName . '/';
|
||||
$link = self::processOnlyBodyParam($link, $onlyBody);
|
||||
return self::processProjectParam($link, $projectID, $onlyBody, $moduleName, $removeProject);
|
||||
return self::processProjectParam($link, $PRJID, $onlyBody, $moduleName, $removePRJ);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -149,34 +149,34 @@ class baseHelper
|
||||
*/
|
||||
$link .= $moduleName . '.' . $viewType;
|
||||
$link = self::processOnlyBodyParam($link, $onlyBody);
|
||||
return self::processProjectParam($link, $projectID, $onlyBody, $moduleName, $removeProject);
|
||||
return self::processProjectParam($link, $PRJID, $onlyBody, $moduleName, $removePRJ);
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理project 参数。
|
||||
* Process the projectID param in url.
|
||||
* 处理PRJ 参数。
|
||||
* Process the PRJID param in url.
|
||||
*
|
||||
* 如果传参的时候设定了$projectID,在生成链接的时候继续追加。
|
||||
* 如果传参的时候设定了$PRJID,在生成链接的时候继续追加。
|
||||
* If $progrmID in the url, append it to the link.
|
||||
*
|
||||
* @param string $link
|
||||
* @param int $projectID
|
||||
* @param int $PRJID
|
||||
* @param bool $onlybody
|
||||
* @param string $moduleName
|
||||
* @param bool $removeProject
|
||||
* @param bool $removePRJ
|
||||
* @static
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public static function processProjectParam($link, $projectID = '', $onlybody = false, $moduleName = '', $removeProject = false)
|
||||
public static function processProjectParam($link, $PRJID = '', $onlybody = false, $moduleName = '', $removePRJ = false)
|
||||
{
|
||||
global $config, $lang;
|
||||
|
||||
if(!$projectID || $removeProject) return $link;
|
||||
if(!$PRJID || $removePRJ) return $link;
|
||||
$app = zget($lang->navGroup, $moduleName);
|
||||
if($app != 'project' and $app != 'execution') return $link;
|
||||
|
||||
$link .= strpos($link, '?') === false ? "?project=$projectID" : "&project=$projectID";
|
||||
$link .= strpos($link, '?') === false ? "?PRJ=$PRJID" : "&PRJ=$PRJID";
|
||||
return $link;
|
||||
}
|
||||
|
||||
|
||||
@@ -863,7 +863,7 @@ class baseRouter
|
||||
*/
|
||||
public function setProject()
|
||||
{
|
||||
if(isset($_GET['project'])) $this->session->set('project', $_GET['project']); //Set project id into session.
|
||||
if(isset($_GET['PRJ'])) $this->session->set('PRJ', $_GET['PRJ']); //Set project id into session.
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1830,7 +1830,7 @@ class baseRouter
|
||||
global $filter;
|
||||
|
||||
/* Remove these three params. */
|
||||
unset($passedParams['project']);
|
||||
unset($passedParams['PRJ']);
|
||||
unset($passedParams['onlybody']);
|
||||
unset($passedParams['HTTP_X_REQUESTED_WITH']);
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ class router extends baseRouter
|
||||
|
||||
$model = new stdclass();
|
||||
$model->model = 'scrum';
|
||||
if($this->session->project) $model = $this->dbh->query('SELECT model FROM' . TABLE_PROJECT . "WHERE id = {$this->session->project}")->fetch();
|
||||
if($this->session->PRJ) $model = $this->dbh->query('SELECT model FROM' . TABLE_PROJECT . "WHERE id = {$this->session->PRJ}")->fetch();
|
||||
|
||||
$iterationKey = $projectKey;
|
||||
if(isset($model->model) && $model->model == 'waterfall') $projectKey = STAGE_KEY;
|
||||
|
||||
@@ -667,7 +667,7 @@ class actionModel extends model
|
||||
$condition = "(product =',0,' AND project = '0')";
|
||||
if($projectCondition) $condition .= ' OR ' . $projectCondition;
|
||||
if($productCondition) $condition .= ' OR ' . $productCondition;
|
||||
if($this->app->user->admin) $condition = 1;
|
||||
if($this->app->user->admin) $condition = 1;
|
||||
}
|
||||
|
||||
/* If is project, select its related. */
|
||||
@@ -763,9 +763,9 @@ class actionModel extends model
|
||||
}
|
||||
if($this->session->actionQuery == false) $this->session->set('actionQuery', ' 1 = 1');
|
||||
|
||||
$allProduct = "`product` = 'all'";
|
||||
$allExecution = "`execution` = 'all'";
|
||||
$actionQuery = $this->session->actionQuery;
|
||||
$allProduct = "`product` = 'all'";
|
||||
$allExecutions = "`execution` = 'all'";
|
||||
$actionQuery = $this->session->actionQuery;
|
||||
|
||||
$productID = 0;
|
||||
if(preg_match("/`product` = '(\d*)'/", $actionQuery, $out))
|
||||
@@ -783,13 +783,13 @@ class actionModel extends model
|
||||
}
|
||||
|
||||
/* If the sql not include 'execution', add check purview for execution. */
|
||||
if(strpos($actionQuery, $allExecution) === false)
|
||||
if(strpos($actionQuery, $allExecutions) === false)
|
||||
{
|
||||
$actionQuery = $actionQuery . ' AND `execution`' . helper::dbIN(array_keys($executions));
|
||||
}
|
||||
else
|
||||
{
|
||||
$actionQuery = str_replace($allExecution, '1', $actionQuery);
|
||||
$actionQuery = str_replace($allExecutions, '1', $actionQuery);
|
||||
}
|
||||
|
||||
$actionQuery = str_replace("`product` = '$productID'", "`product` LIKE '%,$productID,%'", $actionQuery);
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
$(function()
|
||||
{
|
||||
$("#mainHeader #navbar li[data-id='system']").addClass('active');
|
||||
})
|
||||
@@ -0,0 +1,4 @@
|
||||
$(function()
|
||||
{
|
||||
$("#mainHeader #navbar li[data-id='system']").addClass('active');
|
||||
})
|
||||
+34
-41
@@ -65,10 +65,11 @@ class block extends control
|
||||
elseif(isset($this->lang->block->moduleList[$module]))
|
||||
{
|
||||
$this->get->set('mode', 'getblocklist');
|
||||
if($module == 'program') $this->get->set('dashboard', 'program');
|
||||
if($module == 'project') $this->get->set('dashboard', 'project');
|
||||
$this->view->blocks = $this->fetch('block', 'main', "module=$module&id=$id");
|
||||
$this->view->module = $module;
|
||||
}
|
||||
|
||||
$this->view->title = $title;
|
||||
$this->view->block = $this->block->getByID($id);
|
||||
$this->view->blockID = $id;
|
||||
@@ -215,18 +216,10 @@ class block extends control
|
||||
$commonField = 'common';
|
||||
if($module == 'project')
|
||||
{
|
||||
$project = $this->loadModel('project')->getByID($this->session->project);
|
||||
$project = $this->loadModel('project')->getByID($this->session->PRJ);
|
||||
$commonField = $project->model . 'common';
|
||||
}
|
||||
|
||||
/* Replace the block Title saved in the database. */
|
||||
if($module == 'execution')
|
||||
{
|
||||
$projectBlock = array();
|
||||
foreach($this->lang->block->default['execution'] as $block) $projectBlock[$block['block']] = $block['title'];
|
||||
foreach($blocks as $block) $block->title = $projectBlock[$block->block];
|
||||
}
|
||||
|
||||
$inited = empty($this->config->$module->$commonField->blockInited) ? '' : $this->config->$module->$commonField->blockInited;
|
||||
|
||||
/* Init block when vist index first. */
|
||||
@@ -438,7 +431,7 @@ class block extends control
|
||||
/* Create a project block. */
|
||||
if($dashboard == 'project')
|
||||
{
|
||||
$project = $this->loadModel('project')->getByID($this->session->project);
|
||||
$project = $this->loadModel('project')->getByID($this->session->PRJ);
|
||||
$model = $project->model;
|
||||
}
|
||||
|
||||
@@ -594,7 +587,7 @@ class block extends control
|
||||
$this->session->set('storyList', $uri);
|
||||
if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
|
||||
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->project;
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->PRJ;
|
||||
$this->view->tasks = $this->loadModel('task')->getUserTasks($this->app->user->account, $this->params->type, $this->viewType == 'json' ? 0 : (int)$this->params->count, null, $this->params->orderBy, $projectID);
|
||||
}
|
||||
|
||||
@@ -609,7 +602,7 @@ class block extends control
|
||||
$this->session->set('bugList', $this->app->getURI(true));
|
||||
if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
|
||||
|
||||
$projectID = $this->lang->navGroup->qa == 'project' ? $this->session->project : 0;
|
||||
$projectID = $this->lang->navGroup->qa == 'project' ? $this->session->PRJ : 0;
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : $projectID;
|
||||
$this->view->bugs = $this->loadModel('bug')->getUserBugs($this->app->user->account, $this->params->type, $this->params->orderBy, $this->viewType == 'json' ? 0 : (int)$this->params->count, null, $projectID);
|
||||
}
|
||||
@@ -626,7 +619,7 @@ class block extends control
|
||||
$this->app->loadLang('testcase');
|
||||
$this->app->loadLang('testtask');
|
||||
|
||||
$projectID = $this->lang->navGroup->qa == 'project' ? $this->session->project : 0;
|
||||
$projectID = $this->lang->navGroup->qa == 'project' ? $this->session->PRJ : 0;
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : $projectID;
|
||||
|
||||
$cases = array();
|
||||
@@ -670,7 +663,7 @@ class block extends control
|
||||
$this->session->set('testtaskList', $this->app->getURI(true));
|
||||
if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
|
||||
|
||||
$projectID = $this->lang->navGroup->qa == 'project' ? $this->session->project : 0;
|
||||
$projectID = $this->lang->navGroup->qa == 'project' ? $this->session->PRJ : 0;
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : $projectID;
|
||||
|
||||
$this->view->testtasks = $this->dao->select('t1.*,t2.name as productName,t3.name as buildName,t4.name as projectName')->from(TABLE_TESTTASK)->alias('t1')
|
||||
@@ -740,7 +733,7 @@ class block extends control
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product=t2.id')
|
||||
->leftJoin(TABLE_BUILD)->alias('t3')->on('t1.build=t3.id')
|
||||
->where('t1.deleted')->eq('0')
|
||||
->beginIF($this->view->block->module != 'my' and $this->session->project)->andWhere('t1.project')->eq((int)$this->session->project)->fi()
|
||||
->beginIF($this->view->block->module != 'my' and $this->session->PRJ)->andWhere('t1.project')->eq((int)$this->session->PRJ)->fi()
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t1.product')->in($this->app->user->view->products)->fi()
|
||||
->orderBy('t1.id desc')
|
||||
->beginIF($this->viewType != 'json')->limit((int)$this->params->count)->fi()
|
||||
@@ -762,7 +755,7 @@ class block extends control
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product=t2.id')
|
||||
->where('t1.deleted')->eq('0')
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t1.project')->in($this->app->user->view->projects)->fi()
|
||||
->beginIF($this->view->block->module != 'my' and $this->session->project)->andWhere('t1.project')->eq((int)$this->session->project)->fi()
|
||||
->beginIF($this->view->block->module != 'my' and $this->session->PRJ)->andWhere('t1.project')->eq((int)$this->session->PRJ)->fi()
|
||||
->orderBy('t1.id desc')
|
||||
->beginIF($this->viewType != 'json')->limit((int)$this->params->count)->fi()
|
||||
->fetchAll();
|
||||
@@ -1050,7 +1043,7 @@ class block extends control
|
||||
$count = isset($this->params->count) ? (int)$this->params->count : 0;
|
||||
|
||||
/* Get projects. */
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->project;
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->PRJ;
|
||||
$executions = $this->loadModel('execution')->getOrderedExecutions($projectID, $status, $count);
|
||||
if(empty($executions))
|
||||
{
|
||||
@@ -1170,7 +1163,7 @@ class block extends control
|
||||
*/
|
||||
public function printWaterfallReportBlock()
|
||||
{
|
||||
$project = $this->loadModel('project')->getByID($this->session->project);
|
||||
$project = $this->loadModel('project')->getByID($this->session->PRJ);
|
||||
$today = helper::today();
|
||||
$date = date('Ymd', strtotime('this week Monday'));
|
||||
$begin = $project->begin;
|
||||
@@ -1180,14 +1173,14 @@ class block extends control
|
||||
$task = $this->dao->select("
|
||||
sum(consumed) as totalConsumed,
|
||||
sum(if(status != 'cancel' and status != 'closed', `left`, 0)) as totalLeft")
|
||||
->from(TABLE_TASK)->where('project')->eq($this->session->project)
|
||||
->from(TABLE_TASK)->where('project')->eq($this->session->PRJ)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->andWhere('parent')->lt(1)
|
||||
->fetch();
|
||||
|
||||
$this->view->pv = $this->weekly->getPV($this->session->project, $today);
|
||||
$this->view->ev = $this->weekly->getEV($this->session->project, $today);
|
||||
$this->view->ac = $this->weekly->getAC($this->session->project, $today);
|
||||
$this->view->pv = $this->weekly->getPV($this->session->PRJ, $today);
|
||||
$this->view->ev = $this->weekly->getEV($this->session->PRJ, $today);
|
||||
$this->view->ac = $this->weekly->getAC($this->session->PRJ, $today);
|
||||
$this->view->sv = $this->weekly->getSV($this->view->ev, $this->view->pv);
|
||||
$this->view->cv = $this->weekly->getCV($this->view->ev, $this->view->ac);
|
||||
|
||||
@@ -1203,11 +1196,11 @@ class block extends control
|
||||
*/
|
||||
public function printWaterfallGanttBlock()
|
||||
{
|
||||
$products = $this->loadModel('product')->getProductPairsByProject($this->session->project);
|
||||
$products = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
|
||||
$productID = $this->session->product ? $this->session->product : 0;
|
||||
$productID = isset($products[$productID]) ? $productID : key($products);
|
||||
|
||||
$this->view->plans = $this->loadModel('programplan')->getDataForGantt($this->session->project, $productID, 0, 'task', false);
|
||||
$this->view->plans = $this->loadModel('programplan')->getDataForGantt($this->session->PRJ, $productID, 0, 'task', false);
|
||||
$this->view->products = $products;
|
||||
$this->view->productID = $productID;
|
||||
}
|
||||
@@ -1224,7 +1217,7 @@ class block extends control
|
||||
$this->session->set('issueList', $uri);
|
||||
if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->issues = $this->loadModel('issue')->getBlockIssues($this->session->project, $this->params->type, $this->viewType == 'json' ? 0 : (int)$this->params->count, $this->params->orderBy);
|
||||
$this->view->issues = $this->loadModel('issue')->getBlockIssues($this->session->PRJ, $this->params->type, $this->viewType == 'json' ? 0 : (int)$this->params->count, $this->params->orderBy);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1238,7 +1231,7 @@ class block extends control
|
||||
$uri = $this->app->getURI(true);
|
||||
$this->session->set('riskList', $uri);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->risks = $this->loadModel('risk')->getBlockRisks($this->session->project, $this->params->type, $this->viewType == 'json' ? 0 : (int)$this->params->count, $this->params->orderBy);
|
||||
$this->view->risks = $this->loadModel('risk')->getBlockRisks($this->session->PRJ, $this->params->type, $this->viewType == 'json' ? 0 : (int)$this->params->count, $this->params->orderBy);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1250,12 +1243,12 @@ class block extends control
|
||||
public function printWaterfallEstimateBlock()
|
||||
{
|
||||
$this->app->loadLang('durationestimation');
|
||||
$projectID = $this->session->project;
|
||||
$projectID = $this->session->PRJ;
|
||||
$members = $this->loadModel('project')->getTeamMemberPairs($projectID);
|
||||
$budget = $this->loadModel('workestimation')->getBudget($projectID);
|
||||
if(empty($budget)) $budget = new stdclass();
|
||||
|
||||
$this->view->people = $this->dao->select('sum(people) as people')->from(TABLE_DURATIONESTIMATION)->where('project')->eq($this->session->project)->fetch('people');
|
||||
$this->view->people = $this->dao->select('sum(people) as people')->from(TABLE_DURATIONESTIMATION)->where('project')->eq($this->session->PRJ)->fetch('people');
|
||||
$this->view->members = count($members) ? count($members) - 1 : 0;
|
||||
$this->view->consumed = $this->dao->select('sum(cast(consumed as decimal(10,2))) as consumed')->from(TABLE_TASK)->where('project')->eq($projectID)->andWhere('deleted')->eq(0)->andWhere('parent')->lt(1)->fetch('consumed');
|
||||
$this->view->budget = $budget;
|
||||
@@ -1271,7 +1264,7 @@ class block extends control
|
||||
{
|
||||
$this->loadModel('milestone');
|
||||
$this->loadModel('weekly');
|
||||
$projectID = $this->session->project;
|
||||
$projectID = $this->session->PRJ;
|
||||
$project = $this->loadModel('project')->getByID($projectID);
|
||||
|
||||
$begin = $project->begin;
|
||||
@@ -1308,7 +1301,7 @@ class block extends control
|
||||
*/
|
||||
public function printScrumOverviewBlock()
|
||||
{
|
||||
$projectID = $this->session->project;
|
||||
$projectID = $this->session->PRJ;
|
||||
$this->app->loadLang('execution');
|
||||
$totalData = $this->loadModel('project')->getOverviewList('byId', $projectID, 'id_desc', 1);
|
||||
|
||||
@@ -1331,7 +1324,7 @@ class block extends control
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = pager::init(0, $count, 1);
|
||||
$this->app->loadLang('execution');
|
||||
$this->view->executionStats = $this->loadModel('project')->getStats($this->session->project, $type, 0, 0, 30, 'id_desc', $pager);
|
||||
$this->view->executionStats = $this->loadModel('project')->getStats($this->session->PRJ, $type, 0, 0, 30, 'id_desc', $pager);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1347,7 +1340,7 @@ class block extends control
|
||||
$releases = array();
|
||||
$count = isset($this->params->count) ? (int)$this->params->count : 15;
|
||||
|
||||
$products = $this->dao->select('id, name')->from(TABLE_PRODUCT)->where('program')->eq($this->session->project)->limit(15)->fetchPairs();
|
||||
$products = $this->dao->select('id, name')->from(TABLE_PRODUCT)->where('program')->eq($this->session->program)->limit(15)->fetchPairs();
|
||||
$productIdList = array_keys($products);
|
||||
if(!empty($productIdList))
|
||||
{
|
||||
@@ -1374,7 +1367,7 @@ class block extends control
|
||||
$sprints = $this->dao->select('status, count(*) as sprints')->from(TABLE_EXECUTION)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('type')->eq('sprint')
|
||||
->andWhere('parent')->eq($this->session->project)
|
||||
->andWhere('parent')->eq($this->session->PRJ)
|
||||
->groupBy('status')
|
||||
->fetchPairs();
|
||||
|
||||
@@ -1399,7 +1392,7 @@ class block extends control
|
||||
*/
|
||||
public function printProjectDynamicBlock()
|
||||
{
|
||||
$projectID = $this->session->project;
|
||||
$projectID = $this->session->PRJ;
|
||||
|
||||
$executions = $this->loadModel('execution')->getPairs($projectID);
|
||||
$products = $this->loadModel('product')->getProductPairsByProject($projectID);
|
||||
@@ -1431,7 +1424,7 @@ class block extends control
|
||||
$this->session->set('releaseList', $this->app->getURI(true));
|
||||
$this->session->set('productPlanList', $this->app->getURI(true));
|
||||
|
||||
$products = $this->loadModel('product')->getPairs('', $this->session->project);
|
||||
$products = $this->loadModel('product')->getPairs('', $this->session->PRJ);
|
||||
if(!is_numeric($productID)) $productID = key($products);
|
||||
|
||||
$this->view->roadmaps = $this->product->getRoadmap($productID, 0, 6);
|
||||
@@ -1468,7 +1461,7 @@ class block extends control
|
||||
->leftJoin(TABLE_PROJECT)->alias('t4')->on('t1.project=t4.id')
|
||||
->leftJoin(TABLE_PROJECTPRODUCT)->alias('t5')->on('t1.project=t5.project')
|
||||
->where('t1.deleted')->eq('0')
|
||||
->andWhere('t1.project')->eq($this->session->project)->fi()
|
||||
->andWhere('t1.project')->eq($this->session->PRJ)->fi()
|
||||
->andWhere('t1.product = t5.product')
|
||||
->beginIF($status != 'all')->andWhere('t1.status')->eq($status)->fi()
|
||||
->orderBy('t1.id desc')
|
||||
@@ -1490,7 +1483,7 @@ class block extends control
|
||||
$status = isset($this->params->type) ? $this->params->type : '';
|
||||
$count = isset($this->params->count) ? (int)$this->params->count : 0;
|
||||
|
||||
$projectID = $this->lang->navGroup->qa == 'project' ? $this->session->project : 0;
|
||||
$projectID = $this->lang->navGroup->qa == 'project' ? $this->session->PRJ : 0;
|
||||
$products = $this->loadModel('product')->getOrderedProducts($status, $count, $projectID);
|
||||
if(empty($products))
|
||||
{
|
||||
@@ -1594,7 +1587,7 @@ class block extends control
|
||||
*/
|
||||
public function printExecutionOverviewBlock()
|
||||
{
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->project;
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->PRJ;
|
||||
$executions = $this->loadModel('execution')->getList($projectID);
|
||||
|
||||
$total = 0;
|
||||
@@ -1627,7 +1620,7 @@ class block extends control
|
||||
{
|
||||
$casePairs = $this->dao->select('lastRunResult, COUNT(*) AS count')->from(TABLE_CASE)
|
||||
->where('1=1')
|
||||
->beginIF($this->view->block->module != 'my' and $this->session->project)->andWhere('project')->eq((int)$this->session->project)->fi()
|
||||
->beginIF($this->view->block->module != 'my' and $this->session->PRJ)->andWhere('project')->eq((int)$this->session->PRJ)->fi()
|
||||
->groupBy('lastRunResult')
|
||||
->fetchPairs();
|
||||
|
||||
@@ -1664,7 +1657,7 @@ class block extends control
|
||||
$status = isset($this->params->type) ? $this->params->type : 'all';
|
||||
$pager = pager::init(0, $count, 1);
|
||||
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->project;
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->PRJ;
|
||||
$this->view->executionStats = $this->loadModel('project')->getStats($projectID, $status, 0, 0, 30, 'id_asc', $pager);
|
||||
}
|
||||
|
||||
|
||||
@@ -59,9 +59,9 @@ $lang->block->resolvedRisks = 'Risks Resolved';
|
||||
$lang->block->createdIssues = 'Issues Created';
|
||||
$lang->block->resolvedIssues = 'Issues Resolved';
|
||||
$lang->block->createdDocs = 'Docs Created';
|
||||
$lang->block->allProject = 'All ' . $lang->executionCommon;
|
||||
$lang->block->doingProject = 'Doning ' . $lang->executionCommon;
|
||||
$lang->block->finishProject = 'Finish ' . $lang->executionCommon;
|
||||
$lang->block->allExecutions = 'All ' . $lang->executionCommon;
|
||||
$lang->block->doingExecution = 'Doning ' . $lang->executionCommon;
|
||||
$lang->block->finishExecution = 'Finish ' . $lang->executionCommon;
|
||||
$lang->block->estimatedHours = 'Estimated Hours';
|
||||
$lang->block->consumedHours = 'Consumed Hours';
|
||||
$lang->block->time = 'No';
|
||||
@@ -83,7 +83,7 @@ $lang->block->closeForever = 'Dauerhaft schließen';
|
||||
$lang->block->confirmClose = 'Möchten Sie den Block dauerhaft schlißen? Nach der Ausführung ist der Block nicht mehr verfügbar. Er kann unter Admin->Custom aber wieder aktiviert werden.';
|
||||
$lang->block->remove = 'Entfernen';
|
||||
$lang->block->refresh = 'Aktualisieren';
|
||||
$lang->block->nbsp = '';
|
||||
$lang->block->nbsp = '';
|
||||
$lang->block->hidden = 'Verstecken';
|
||||
$lang->block->dynamicInfo = "<span class='timeline-tag'>%s</span> <span class='timeline-text'>%s <em>%s</em> %s <a href='%s'>%s</a></span>";
|
||||
|
||||
|
||||
@@ -59,9 +59,9 @@ $lang->block->resolvedRisks = 'Risks Resolved';
|
||||
$lang->block->createdIssues = 'Issues Created';
|
||||
$lang->block->resolvedIssues = 'Issues Resolved';
|
||||
$lang->block->createdDocs = 'Docs Created';
|
||||
$lang->block->allProject = 'All ' . $lang->executionCommon;
|
||||
$lang->block->doingProject = 'Doning ' . $lang->executionCommon;
|
||||
$lang->block->finishProject = 'Finish ' . $lang->executionCommon;
|
||||
$lang->block->allExecutions = 'All ' . $lang->executionCommon;
|
||||
$lang->block->doingExecution = 'Doning ' . $lang->executionCommon;
|
||||
$lang->block->finishExecution = 'Finish ' . $lang->executionCommon;
|
||||
$lang->block->estimatedHours = 'Estimated Hours';
|
||||
$lang->block->consumedHours = 'Consumed Hours';
|
||||
$lang->block->time = 'No';
|
||||
@@ -472,7 +472,7 @@ $lang->block->typeList->story['assignedTo'] = 'AssignedToMe';
|
||||
$lang->block->typeList->story['openedBy'] = 'CreatedByMe';
|
||||
$lang->block->typeList->story['reviewedBy'] = 'ReviewedByMe';
|
||||
$lang->block->typeList->story['closedBy'] = 'ClosedByMe' ;
|
||||
|
||||
|
||||
$lang->block->typeList->product['noclosed'] = 'Open';
|
||||
$lang->block->typeList->product['closed'] = 'Closed';
|
||||
$lang->block->typeList->product['all'] = 'All';
|
||||
|
||||
@@ -59,9 +59,9 @@ $lang->block->resolvedRisks = 'Risks Resolved';
|
||||
$lang->block->createdIssues = 'Issues Created';
|
||||
$lang->block->resolvedIssues = 'Issues Resolved';
|
||||
$lang->block->createdDocs = 'Docs Created';
|
||||
$lang->block->allProject = 'All ' . $lang->executionCommon;
|
||||
$lang->block->doingProject = 'Doning ' . $lang->executionCommon;
|
||||
$lang->block->finishProject = 'Finish ' . $lang->executionCommon;
|
||||
$lang->block->allExecutions = 'All ' . $lang->executionCommon;
|
||||
$lang->block->doingExecution = 'Doning ' . $lang->executionCommon;
|
||||
$lang->block->finishExecution = 'Finish ' . $lang->executionCommon;
|
||||
$lang->block->estimatedHours = 'Estimated Hours';
|
||||
$lang->block->consumedHours = 'Consumed Hours';
|
||||
$lang->block->time = 'No';
|
||||
@@ -472,7 +472,7 @@ $lang->block->typeList->story['assignedTo'] = 'Stories qui me sont assignées';
|
||||
$lang->block->typeList->story['openedBy'] = "Stories que j'ai créées";
|
||||
$lang->block->typeList->story['reviewedBy'] = "Stories que j'ai acceptées";
|
||||
$lang->block->typeList->story['closedBy'] = "Stories que j'ai fermées";
|
||||
|
||||
|
||||
$lang->block->typeList->product['noclosed'] = 'Ouverts';
|
||||
$lang->block->typeList->product['closed'] = 'Fermés';
|
||||
$lang->block->typeList->product['all'] = 'Tous';
|
||||
|
||||
@@ -54,14 +54,14 @@ $lang->block->finishedTasks = 'Tasks Finished';
|
||||
$lang->block->createdBugs = 'Bugs Created';
|
||||
$lang->block->resolvedBugs = 'Bugs Resolved';
|
||||
$lang->block->createdCases = 'Cases Created';
|
||||
$lang->block->createdRisks = 'Risks Created';
|
||||
$lang->block->createdRisks = 'Risks Created';
|
||||
$lang->block->resolvedRisks = 'Risks Resolved';
|
||||
$lang->block->createdIssues = 'Issues Created';
|
||||
$lang->block->resolvedIssues = 'Issues Resolved';
|
||||
$lang->block->createdDocs = 'Docs Created';
|
||||
$lang->block->allProject = 'All ' . $lang->executionCommon;
|
||||
$lang->block->doingProject = 'Doning ' . $lang->executionCommon;
|
||||
$lang->block->finishProject = 'Finish ' . $lang->executionCommon;
|
||||
$lang->block->allExecutions = 'All ' . $lang->executionCommon;
|
||||
$lang->block->doingExecution = 'Doning ' . $lang->executionCommon;
|
||||
$lang->block->finishExecution = 'Finish ' . $lang->executionCommon;
|
||||
$lang->block->estimatedHours = 'Estimated Hours';
|
||||
$lang->block->consumedHours = 'Consumed Hours';
|
||||
$lang->block->time = 'No';
|
||||
@@ -472,7 +472,7 @@ $lang->block->typeList->story['assignedTo'] = 'Giao cho bạn';
|
||||
$lang->block->typeList->story['openedBy'] = 'Tạo bởi bạn';
|
||||
$lang->block->typeList->story['reviewedBy'] = 'Duyệt bởi bạn';
|
||||
$lang->block->typeList->story['closedBy'] = 'ClosedByMe' ;
|
||||
|
||||
|
||||
$lang->block->typeList->product['noclosed'] = 'Mở';
|
||||
$lang->block->typeList->product['closed'] = 'Đã đóng';
|
||||
$lang->block->typeList->product['all'] = 'Tất cả';
|
||||
|
||||
@@ -59,7 +59,7 @@ $lang->block->resolvedRisks = '解决的风险数';
|
||||
$lang->block->createdIssues = '创建的问题数';
|
||||
$lang->block->resolvedIssues = '解决的问题数';
|
||||
$lang->block->createdDocs = '创建的文档数';
|
||||
$lang->block->allExecution = '所有' . $lang->executionCommon;
|
||||
$lang->block->allExecutions = '所有' . $lang->executionCommon;
|
||||
$lang->block->doingExecution = '进行中的' . $lang->executionCommon;
|
||||
$lang->block->finishExecution = '累积' . $lang->executionCommon;
|
||||
$lang->block->estimatedHours = '预计';
|
||||
@@ -436,6 +436,12 @@ $lang->block->orderByList->product['id_desc'] = 'ID 递减';
|
||||
$lang->block->orderByList->product['status_asc'] = '状态正序';
|
||||
$lang->block->orderByList->product['status_desc'] = '状态倒序';
|
||||
|
||||
$lang->block->orderByList->project = array();
|
||||
$lang->block->orderByList->project['id_asc'] = 'ID 递增';
|
||||
$lang->block->orderByList->project['id_desc'] = 'ID 递减';
|
||||
$lang->block->orderByList->project['status_asc'] = '状态正序';
|
||||
$lang->block->orderByList->project['status_desc'] = '状态倒序';
|
||||
|
||||
$lang->block->orderByList->execution = array();
|
||||
$lang->block->orderByList->execution['id_asc'] = 'ID 递增';
|
||||
$lang->block->orderByList->execution['id_desc'] = 'ID 递减';
|
||||
|
||||
+22
-17
@@ -264,7 +264,7 @@ class blockModel extends model
|
||||
public function getAvailableBlocks($module = '', $dashboard = '', $model = '')
|
||||
{
|
||||
$blocks = $this->lang->block->availableBlocks;
|
||||
if($dashboard == 'program')
|
||||
if($dashboard == 'project')
|
||||
{
|
||||
$blocks = $this->lang->block->modules[$model]['index']->availableBlocks;
|
||||
}
|
||||
@@ -292,8 +292,9 @@ class blockModel extends model
|
||||
*/
|
||||
public function getListParams($module = '')
|
||||
{
|
||||
if($module == 'product') return $this->getProductParams($module);
|
||||
if($module == 'project') return $this->getProjectParams($module);
|
||||
if($module == 'product') return $this->getProductParams();
|
||||
if($module == 'project') return $this->getProjectParams();
|
||||
if($module == 'execution') return $this->getExecutionParams();
|
||||
|
||||
$params = new stdclass();
|
||||
$params = $this->appendCountParams($params);
|
||||
@@ -442,11 +443,11 @@ class blockModel extends model
|
||||
* @access public
|
||||
* @return json
|
||||
*/
|
||||
public function getProgramParams()
|
||||
public function getProjectParams()
|
||||
{
|
||||
$this->app->loadLang('program');
|
||||
$this->app->loadLang('project');
|
||||
$params->type['name'] = $this->lang->block->type;
|
||||
$params->type['options'] = $this->lang->program->featureBar;
|
||||
$params->type['options'] = $this->lang->project->featureBar;
|
||||
$params->type['control'] = 'select';
|
||||
|
||||
$params->orderBy['name'] = $this->lang->block->orderBy;
|
||||
@@ -462,11 +463,11 @@ class blockModel extends model
|
||||
* @access public
|
||||
* @return json
|
||||
*/
|
||||
public function getProgramTeamParams()
|
||||
public function getProjectTeamParams()
|
||||
{
|
||||
$this->app->loadLang('program');
|
||||
$this->app->loadLang('project');
|
||||
$params->type['name'] = $this->lang->block->type;
|
||||
$params->type['options'] = $this->lang->program->featureBar;
|
||||
$params->type['options'] = $this->lang->project->featureBar;
|
||||
$params->type['control'] = 'select';
|
||||
|
||||
$params->orderBy['name'] = $this->lang->block->orderBy;
|
||||
@@ -512,6 +513,7 @@ class blockModel extends model
|
||||
{
|
||||
if($module == 'product') return $this->getProductStatisticParams($module);
|
||||
if($module == 'project') return $this->getProjectStatisticParams($module);
|
||||
if($module == 'execution') return $this->getExecutionStatisticParams($module);
|
||||
if($module == 'qa') return $this->getQaStatisticParams($module);
|
||||
|
||||
$params = new stdclass();
|
||||
@@ -700,10 +702,10 @@ class blockModel extends model
|
||||
* @access public
|
||||
* @return json
|
||||
*/
|
||||
public function getProjectParams()
|
||||
public function getExecutionParams()
|
||||
{
|
||||
$params->type['name'] = $this->lang->block->type;
|
||||
$params->type['options'] = $this->lang->block->typeList->project;
|
||||
$params->type['options'] = $this->lang->block->typeList->execution;
|
||||
$params->type['control'] = 'select';
|
||||
|
||||
return json_encode($this->appendCountParams($params));
|
||||
@@ -729,13 +731,16 @@ class blockModel extends model
|
||||
$params->bugNum['default'] = 20;
|
||||
$params->bugNum['control'] = 'input';
|
||||
|
||||
$params->riskNum['name'] = $this->lang->block->riskNum;
|
||||
$params->riskNum['default'] = 20;
|
||||
$params->riskNum['control'] = 'input';
|
||||
if(isset($this->config->maxVersion))
|
||||
{
|
||||
$params->riskNum['name'] = $this->lang->block->riskNum;
|
||||
$params->riskNum['default'] = 20;
|
||||
$params->riskNum['control'] = 'input';
|
||||
|
||||
$params->issueNum['name'] = $this->lang->block->issueNum;
|
||||
$params->issueNum['default'] = 20;
|
||||
$params->issueNum['control'] = 'input';
|
||||
$params->issueNum['name'] = $this->lang->block->issueNum;
|
||||
$params->issueNum['default'] = 20;
|
||||
$params->issueNum['control'] = 'input';
|
||||
}
|
||||
|
||||
$params->storyNum['name'] = $this->lang->block->storyNum;
|
||||
$params->storyNum['default'] = 20;
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
<table class='table table-borderless table-hover table-fixed table-fixed-head tablesorter block-projects tablesorter'>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='c-name text-left'><?php echo $lang->project->name;?></th>
|
||||
<th class="c-date"><?php echo $lang->project->end;?></th>
|
||||
<th class='c-name text-left'><?php echo $lang->execution->name;?></th>
|
||||
<th class="c-date"><?php echo $lang->execution->end;?></th>
|
||||
<?php if($longBlock):?>
|
||||
<?php $thClass = common::checkNotCN() ? 'w-85px' : 'c-hours';?>
|
||||
<th class="c-status"><?php echo $lang->statusAB;?></th>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class="panel-body table-row">
|
||||
<div class="col-4 text-middle text-center">
|
||||
<div class="tile">
|
||||
<div class="tile-title"><?php echo $lang->block->allExecution;?></div>
|
||||
<div class="tile-title"><?php echo $lang->block->allExecutions;?></div>
|
||||
<?php $projectLink = $this->createLink('project', 'all', 'status=all')?>
|
||||
<div class="tile-amount"><?php echo $summary->total ? html::a($projectLink, $summary->total) : 0;?></div>
|
||||
</div>
|
||||
|
||||
@@ -364,7 +364,7 @@ class bug extends control
|
||||
$this->bug->setMenu($this->products, $productID, $branch);
|
||||
|
||||
/* Init vars. */
|
||||
$projectID = $this->lang->navGroup->bug == 'project' ? $this->session->project : 0;
|
||||
$projectID = $this->lang->navGroup->bug == 'project' ? $this->session->PRJ : 0;
|
||||
$moduleID = 0;
|
||||
$executionID = 0;
|
||||
$taskID = 0;
|
||||
@@ -571,7 +571,7 @@ class bug extends control
|
||||
$showFields = trim($showFields, ',');
|
||||
}
|
||||
|
||||
$projectID = $this->lang->navGroup->bug == 'project' ? $this->session->project : 0;
|
||||
$projectID = $this->lang->navGroup->bug == 'project' ? $this->session->PRJ : 0;
|
||||
|
||||
$this->view->customFields = $customFields;
|
||||
$this->view->showFields = $showFields;
|
||||
@@ -607,8 +607,8 @@ class bug extends control
|
||||
/* Judge bug exits or not. */
|
||||
$bug = $this->bug->getById($bugID, true);
|
||||
if(!$bug) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
$this->session->project = $bug->project;
|
||||
$this->view->products = $this->products = $this->product->getProductPairsByProject($this->session->project);
|
||||
$this->session->PRJ = $bug->project;
|
||||
$this->view->products = $this->products = $this->product->getProductPairsByProject($this->session->PRJ);
|
||||
|
||||
$this->bug->checkBugExecutionPriv($bug);
|
||||
|
||||
@@ -624,7 +624,7 @@ class bug extends control
|
||||
{
|
||||
session_write_close();
|
||||
$this->lang->set('menugroup.bug', 'repo');
|
||||
$repos = $this->loadModel('repo')->getRepoPairs($this->session->project);
|
||||
$repos = $this->loadModel('repo')->getRepoPairs($this->session->PRJ);
|
||||
$this->repo->setMenu($repos);
|
||||
$this->lang->bug->menu = $this->lang->repo->menu;
|
||||
}
|
||||
@@ -755,7 +755,7 @@ class bug extends control
|
||||
$oldResolvedBuild = array();
|
||||
if(($bug->resolvedBuild) and isset($allBuilds[$bug->resolvedBuild])) $oldResolvedBuild[$bug->resolvedBuild] = $allBuilds[$bug->resolvedBuild];
|
||||
|
||||
$projectID = $this->lang->navGroup->bug == 'project' ? $this->session->project : 0;
|
||||
$projectID = $this->lang->navGroup->bug == 'project' ? $this->session->PRJ : 0;
|
||||
|
||||
$this->view->bug = $bug;
|
||||
$this->view->productID = $productID;
|
||||
@@ -1120,7 +1120,7 @@ class bug extends control
|
||||
}
|
||||
}
|
||||
|
||||
$projectID = $this->lang->navGroup->bug == 'project' ? $this->session->project : 0;
|
||||
$projectID = $this->lang->navGroup->bug == 'project' ? $this->session->PRJ : 0;
|
||||
$bug = $this->bug->getById($bugID);
|
||||
$productID = $bug->product;
|
||||
$users = $this->user->getPairs('noclosed');
|
||||
|
||||
@@ -72,7 +72,7 @@ class bugModel extends model
|
||||
->setDefault('execution,story,task', 0)
|
||||
->setDefault('openedBuild', '')
|
||||
->setDefault('deadline', '0000-00-00')
|
||||
->setIF($this->config->systemMode == 'new' && $this->lang->navGroup->bug != 'qa', 'project', $this->session->project)
|
||||
->setIF($this->config->systemMode == 'new' && $this->lang->navGroup->bug != 'qa', 'project', $this->session->PRJ)
|
||||
->setIF(strpos($this->config->bug->create->requiredFields, 'deadline') !== false, 'deadline', $this->post->deadline)
|
||||
->setIF($this->post->assignedTo != '', 'assignedDate', $now)
|
||||
->setIF($this->post->story != false, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story))
|
||||
@@ -234,7 +234,7 @@ class bugModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
if($this->config->systemMode == 'new' && $this->lang->navGroup->bug != 'qa') $bug->project = $this->session->project;
|
||||
if($this->config->systemMode == 'new' && $this->lang->navGroup->bug != 'qa') $bug->project = $this->session->PRJ;
|
||||
$this->dao->insert(TABLE_BUG)->data($bug)
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->bug->create->requiredFields, 'notempty')
|
||||
@@ -1232,7 +1232,7 @@ class bugModel extends model
|
||||
*/
|
||||
public function buildSearchForm($productID, $products, $queryID, $actionURL)
|
||||
{
|
||||
$projectID = $this->lang->navGroup->bug == 'qa' ? 0 : $this->session->project;
|
||||
$projectID = $this->lang->navGroup->bug == 'qa' ? 0 : $this->session->PRJ;
|
||||
$this->config->bug->search['actionURL'] = $actionURL;
|
||||
$this->config->bug->search['queryID'] = $queryID;
|
||||
$this->config->bug->search['params']['product']['values'] = array($productID => $products[$productID], 'all' => $this->lang->bug->allProduct);
|
||||
@@ -1678,7 +1678,7 @@ class bugModel extends model
|
||||
{
|
||||
$datas = $this->dao->select('execution as name, count(execution) as value')->from(TABLE_BUG)->where($this->reportCondition())->groupBy('execution')->orderBy('value DESC')->fetchAll('name');
|
||||
if(!$datas) return array();
|
||||
$executions = $this->loadModel('execution')->getPairs($this->session->project);
|
||||
$executions = $this->loadModel('execution')->getPairs($this->session->PRJ);
|
||||
|
||||
$maxLength = 12;
|
||||
if(common::checkNotCN()) $maxLength = 22;
|
||||
|
||||
@@ -100,7 +100,7 @@ class build extends control
|
||||
$build = $this->build->getById((int)$buildID);
|
||||
|
||||
/* Set menu. */
|
||||
$this->execution->setMenu($this->execution->getPairs($this->session->project), $build->execution);
|
||||
$this->execution->setMenu($this->execution->getPairs($this->session->PRJ), $build->execution);
|
||||
|
||||
/* Get stories and bugs. */
|
||||
$orderBy = 'status_asc, stage_asc, id_desc';
|
||||
@@ -113,7 +113,7 @@ class build extends control
|
||||
$execution->name = '';
|
||||
}
|
||||
|
||||
$executions = $this->product->getExecutionPairsByProduct($build->product, $build->branch, 'id_desc', $this->session->project);
|
||||
$executions = $this->product->getExecutionPairsByProduct($build->product, $build->branch, 'id_desc', $this->session->PRJ);
|
||||
if(!isset($executions[$build->execution])) $executions[$build->execution] = $execution->name;
|
||||
|
||||
$productGroups = $this->execution->getProducts($build->execution);
|
||||
@@ -162,7 +162,7 @@ class build extends control
|
||||
{
|
||||
$build = $this->build->getByID((int)$buildID, true);
|
||||
if(!$build) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
$this->session->project = $build->project;
|
||||
$this->session->PRJ = $build->project;
|
||||
|
||||
/* Set session and load modules. */
|
||||
if($type == 'story')$this->session->set('storyList', $this->app->getURI(true));
|
||||
@@ -195,8 +195,8 @@ class build extends control
|
||||
foreach($stages as $storyID => $stage)$stories[$storyID]->stage = $stage;
|
||||
|
||||
/* Set menu. */
|
||||
$this->loadModel('execution')->setMenu($this->execution->getPairs($this->session->project), $build->execution, $buildID);
|
||||
$executions = $this->execution->getPairs($this->session->project, 'all', 'empty');
|
||||
$this->loadModel('execution')->setMenu($this->execution->getPairs($this->session->PRJ), $build->execution, $buildID);
|
||||
$executions = $this->execution->getPairs($this->session->PRJ, 'all', 'empty');
|
||||
|
||||
$this->view->title = "BUILD #$build->id $build->name - " . $executions[$build->execution];
|
||||
$this->view->position[] = html::a($this->createLink('execution', 'task', "executionID=$build->execution"), $executions[$build->execution]);
|
||||
@@ -390,7 +390,7 @@ class build extends control
|
||||
$this->session->set('storyList', inlink('view', "buildID=$buildID&type=story&link=true¶m=" . helper::safe64Encode("&browseType=$browseType&queryID=$param")));
|
||||
$build = $this->build->getById($buildID);
|
||||
$product = $this->loadModel('product')->getById($build->product);
|
||||
$this->loadModel('execution')->setMenu($this->execution->getPairs($this->session->project), $build->execution);
|
||||
$this->loadModel('execution')->setMenu($this->execution->getPairs($this->session->PRJ), $build->execution);
|
||||
$this->loadModel('story');
|
||||
$this->loadModel('tree');
|
||||
$this->loadModel('product');
|
||||
@@ -509,7 +509,7 @@ class build extends control
|
||||
/* Set menu. */
|
||||
$build = $this->build->getByID($buildID);
|
||||
$product = $this->loadModel('product')->getByID($build->product);
|
||||
$this->loadModel('execution')->setMenu($this->execution->getPairs($this->session->project), $build->execution);
|
||||
$this->loadModel('execution')->setMenu($this->execution->getPairs($this->session->PRJ), $build->execution);
|
||||
|
||||
/* Load pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
@@ -524,7 +524,7 @@ class build extends control
|
||||
$this->config->bug->search['style'] = 'simple';
|
||||
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getForProducts(array($build->product => $build->product));
|
||||
$this->config->bug->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($build->product, $viewType = 'bug', $startModuleID = 0);
|
||||
$this->config->bug->search['params']['execution']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($build->product, 0, 'id_desc', $this->session->project);
|
||||
$this->config->bug->search['params']['execution']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($build->product, 0, 'id_desc', $this->session->PRJ);
|
||||
$this->config->bug->search['params']['openedBuild']['values'] = $this->build->getProductBuildPairs($build->product, $branch = 0, $params = '');
|
||||
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->config->bug->search['params']['openedBuild']['values'];
|
||||
|
||||
|
||||
@@ -144,15 +144,15 @@ class buildModel extends model
|
||||
$this->session->set('projectBuildForm', $query->form);
|
||||
}
|
||||
}
|
||||
if($this->session->projectBuildQuery == false) $this->session->set('projectBuildQuery', ' 1 = 1');
|
||||
if($this->session->PRJBuildQuery == false) $this->session->set('projectBuildQuery', ' 1 = 1');
|
||||
|
||||
$buildQuery = $this->session->projectBuildQuery;
|
||||
$buildQuery = $this->session->PRJBuildQuery;
|
||||
|
||||
/* Distinguish between repeated fields. */
|
||||
$fields = array('id' => '`id`', 'name' => '`name`', 'product' => '`product`', 'desc' => '`desc`', 'project' => '`project`');
|
||||
foreach($fields as $field)
|
||||
{
|
||||
if(strpos($this->session->projectBuildQuery, $field) !== false)
|
||||
if(strpos($this->session->PRJBuildQuery, $field) !== false)
|
||||
{
|
||||
$buildQuery = str_replace($field, "t1." . $field, $buildQuery);
|
||||
}
|
||||
@@ -293,7 +293,7 @@ class buildModel extends model
|
||||
->leftJoin(TABLE_RELEASE)->alias('t3')->on('t1.id = t3.build')
|
||||
->leftJoin(TABLE_BRANCH)->alias('t4')->on('t1.branch = t4.id')
|
||||
->where('t1.product')->in($products)
|
||||
->beginIF($this->lang->navGroup->testtask != 'qa')->andWhere('t1.project')->eq($this->session->project)->fi()
|
||||
->beginIF($this->lang->navGroup->testtask != 'qa')->andWhere('t1.project')->eq($this->session->PRJ)->fi()
|
||||
->beginIF($branch)->andWhere('t1.branch')->in("0,$branch")->fi()
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->orderBy('t1.date desc, t1.id desc')->fetchAll('id');
|
||||
@@ -354,7 +354,7 @@ class buildModel extends model
|
||||
$build->bugs = '';
|
||||
|
||||
$build = fixer::input('post')
|
||||
->setDefault('project', $this->session->project)
|
||||
->setDefault('project', $this->session->PRJ)
|
||||
->setDefault('product', 0)
|
||||
->setDefault('branch', 0)
|
||||
->cleanInt('product,branch')
|
||||
|
||||
@@ -234,7 +234,7 @@ class caselibModel extends model
|
||||
$lib = fixer::input('post')
|
||||
->stripTags($this->config->caselib->editor->create['id'], $this->config->allowedTags)
|
||||
->setForce('type', 'library')
|
||||
->setIF($this->config->systemMode == 'new' and $this->lang->navGroup->caselib != 'qa', 'project', $this->session->project)
|
||||
->setIF($this->config->systemMode == 'new' and $this->lang->navGroup->caselib != 'qa', 'project', $this->session->PRJ)
|
||||
->add('addedBy', $this->app->user->account)
|
||||
->add('addedDate', helper::now())
|
||||
->remove('uid')
|
||||
@@ -278,7 +278,7 @@ class caselibModel extends model
|
||||
{
|
||||
$cases = $this->dao->select('*')->from(TABLE_CASE)
|
||||
->where('lib')->eq((int)$libID)
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->caselib != 'qa')->andWhere('project')->eq($this->session->project)->fi()
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->caselib != 'qa')->andWhere('project')->eq($this->session->PRJ)->fi()
|
||||
->andWhere('product')->eq(0)
|
||||
->beginIF($moduleIdList)->andWhere('module')->in($moduleIdList)->fi()
|
||||
->beginIF($browseType == 'wait')->andWhere('status')->eq($browseType)->fi()
|
||||
@@ -315,7 +315,7 @@ class caselibModel extends model
|
||||
|
||||
$cases = $this->dao->select('*')->from(TABLE_CASE)->where($caseQuery)
|
||||
->beginIF($queryLibID != 'all')->andWhere('lib')->eq((int)$libID)->fi()
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->caselib != 'qa')->andWhere('project')->eq($this->session->project)->fi()
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->caselib != 'qa')->andWhere('project')->eq($this->session->PRJ)->fi()
|
||||
->andWhere('product')->eq(0)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy($sort)->page($pager)->fetchAll();
|
||||
@@ -536,7 +536,7 @@ class caselibModel extends model
|
||||
}
|
||||
else
|
||||
{
|
||||
$caseData->project = $this->session->project;
|
||||
$caseData->project = $this->session->PRJ;
|
||||
$caseData->version = 1;
|
||||
$caseData->openedBy = $this->app->user->account;
|
||||
$caseData->openedDate = $now;
|
||||
@@ -630,7 +630,7 @@ class caselibModel extends model
|
||||
$data[$i]->openedDate = $now;
|
||||
$data[$i]->status = $forceNotReview ? 'normal' : 'wait';
|
||||
$data[$i]->version = 1;
|
||||
if($this->config->systemMode == 'new' and $this->lang->navGroup->caselib != 'qa') $data[$i]->project = $this->session->project;
|
||||
if($this->config->systemMode == 'new' and $this->lang->navGroup->caselib != 'qa') $data[$i]->project = $this->session->PRJ;
|
||||
|
||||
$this->dao->insert(TABLE_CASE)->data($data[$i])
|
||||
->autoCheck()
|
||||
|
||||
@@ -895,6 +895,7 @@ $lang->menu->scrum->qa = 'QA|qa|index';
|
||||
$lang->menu->scrum->ci = 'Code|repo|browse';
|
||||
$lang->menu->scrum->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
|
||||
$lang->menu->scrum->projectrelease = array('link' => 'Release|projectrelease|browse');
|
||||
$lang->menu->scrum->dynamic = array('link' => 'Dynamic|project|dynamic|project={PROJECT}');
|
||||
$lang->menu->scrum->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder');
|
||||
$lang->menu->scrum->projectsetting = array('link' => 'Setting|project|view|project={PROJECT}', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
|
||||
|
||||
@@ -924,6 +925,7 @@ $lang->menu->waterfall->track = array('link' => 'Track|projectstory|tra
|
||||
$lang->menu->waterfall->qa = 'QA|qa|index';
|
||||
$lang->menu->waterfall->projectrelease = array('link' => 'Release|projectrelease|browse');
|
||||
$lang->menu->waterfall->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
|
||||
$lang->menu->waterfall->dynamic = array('link' => 'Dynamic|project|dynamic|project={PROJECT}');
|
||||
$lang->menu->waterfall->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
|
||||
$lang->menu->waterfall->projectsetting = array('link' => 'Setting|project|view|project={PROJECT}', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
|
||||
|
||||
|
||||
@@ -894,6 +894,7 @@ $lang->menu->scrum->qa = 'QA|qa|index';
|
||||
$lang->menu->scrum->ci = 'Code|repo|browse';
|
||||
$lang->menu->scrum->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
|
||||
$lang->menu->scrum->projectrelease = array('link' => 'Release|projectrelease|browse');
|
||||
$lang->menu->scrum->dynamic = array('link' => 'Dynamic|project|dynamic|project={PROJECT}');
|
||||
$lang->menu->scrum->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder');
|
||||
$lang->menu->scrum->projectsetting = array('link' => 'Setting|project|view|project={PROJECT}', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
|
||||
|
||||
@@ -923,6 +924,7 @@ $lang->menu->waterfall->track = array('link' => 'Track|projectstory|tra
|
||||
$lang->menu->waterfall->qa = 'QA|qa|index';
|
||||
$lang->menu->waterfall->projectrelease = array('link' => 'Release|projectrelease|browse');
|
||||
$lang->menu->waterfall->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
|
||||
$lang->menu->waterfall->dynamic = array('link' => 'Dynamic|project|dynamic|project={PROJECT}');
|
||||
$lang->menu->waterfall->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
|
||||
$lang->menu->waterfall->projectsetting = array('link' => 'Setting|project|view|project={PROJECT}', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
|
||||
|
||||
|
||||
@@ -894,6 +894,7 @@ $lang->menu->scrum->qa = 'QA|qa|index';
|
||||
$lang->menu->scrum->ci = 'Code|repo|browse';
|
||||
$lang->menu->scrum->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
|
||||
$lang->menu->scrum->projectrelease = array('link' => 'Release|projectrelease|browse');
|
||||
$lang->menu->scrum->dynamic = array('link' => 'Dynamic|project|dynamic|project={PROJECT}');
|
||||
$lang->menu->scrum->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder');
|
||||
$lang->menu->scrum->projectsetting = array('link' => 'Setting|project|view|project={PROJECT}', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
|
||||
|
||||
@@ -923,6 +924,7 @@ $lang->menu->waterfall->track = array('link' => 'Track|projectstory|tra
|
||||
$lang->menu->waterfall->qa = 'QA|qa|index';
|
||||
$lang->menu->waterfall->projectrelease = array('link' => 'Release|projectrelease|browse');
|
||||
$lang->menu->waterfall->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
|
||||
$lang->menu->waterfall->dynamic = array('link' => 'Dynamic|project|dynamic|project={PROJECT}');
|
||||
$lang->menu->waterfall->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
|
||||
$lang->menu->waterfall->projectsetting = array('link' => 'Setting|project|view|project={PROJECT}', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ $lang->waterfall->menuOrder[50] = 'projectbuild';
|
||||
$lang->waterfall->menuOrder[55] = 'projectrelease';
|
||||
$lang->waterfall->menuOrder[60] = 'weekly';
|
||||
$lang->waterfall->menuOrder[65] = 'other';
|
||||
$lang->waterfall->menuOrder[68] = 'dynamic';
|
||||
$lang->waterfall->menuOrder[70] = 'projectsetting';
|
||||
|
||||
/* Sort of main menu. */
|
||||
@@ -39,6 +40,7 @@ $lang->scrum->menuOrder[30] = 'doc';
|
||||
$lang->scrum->menuOrder[35] = 'projectbuild';
|
||||
$lang->scrum->menuOrder[40] = 'projectrelease';
|
||||
$lang->scrum->menuOrder[45] = 'other';
|
||||
$lang->scrum->menuOrder[48] = 'dynamic';
|
||||
$lang->scrum->menuOrder[50] = 'projectsetting';
|
||||
|
||||
/* index menu order. */
|
||||
|
||||
@@ -894,6 +894,7 @@ $lang->menu->scrum->qa = 'QA|qa|index';
|
||||
$lang->menu->scrum->ci = 'Code|repo|browse';
|
||||
$lang->menu->scrum->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
|
||||
$lang->menu->scrum->projectrelease = array('link' => 'Release|projectrelease|browse');
|
||||
$lang->menu->scrum->dynamic = array('link' => 'Dynamic|project|dynamic|project={PROJECT}');
|
||||
$lang->menu->scrum->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder');
|
||||
$lang->menu->scrum->projectsetting = array('link' => 'Setting|project|view|project={PROJECT}', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
|
||||
|
||||
@@ -923,6 +924,7 @@ $lang->menu->waterfall->track = array('link' => 'Track|projectstory|tra
|
||||
$lang->menu->waterfall->qa = 'QA|qa|index';
|
||||
$lang->menu->waterfall->projectrelease = array('link' => 'Release|projectrelease|browse');
|
||||
$lang->menu->waterfall->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
|
||||
$lang->menu->waterfall->dynamic = array('link' => 'Dynamic|project|dynamic|project={PROJECT}');
|
||||
$lang->menu->waterfall->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
|
||||
$lang->menu->waterfall->projectsetting = array('link' => 'Setting|project|view|project={PROJECT}', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
|
||||
|
||||
|
||||
@@ -528,7 +528,7 @@ $lang->admin->menu->index = array('link' => '首页|admin|index', 'alias' => '
|
||||
$lang->admin->menu->company = array('link' => '人员|company|browse|', 'subModule' => ',user,dept,group,', 'alias' => ',dynamic,view,');
|
||||
$lang->admin->menu->message = array('link' => '通知|message|index', 'subModule' => 'message,mail,webhook');
|
||||
$lang->admin->menu->custom = array('link' => '自定义|custom|index', 'subModule' => 'custom');
|
||||
$lang->admin->menu->system = array('link' => '系统|backup|index', 'subModule' => 'cron,admin,backup,action');
|
||||
$lang->admin->menu->system = array('link' => '系统|backup|index', 'subModule' => 'cron,backup,action');
|
||||
|
||||
$lang->company->menu = $lang->company->menu;
|
||||
$lang->dept->menu = $lang->company->menu;
|
||||
@@ -895,7 +895,8 @@ $lang->menu->scrum->doc = '文档|doc|index|';
|
||||
$lang->menu->scrum->qa = '测试|qa|index';
|
||||
$lang->menu->scrum->ci = '代码|repo|browse';
|
||||
$lang->menu->scrum->projectbuild = array('link' => '版本|projectbuild|browse|project={PROJECT}');
|
||||
$lang->menu->scrum->projectrelease = array('link' => '发布|projectrelease|browse');
|
||||
$lang->menu->scrum->projectrelease = array('link' => '发布|projectrelease|browse|project={PROJECT}');
|
||||
$lang->menu->scrum->dynamic = array('link' => '动态|project|dynamic');
|
||||
$lang->menu->scrum->other = array('link' => '其他|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder');
|
||||
$lang->menu->scrum->projectsetting = array('link' => '设置|project|view|project={PROJECT}', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
|
||||
|
||||
@@ -925,6 +926,7 @@ $lang->menu->waterfall->track = array('link' => '矩阵|projectstory|tr
|
||||
$lang->menu->waterfall->qa = '测试|qa|index';
|
||||
$lang->menu->waterfall->projectrelease = array('link' => '发布|projectrelease|browse');
|
||||
$lang->menu->waterfall->projectbuild = array('link' => '版本|projectbuild|browse|project={PROJECT}');
|
||||
$lang->menu->waterfall->dynamic = array('link' => '动态|project|dynamic|project={PROJECT}');
|
||||
$lang->menu->waterfall->other = array('link' => '其他|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
|
||||
$lang->menu->waterfall->projectsetting = array('link' => '设置|project|view|project={PROJECT}', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
|
||||
|
||||
|
||||
@@ -392,7 +392,7 @@ class commonModel extends model
|
||||
{
|
||||
if($group == 'program')
|
||||
{
|
||||
$link = helper::createLink($menuItem->link['module'], $menuItem->link['method'], $vars, '', '', $app->session->project);
|
||||
$link = helper::createLink($menuItem->link['module'], $menuItem->link['method'], $vars, '', '', $app->session->PRJ);
|
||||
}
|
||||
elseif($group == 'product' && $menuItem->name == 'doc')
|
||||
{
|
||||
@@ -472,7 +472,7 @@ class commonModel extends model
|
||||
if(isset($lang->$model->subMenu->$key))
|
||||
{
|
||||
$programSubMenu = $lang->$model->subMenu->$key;
|
||||
$subMenu = common::createSubMenu($programSubMenu, $app->session->project);
|
||||
$subMenu = common::createSubMenu($programSubMenu, $app->session->PRJ);
|
||||
|
||||
if(!empty($subMenu))
|
||||
{
|
||||
@@ -1732,7 +1732,7 @@ EOD;
|
||||
if(!defined('IN_UPGRADE') and $inProject)
|
||||
{
|
||||
/* Check program priv. */
|
||||
if($this->session->project and strpos(",{$this->app->user->view->projects},", ",{$this->session->project},") === false and !$this->app->user->admin) $this->loadModel('program')->accessDenied();
|
||||
if($this->session->PRJ and strpos(",{$this->app->user->view->projects},", ",{$this->session->PRJ},") === false and !$this->app->user->admin) $this->loadModel('program')->accessDenied();
|
||||
$this->resetProgramPriv($module, $method);
|
||||
if(!commonModel::hasPriv($module, $method)) $this->deny($module, $method, false);
|
||||
}
|
||||
@@ -1772,7 +1772,7 @@ EOD;
|
||||
|
||||
/* If is the program admin, have all program privs. */
|
||||
$inProject = isset($lang->navGroup->$module) && $lang->navGroup->$module == 'project';
|
||||
if($inProject && $app->session->project && strpos(",{$app->user->rights['projects']},", ",{$app->session->project},") !== false) return true;
|
||||
if($inProject && $app->session->PRJ && strpos(",{$app->user->rights['projects']},", ",{$app->session->PRJ},") !== false) return true;
|
||||
|
||||
/* If not super admin, check the rights. */
|
||||
$rights = $app->user->rights['rights'];
|
||||
@@ -1812,8 +1812,8 @@ EOD;
|
||||
public function resetProgramPriv($module, $method)
|
||||
{
|
||||
/* Get user program priv. */
|
||||
if(!$this->app->session->project) return;
|
||||
$program = $this->dao->findByID($this->app->session->project)->from(TABLE_PROJECT)->fetch();
|
||||
if(!$this->app->session->PRJ) return;
|
||||
$program = $this->dao->findByID($this->app->session->PRJ)->from(TABLE_PROJECT)->fetch();
|
||||
$programRights = $this->dao->select('t3.module, t3.method')->from(TABLE_GROUP)->alias('t1')
|
||||
->leftJoin(TABLE_USERGROUP)->alias('t2')->on('t1.id = t2.group')
|
||||
->leftJoin(TABLE_GROUPPRIV)->alias('t3')->on('t2.group=t3.group')
|
||||
@@ -2398,7 +2398,7 @@ EOD;
|
||||
|
||||
if(strpos($link, "{PRODUCT}") !== false) $link = str_replace('{PRODUCT}', $app->session->product, $link);
|
||||
if(strpos($link, "{EXECUTION}") !== false) $link = str_replace('{EXECUTION}', $app->session->execution, $link);
|
||||
if(strpos($link, "{PROJECT}") !== false) $link = str_replace('{PROJECT}', $app->session->project, $link);
|
||||
if(strpos($link, "{PROJECT}") !== false) $link = str_replace('{PROJECT}', $app->session->PRJ, $link);
|
||||
|
||||
if(is_array($setting))
|
||||
{
|
||||
@@ -2426,7 +2426,7 @@ EOD;
|
||||
public static function getProjectMainMenu($moduleName)
|
||||
{
|
||||
global $app, $lang, $dbh, $config;
|
||||
$project = $dbh->query("SELECT * FROM " . TABLE_PROJECT . " WHERE `id` = '{$app->session->project}'")->fetch();
|
||||
$project = $dbh->query("SELECT * FROM " . TABLE_PROJECT . " WHERE `id` = '{$app->session->PRJ}'")->fetch();
|
||||
if(empty($project)) return;
|
||||
|
||||
self::initProjectSubmenu();
|
||||
@@ -2461,7 +2461,7 @@ EOD;
|
||||
public static function getProgramModuleMenu($moduleName, $methodName)
|
||||
{
|
||||
global $app, $lang, $dbh;
|
||||
$program = $dbh->query("SELECT * FROM " . TABLE_PROJECT . " WHERE `id` = '{$app->session->project}'")->fetch();
|
||||
$program = $dbh->query("SELECT * FROM " . TABLE_PROJECT . " WHERE `id` = '{$app->session->PRJ}'")->fetch();
|
||||
if(empty($program)) return;
|
||||
if($program->model == 'waterfall')
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ $isQa = $rawModule == 'qa';
|
||||
<?php if($isQa) echo isset($lang->qa->switcherMenu) ? $lang->qa->switcherMenu : '';?>
|
||||
<?php if($this->config->systemMode == 'new'):?>
|
||||
<?php if($isProgram) echo isset($lang->program->switcherMenu) ? $lang->program->switcherMenu : '';?>
|
||||
<?php if($isProject) echo $this->loadModel('project')->getSwitcher($this->session->project, $app->rawModule, $app->rawMethod);?>
|
||||
<?php if($isProject) echo $this->loadModel('project')->getSwitcher($this->session->PRJ, $app->rawModule, $app->rawMethod);?>
|
||||
<?php elseif($this->config->systemMode == 'classic'):?>
|
||||
<?php if($isProject) echo isset($lang->project->switcherMenu) ? $lang->project->switcherMenu : '';;?>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -128,7 +128,7 @@ class doc extends control
|
||||
$this->lang->doc->menu = $this->lang->project->menu;
|
||||
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
|
||||
if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
|
||||
$this->project->setMenu($this->project->getPairs($this->session->project, 'all', 0, true), $lib->project);
|
||||
$this->project->setMenu($this->project->getPairs($this->session->PRJ, 'all', 0, true), $lib->project);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -231,7 +231,7 @@ class doc extends control
|
||||
}
|
||||
}
|
||||
|
||||
$projectID = $this->session->project;
|
||||
$projectID = $this->session->PRJ;
|
||||
$products = $this->product->getProductPairsByProject($projectID, 'noclosed');
|
||||
$executions = $this->execution->getByProject($projectID, 'all', 0, true);
|
||||
|
||||
@@ -364,7 +364,7 @@ class doc extends control
|
||||
$this->lang->doc->menu = $this->lang->project->menu;
|
||||
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
|
||||
if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
|
||||
$this->project->setMenu($this->project->getPairs($this->session->project, 'all', 0, true), $lib->project);
|
||||
$this->project->setMenu($this->project->getPairs($this->session->PRJ, 'all', 0, true), $lib->project);
|
||||
$this->lang->set('menugroup.doc', 'project');
|
||||
|
||||
$this->lang->TRActions = common::hasPriv('doc', 'createLib') ? html::a(helper::createLink('doc', 'createLib'), "<i class='icon icon-plus'></i> " . $this->lang->doc->createlib, '', "class='btn btn-secondary iframe' data-width='70%'") : '';
|
||||
@@ -517,7 +517,7 @@ class doc extends control
|
||||
$this->lang->doc->menu = $this->lang->project->menu;
|
||||
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
|
||||
if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
|
||||
$this->project->setMenu($this->project->getPairs($this->session->project, 'all', 0, true), $objectID);
|
||||
$this->project->setMenu($this->project->getPairs($this->session->PRJ, 'all', 0, true), $objectID);
|
||||
$this->lang->set('menugroup.doc', 'project');
|
||||
}
|
||||
else
|
||||
@@ -847,7 +847,7 @@ class doc extends control
|
||||
$this->lang->doc->menu = $this->lang->project->menu;
|
||||
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
|
||||
if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
|
||||
$this->project->setMenu($this->project->getPairs($this->session->project, 'all', 0, true), $objectID);
|
||||
$this->project->setMenu($this->project->getPairs($this->session->PRJ, 'all', 0, true), $objectID);
|
||||
$this->lang->set('menugroup.doc', 'project');
|
||||
}
|
||||
else
|
||||
@@ -947,7 +947,7 @@ class doc extends control
|
||||
$this->lang->doc->menu = $this->lang->project->menu;
|
||||
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
|
||||
if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
|
||||
$this->project->setMenu($this->project->getPairs($this->session->project, 'all', 0, true), $objectID);
|
||||
$this->project->setMenu($this->project->getPairs($this->session->PRJ, 'all', 0, true), $objectID);
|
||||
$this->lang->set('menugroup.doc', 'project');
|
||||
}
|
||||
else
|
||||
|
||||
@@ -96,8 +96,8 @@ $lang->doc->removeMenu = 'Vom Menü entfernen';
|
||||
$lang->doc->search = 'Suche';
|
||||
|
||||
/* 查询条件列表 */
|
||||
$lang->doc->allProduct = 'Alle' . $lang->productCommon;
|
||||
$lang->doc->allProject = 'Alle' . $lang->executionCommon;
|
||||
$lang->doc->allProduct = 'Alle' . $lang->productCommon;
|
||||
$lang->doc->allExecutions = 'Alle' . $lang->executionCommon;
|
||||
|
||||
$lang->doc->libTypeList['product'] = $lang->productCommon . ' Bibliothek';
|
||||
$lang->doc->libTypeList['execution'] = $lang->executionCommon . ' Bibliothek';
|
||||
|
||||
@@ -96,8 +96,8 @@ $lang->doc->removeMenu = 'Remove from Menu';
|
||||
$lang->doc->search = 'Search';
|
||||
|
||||
/* Query condition list. */
|
||||
$lang->doc->allProduct = 'All' . $lang->productCommon . 's';
|
||||
$lang->doc->allProject = 'All' . $lang->executionCommon . 's';
|
||||
$lang->doc->allProduct = 'All' . $lang->productCommon . 's';
|
||||
$lang->doc->allExecutions = 'All' . $lang->executionCommon . 's';
|
||||
|
||||
$lang->doc->libTypeList['product'] = $lang->productCommon . ' Library';
|
||||
$lang->doc->libTypeList['execution'] = $lang->executionCommon . ' Library';
|
||||
|
||||
@@ -96,8 +96,8 @@ $lang->doc->removeMenu = 'Décoller du Menu';
|
||||
$lang->doc->search = 'Rechercher';
|
||||
|
||||
/* 查询条件列表 */
|
||||
$lang->doc->allProduct = 'Tous les ' . $lang->productCommon . 's';
|
||||
$lang->doc->allProject = 'Tous les ' . $lang->executionCommon . 's';
|
||||
$lang->doc->allProduct = 'Tous les' . $lang->productCommon . 's';
|
||||
$lang->doc->allExecutions = 'Tous les' . $lang->executionCommon . 's';
|
||||
|
||||
$lang->doc->libTypeList['product'] = $lang->productCommon . ' Library';
|
||||
$lang->doc->libTypeList['execution'] = 'Bibliothèque ' . $lang->executionCommon;
|
||||
|
||||
@@ -96,8 +96,8 @@ $lang->doc->removeMenu = 'Remove from Menu';
|
||||
$lang->doc->search = 'Tìm kiếm';
|
||||
|
||||
/* Query condition list. */
|
||||
$lang->doc->allProduct = 'All' . $lang->productCommon;
|
||||
$lang->doc->allProject = 'All' . $lang->executionCommon;
|
||||
$lang->doc->allProduct = 'All' . $lang->productCommon;
|
||||
$lang->doc->allExecutions = 'All' . $lang->executionCommon;
|
||||
|
||||
$lang->doc->libTypeList['product'] = $lang->productCommon . ' thư viện';
|
||||
$lang->doc->libTypeList['execution'] = $lang->executionCommon . ' thư viện';
|
||||
|
||||
@@ -96,8 +96,8 @@ $lang->doc->removeMenu = '从菜单栏移除';
|
||||
$lang->doc->search = '搜索';
|
||||
|
||||
/* 查询条件列表 */
|
||||
$lang->doc->allProduct = '所有' . $lang->productCommon;
|
||||
$lang->doc->allExecution = '所有' . $lang->executionCommon;
|
||||
$lang->doc->allProduct = '所有' . $lang->productCommon;
|
||||
$lang->doc->allExecutions = '所有' . $lang->executionCommon;
|
||||
|
||||
$lang->doc->libTypeList['product'] = $lang->productCommon . '文档库';
|
||||
$lang->doc->libTypeList['execution'] = $lang->executionCommon . '文档库';
|
||||
|
||||
@@ -152,7 +152,7 @@ class docModel extends model
|
||||
*/
|
||||
public function getLibs($type = '', $extra = '', $appendLibs = '')
|
||||
{
|
||||
$projectID = $this->session->project;
|
||||
$projectID = $this->session->PRJ;
|
||||
if($type == 'product' or $type == 'project')
|
||||
{
|
||||
$idList = array();
|
||||
@@ -779,8 +779,8 @@ class docModel extends model
|
||||
{
|
||||
$this->config->doc->search['actionURL'] = $actionURL;
|
||||
$this->config->doc->search['queryID'] = $queryID;
|
||||
$this->config->doc->search['params']['product']['values'] = array(''=>'') + $this->loadModel('product')->getPairs('nocode', $this->session->project) + array('all'=>$this->lang->doc->allProduct);
|
||||
$this->config->doc->search['params']['execution']['values'] = array(''=>'') + $this->loadModel('execution')->getPairs($this->session->project, 'all', 'noclosed') + array('all'=>$this->lang->doc->allExecution);
|
||||
$this->config->doc->search['params']['product']['values'] = array(''=>'') + $this->loadModel('product')->getPairs('nocode', $this->session->PRJ) + array('all'=>$this->lang->doc->allProduct);
|
||||
$this->config->doc->search['params']['execution']['values'] = array(''=>'') + $this->loadModel('execution')->getPairs($this->session->PRJ, 'all', 'noclosed') + array('all'=>$this->lang->doc->allExecutions);
|
||||
$this->config->doc->search['params']['lib']['values'] = array(''=>'', $libID => ($libID ? $libs[$libID] : 0), 'all' => $this->lang->doclib->all);
|
||||
|
||||
/* Get the modules. */
|
||||
@@ -999,7 +999,7 @@ class docModel extends model
|
||||
$orderBy = '`order` desc, id desc';
|
||||
if($type == 'execution')
|
||||
{
|
||||
$project = $this->loadModel('project')->getByID($this->session->project);
|
||||
$project = $this->loadModel('project')->getByID($this->session->PRJ);
|
||||
$orderBy = (isset($project->model) and $project->model) == 'waterfall' ? 'begin_asc,id_asc' : 'begin_desc,id_desc';
|
||||
}
|
||||
|
||||
@@ -1128,7 +1128,7 @@ class docModel extends model
|
||||
}
|
||||
|
||||
$idList = array();
|
||||
$projectID = $this->session->project;
|
||||
$projectID = $this->session->PRJ;
|
||||
$executionStatus = strpos($this->config->doc->custom->showLibs, 'unclosed') !== false ? 'undone' : 'all';
|
||||
|
||||
/* If it is a extension module, query the extension related products. */
|
||||
@@ -1587,7 +1587,7 @@ class docModel extends model
|
||||
public function getStatisticInfo()
|
||||
{
|
||||
$libIdList = array();
|
||||
$libIdList = $this->getLibIdListByProject($this->session->project);
|
||||
$libIdList = $this->getLibIdListByProject($this->session->PRJ);
|
||||
$docIdList = $this->getPrivDocs($libIdList);
|
||||
|
||||
$today = date('Y-m-d');
|
||||
|
||||
@@ -539,7 +539,7 @@ class execution extends control
|
||||
$this->app->session->set('executionList', $uri);
|
||||
|
||||
$this->loadModel('bug');
|
||||
$executions = $this->execution->getPairs($this->session->project, 'all', 'nocode');
|
||||
$executions = $this->execution->getPairs($this->session->PRJ, 'all', 'nocode');
|
||||
$this->execution->setMenu($executions, $executionID);
|
||||
|
||||
/* Load pager. */
|
||||
@@ -990,7 +990,7 @@ class execution extends control
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->tasks = $productTasks;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
|
||||
$this->view->products = $this->loadModel('product')->getPairs('', $this->session->project);
|
||||
$this->view->products = $this->loadModel('product')->getPairs('', $this->session->PRJ);
|
||||
$this->view->canBeChanged = common::canModify('execution', $execution); // Determines whether an object is editable.
|
||||
|
||||
$this->display();
|
||||
@@ -1205,7 +1205,7 @@ class execution extends control
|
||||
$isSprint = true;
|
||||
if($this->config->systemMode == 'new')
|
||||
{
|
||||
$project = $this->project->getById($this->session->project);
|
||||
$project = $this->project->getById($this->session->PRJ);
|
||||
if($project->model == 'scrum')
|
||||
{
|
||||
unset($this->lang->execution->endList[62]);
|
||||
@@ -1222,7 +1222,7 @@ class execution extends control
|
||||
$this->view->position[] = $this->view->title;
|
||||
$this->view->executions = array('' => '') + $this->executions;
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->allProducts = array(0 => '') + $this->loadModel('product')->getProductPairsByProject($this->session->project);
|
||||
$this->view->allProducts = array(0 => '') + $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
|
||||
$this->view->acl = $acl;
|
||||
$this->view->plan = $plan;
|
||||
$this->view->name = $name;
|
||||
@@ -1335,7 +1335,7 @@ class execution extends control
|
||||
$isSprint = true;
|
||||
if($this->config->systemMode == 'new')
|
||||
{
|
||||
$project = $this->project->getById($this->session->project);
|
||||
$project = $this->project->getById($this->session->PRJ);
|
||||
if($project->model == 'scrum')
|
||||
{
|
||||
unset($this->lang->execution->endList[62]);
|
||||
@@ -1440,7 +1440,7 @@ class execution extends control
|
||||
$rdUsers = $this->user->getPairs('noclosed|nodeleted|devfirst', $appendRdUsers, $this->config->maxCount);
|
||||
if(!empty($this->config->user->moreLink)) $this->config->moreLinks["RD"] = $this->config->user->moreLink;
|
||||
|
||||
$project = $this->project->getById($this->session->project);
|
||||
$project = $this->project->getById($this->session->PRJ);
|
||||
|
||||
$this->view->title = $this->lang->execution->batchEdit;
|
||||
$this->view->position[] = $this->lang->execution->batchEdit;
|
||||
@@ -1649,7 +1649,7 @@ class execution extends control
|
||||
if(empty($execution) || strpos('stage,sprint', $execution->type) === false) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
$this->app->loadLang('program');
|
||||
$this->session->project = $execution->project;
|
||||
$this->session->PRJ = $execution->project;
|
||||
|
||||
/* Execution not found to prevent searching for .*/
|
||||
if(!isset($this->executions[$execution->id])) $this->executions = $this->execution->getPairs($execution->execution, 'all', 'nocode');
|
||||
@@ -2236,15 +2236,15 @@ class execution extends control
|
||||
$allStories = $this->story->getProductStories(array_keys($products), $branches, $moduleID = '0', $status = 'active', 'story', 'id_desc', $hasParent = false, '', $pager = null);
|
||||
}
|
||||
|
||||
if($execution->execution != 0) $executionStories = $this->story->getStoryPairs($execution->execution);
|
||||
if($execution->project != 0) $projectStories = $this->story->getExecutionStoryPairs($execution->project);
|
||||
|
||||
$executionStories = $this->story->getStoryPairs($executionID);
|
||||
$executionStories = $this->story->getExecutionStoryPairs($executionID);
|
||||
foreach($allStories as $id => $story)
|
||||
{
|
||||
if(isset($executionStories[$story->id])) unset($allStories[$id]);
|
||||
|
||||
if($story->parent < 0) unset($allStories[$id]);
|
||||
if(!empty($executionStories) and !isset($executionStories[$story->id])) unset($allStories[$id]);
|
||||
if(!empty($projectStories) and !isset($projectStories[$story->id])) unset($allStories[$id]);
|
||||
}
|
||||
|
||||
/* Pager. */
|
||||
@@ -2406,14 +2406,14 @@ class execution extends control
|
||||
$this->view->accountPairs = $this->loadModel('user')->getPairs('noletter|nodeleted');
|
||||
|
||||
/* Assign. */
|
||||
$this->view->executionID = $executionID;
|
||||
$this->view->type = $type;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->account = $account;
|
||||
$this->view->param = $param;
|
||||
$this->view->dateGroups = $this->action->buildDateGroup($actions, $direction, $type);
|
||||
$this->view->direction = $direction;
|
||||
$this->view->executionID = $executionID;
|
||||
$this->view->type = $type;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->account = $account;
|
||||
$this->view->param = $param;
|
||||
$this->view->dateGroups = $this->action->buildDateGroup($actions, $direction, $type);
|
||||
$this->view->direction = $direction;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -2497,14 +2497,14 @@ class execution extends control
|
||||
*/
|
||||
public function ajaxGetRecentExecutions()
|
||||
{
|
||||
$allExecution = $this->execution->getRecentExecutions();
|
||||
if(!empty($allExecution))
|
||||
$allExecutions = $this->execution->getRecentExecutions();
|
||||
if(!empty($allExecutions))
|
||||
{
|
||||
foreach($allExecution as $type => $executionList)
|
||||
foreach($allExecutions as $type => $executionList)
|
||||
{
|
||||
echo '<div class="heading">'. $this->lang->execution->$type . '</div>';
|
||||
$color = $type == 'recent' ? 'text-brown' : '';
|
||||
$executions = $allExecution[$type];
|
||||
$executions = $allExecutions[$type];
|
||||
$executionsName = array();
|
||||
foreach($executions as $execution) $executionsName[] = $execution->name;
|
||||
$executionsPinYin = common::convert2Pinyin($executionsName);
|
||||
@@ -2601,11 +2601,11 @@ class execution extends control
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
$this->view->title = $this->lang->execution->allExecution;
|
||||
$this->view->position[] = $this->lang->execution->allExecution;
|
||||
$this->view->title = $this->lang->execution->allExecutions;
|
||||
$this->view->position[] = $this->lang->execution->allExecutions;
|
||||
|
||||
$this->view->executionStats = $this->project->getStats($this->session->project, $status, $productID, 0, 30, $orderBy, $pager);
|
||||
$this->view->products = array(0 => $this->lang->product->select) + $this->loadModel('product')->getProductPairsByProject($this->session->project);
|
||||
$this->view->executionStats = $this->project->getStats($this->session->PRJ, $status, $productID, 0, 30, $orderBy, $pager);
|
||||
$this->view->products = array(0 => $this->lang->product->select) + $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
|
||||
$this->view->productID = $productID;
|
||||
$this->view->executionID = $executionID;
|
||||
$this->view->pager = $pager;
|
||||
@@ -2697,7 +2697,7 @@ class execution extends control
|
||||
unset($fields[$key]);
|
||||
}
|
||||
|
||||
$executionStats = $this->execution->getStats($this->session->project, $status == 'byproduct' ? 'all' : $status, $productID, 0, 30, 'id_asc');
|
||||
$executionStats = $this->execution->getStats($this->session->PRJ, $status == 'byproduct' ? 'all' : $status, $productID, 0, 30, 'id_asc');
|
||||
$users = $this->loadModel('user')->getPairs('noletter');
|
||||
foreach($executionStats as $i => $execution)
|
||||
{
|
||||
@@ -2826,7 +2826,7 @@ class execution extends control
|
||||
}
|
||||
$planStories = array_keys($planStory);
|
||||
$this->execution->linkStory($executionID, $planStories, $planProducts);
|
||||
if($executionID != $this->session->project) $this->execution->linkStory($this->session->project, $planStories, $planProducts);
|
||||
if($executionID != $this->session->PRJ) $this->execution->linkStory($this->session->PRJ, $planStories, $planProducts);
|
||||
}
|
||||
|
||||
$moduleName = 'execution';
|
||||
@@ -2871,7 +2871,7 @@ class execution extends control
|
||||
$this->view->cases = $cases;
|
||||
$this->view->story = $story;
|
||||
$this->view->users = $users;
|
||||
$this->view->executions = $this->loadModel('execution')->getPairs($this->session->project, 'all', 'nocode');
|
||||
$this->view->executions = $this->loadModel('execution')->getPairs($this->session->PRJ, 'all', 'nocode');
|
||||
$this->view->actions = $this->loadModel('action')->getList('story', $storyID);
|
||||
$this->view->modulePath = $modulePath;
|
||||
$this->view->version = $version == 0 ? $story->version : $version;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
/* 字段列表。*/
|
||||
$lang->executionCommon = $lang->executionCommon;
|
||||
$lang->execution->common = $lang->executionCommon . '视图';
|
||||
$lang->execution->allExecution = '所有' . $lang->executionCommon;
|
||||
$lang->execution->allExecutions = '所有' . $lang->executionCommon;
|
||||
$lang->execution->id = $lang->executionCommon . '编号';
|
||||
$lang->execution->type = $lang->executionCommon . '类型';
|
||||
$lang->execution->name = $lang->executionCommon . '名称';
|
||||
|
||||
+15
-15
@@ -64,7 +64,7 @@ class executionModel extends model
|
||||
{
|
||||
if(empty($executions))
|
||||
{
|
||||
$project = $this->loadModel('project')->getByID($this->session->project);
|
||||
$project = $this->loadModel('project')->getByID($this->session->PRJ);
|
||||
if($project->model == 'waterfall')
|
||||
{
|
||||
if(($this->app->moduleName == 'programplan' && $this->app->methodName != 'create') || $this->app->moduleName == 'execution') die(js::locate(helper::createLink('programplan', 'create', "projectID=$project->id")));
|
||||
@@ -212,7 +212,7 @@ class executionModel extends model
|
||||
*/
|
||||
public function tree()
|
||||
{
|
||||
$products = $this->loadModel('product')->getPairs('nocode', $this->session->project);
|
||||
$products = $this->loadModel('product')->getPairs('nocode', $this->session->PRJ);
|
||||
$productGroup = $this->getProductGroupList();
|
||||
$executionTree = "<ul class='tree tree-lines'>";
|
||||
foreach($productGroup as $productID => $executions)
|
||||
@@ -324,7 +324,7 @@ class executionModel extends model
|
||||
$this->lang->execution->team = $this->lang->execution->teamname;
|
||||
|
||||
/* Determine whether to add a sprint or a stage according to the model of the execution. */
|
||||
$execution = $this->getByID($this->session->project);
|
||||
$execution = $this->getByID($this->session->PRJ);
|
||||
$sprintType = $this->config->systemMode == 'new' ? zget($this->config->execution->modelList, $execution->model, '') : 'sprint';
|
||||
|
||||
/* If the execution model is a stage, determine whether the product is linked. */
|
||||
@@ -343,8 +343,8 @@ 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', 'execution', $this->session->project)
|
||||
->setIF($this->config->systemMode == 'new', 'parent', $this->session->project)
|
||||
->setIF($this->config->systemMode == 'new', 'execution', $this->session->PRJ)
|
||||
->setIF($this->config->systemMode == 'new', 'parent', $this->session->PRJ)
|
||||
->setIF($this->post->acl == 'open', 'whitelist', '')
|
||||
->join('whitelist', ',')
|
||||
->add('type', $sprintType)
|
||||
@@ -416,7 +416,7 @@ class executionModel extends model
|
||||
$member->hours = $this->config->execution->defaultWorkhours;
|
||||
$this->dao->insert(TABLE_TEAM)->data($member)->exec();
|
||||
|
||||
$this->addExecutionMembers($this->session->project, array($member));
|
||||
$this->addExecutionMembers($this->session->PRJ, array($member));
|
||||
}
|
||||
|
||||
/* Create doc lib. */
|
||||
@@ -1825,7 +1825,7 @@ class executionModel extends model
|
||||
|
||||
$task = new stdClass();
|
||||
$task->bug = $bug;
|
||||
$task->PRJ = $this->session->project;
|
||||
$task->PRJ = $this->session->PRJ;
|
||||
$task->execution = $executionID;
|
||||
$task->story = $bug->story;
|
||||
$task->storyVersion = $bug->storyVersion;
|
||||
@@ -1993,7 +1993,7 @@ class executionModel extends model
|
||||
$data->order = ++$lastOrder;
|
||||
$this->dao->insert(TABLE_PROJECTSTORY)->data($data)->exec();
|
||||
$this->story->setStage($storyID);
|
||||
$action = $executionID == $this->session->project ? 'linked2prj' : 'linked2execution';
|
||||
$action = $executionID == $this->session->PRJ ? 'linked2prj' : 'linked2execution';
|
||||
$this->action->create('story', $storyID, $action, '', $executionID);
|
||||
}
|
||||
}
|
||||
@@ -2037,7 +2037,7 @@ class executionModel extends model
|
||||
}
|
||||
}
|
||||
$this->linkStory($executionID, $planStories, $planProducts);
|
||||
$this->linkStory($this->session->project, $planStories, $planProducts);
|
||||
$this->linkStory($this->session->PRJ, $planStories, $planProducts);
|
||||
if($count != 0) echo js::alert(sprintf($this->lang->execution->haveDraft, $count)) . js::locate(helper::createLink('execution', 'create', "productID=&executionID=$executionID"));
|
||||
}
|
||||
|
||||
@@ -2846,7 +2846,7 @@ class executionModel extends model
|
||||
{
|
||||
$this->config->execution->search['actionURL'] = $actionURL;
|
||||
$this->config->execution->search['queryID'] = $queryID;
|
||||
$this->config->execution->search['params']['execution']['values'] = array(''=>'', $executionID => $executions[$executionID], 'all' => $this->lang->execution->allExecution);
|
||||
$this->config->execution->search['params']['execution']['values'] = array(''=>'', $executionID => $executions[$executionID], 'all' => $this->lang->execution->allExecutions);
|
||||
|
||||
$showAllModule = isset($this->config->execution->task->allModule) ? $this->config->execution->task->allModule : '';
|
||||
$this->config->execution->search['params']['module']['values'] = $this->loadModel('tree')->getTaskOptionMenu($executionID, 0, 0, $showAllModule ? 'allModule' : '');
|
||||
@@ -3462,7 +3462,7 @@ class executionModel extends model
|
||||
$productPairs = $this->getStageLinkProductPairs($stageIdList);
|
||||
|
||||
$recentExecutions = isset($this->config->execution->recentExecutions) ? explode(',', $this->config->execution->recentExecutions) : array();
|
||||
$allExecution = array('recent' => array(), 'mine' => array());
|
||||
$allExecutions = 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;
|
||||
@@ -3470,14 +3470,14 @@ class executionModel extends model
|
||||
if(in_array($execution->id, $recentExecutions))
|
||||
{
|
||||
$index = array_search($execution->id, $recentExecutions);
|
||||
$allExecution['recent'][$index] = $execution;
|
||||
$allExecutions['recent'][$index] = $execution;
|
||||
continue;
|
||||
}
|
||||
$allExecution['mine'][] = $execution;
|
||||
$allExecutions['mine'][] = $execution;
|
||||
}
|
||||
|
||||
ksort($allExecution['recent']);
|
||||
return $allExecution;
|
||||
ksort($allExecutions['recent']);
|
||||
return $allExecutions;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -223,33 +223,35 @@ if($config->systemMode == 'new')
|
||||
$lang->resource->project->unbindWhielist = 'unbindWhielist';
|
||||
$lang->resource->project->manageProducts = 'manageProducts';
|
||||
$lang->resource->project->view = 'view';
|
||||
$lang->resource->project->dynamic = 'dynamic';
|
||||
|
||||
$lang->project->methodOrder[0] = 'index';
|
||||
$lang->project->methodOrder[5] = 'browse';
|
||||
$lang->project->methodOrder[0] = 'index';
|
||||
$lang->project->methodOrder[5] = 'browse';
|
||||
$lang->project->methodOrder[10] = 'programTitle';
|
||||
$lang->project->methodOrder[15] = 'create';
|
||||
$lang->project->methodOrder[20] = 'edit';
|
||||
$lang->project->methodOrder[25] = 'batchEdit';
|
||||
$lang->project->methodOrder[30] = 'group';
|
||||
$lang->project->methodOrder[35] = 'createGroup';
|
||||
$lang->project->methodOrder[40] = 'manageView';
|
||||
$lang->project->methodOrder[45] = 'managePriv';
|
||||
$lang->project->methodOrder[50] = 'manageMembers';
|
||||
$lang->project->methodOrder[55] = 'manageGroupMember';
|
||||
$lang->project->methodOrder[60] = 'copyGroup';
|
||||
$lang->project->methodOrder[65] = 'editGroup';
|
||||
$lang->project->methodOrder[70] = 'start';
|
||||
$lang->project->methodOrder[75] = 'suspend';
|
||||
$lang->project->methodOrder[80] = 'close';
|
||||
$lang->project->methodOrder[85] = 'activate';
|
||||
$lang->project->methodOrder[90] = 'updateOrder';
|
||||
$lang->project->methodOrder[95] = 'delete';
|
||||
$lang->project->methodOrder[15] = 'create';
|
||||
$lang->project->methodOrder[20] = 'edit';
|
||||
$lang->project->methodOrder[25] = 'batchEdit';
|
||||
$lang->project->methodOrder[30] = 'group';
|
||||
$lang->project->methodOrder[35] = 'createGroup';
|
||||
$lang->project->methodOrder[40] = 'manageView';
|
||||
$lang->project->methodOrder[45] = 'managePriv';
|
||||
$lang->project->methodOrder[50] = 'manageMembers';
|
||||
$lang->project->methodOrder[55] = 'manageGroupMember';
|
||||
$lang->project->methodOrder[60] = 'copyGroup';
|
||||
$lang->project->methodOrder[65] = 'editGroup';
|
||||
$lang->project->methodOrder[70] = 'start';
|
||||
$lang->project->methodOrder[75] = 'suspend';
|
||||
$lang->project->methodOrder[80] = 'close';
|
||||
$lang->project->methodOrder[85] = 'activate';
|
||||
$lang->project->methodOrder[90] = 'updateOrder';
|
||||
$lang->project->methodOrder[95] = 'delete';
|
||||
$lang->project->methodOrder[100] = 'view';
|
||||
$lang->project->methodOrder[105] = 'whitelist';
|
||||
$lang->project->methodOrder[110] = 'addWhitelist';
|
||||
$lang->project->methodOrder[115] = 'unbindWhielist';
|
||||
$lang->project->methodOrder[120] = 'manageProducts';
|
||||
$lang->project->methodOrder[125] = 'view';
|
||||
$lang->project->methodOrder[130] = 'dynamic';
|
||||
|
||||
/* Personnel . */
|
||||
$lang->resource->personnel = new stdclass();
|
||||
@@ -564,7 +566,7 @@ $lang->resource->execution->printKanban = 'printKanbanAction';
|
||||
$lang->resource->execution->tree = 'treeAction';
|
||||
$lang->resource->execution->treeTask = 'treeOnlyTask';
|
||||
$lang->resource->execution->treeStory = 'treeOnlyStory';
|
||||
$lang->resource->execution->all = 'allProjects';
|
||||
$lang->resource->execution->all = 'allExecutions';
|
||||
$lang->resource->execution->kanbanHideCols = 'kanbanHideCols';
|
||||
$lang->resource->execution->kanbanColsColor = 'kanbanColsColor';
|
||||
$lang->resource->execution->export = 'exportAction';
|
||||
|
||||
@@ -115,7 +115,7 @@ class personnel extends control
|
||||
$pager = pager::init($recTotal, $recPerPage, $pageID);
|
||||
|
||||
/* Set back link. */
|
||||
$goback = $this->session->projectBrowse ? $this->session->projectBrowse : $this->createLink('program', 'whitelist', "projectID=$objectID");
|
||||
$goback = $this->session->PRJBrowse ? $this->session->PRJBrowse : $this->createLink('program', 'whitelist', "projectID=$objectID");
|
||||
if($from == 'program') $goback = $this->createLink('program', 'browse');
|
||||
if($from == 'programproject') $goback = $this->session->programProject ? $this->session->programProject : $this->createLink('program', 'project', "programID=$programID");
|
||||
|
||||
|
||||
@@ -202,11 +202,11 @@ class product extends control
|
||||
if($this->app->rawModule == 'projectstory')
|
||||
{
|
||||
$this->session->set('currentProductType', $product->type);
|
||||
$projectProducts = $this->product->getProducts($this->session->project);
|
||||
$projectProducts = $this->product->getProducts($this->session->PRJ);
|
||||
$productPlans = $this->execution->getPlans($projectProducts);
|
||||
|
||||
if($browseType == 'bybranch') $param = $branch;
|
||||
$stories = $this->story->getExecutionStories($this->session->project, $productID, $branch, $sort, $browseType, $param, 'story', '', $pager);
|
||||
$stories = $this->story->getExecutionStories($this->session->PRJ, $productID, $branch, $sort, $browseType, $param, 'story', '', $pager);
|
||||
}
|
||||
|
||||
/* Process the sql, get the conditon partion, save it to session. */
|
||||
@@ -903,7 +903,7 @@ class product extends control
|
||||
|
||||
$moduleGroup = zget($this->lang->navGroup, $module);
|
||||
$moduleGroup = in_array($moduleGroup, array('product', 'qa'))? $moduleGroup : 'project';
|
||||
$products = $moduleGroup == 'project' ? $this->product->getProducts($this->session->project, 'all', 'program desc, line desc, ') : $this->product->getList(0, 'all', 0, 0, 'program desc, line desc, ');
|
||||
$products = $moduleGroup == 'project' ? $this->product->getProducts($this->session->PRJ, 'all', 'program desc, line desc, ') : $this->product->getList(0, 'all', 0, 0, 'program desc, line desc, ');
|
||||
|
||||
$this->view->link = $this->product->getProductLink($module, $method, $extra);
|
||||
$this->view->productID = $productID;
|
||||
@@ -911,7 +911,7 @@ class product extends control
|
||||
$this->view->method = $method;
|
||||
$this->view->extra = $extra;
|
||||
$this->view->products = $products;
|
||||
$this->view->projectID = $moduleGroup == 'project' ? $this->session->project : 0;
|
||||
$this->view->projectID = $moduleGroup == 'project' ? $this->session->PRJ : 0;
|
||||
$this->view->programs = $this->loadModel('program')->getPairs(true);
|
||||
$this->view->lines = $this->product->getLinePairs();
|
||||
$this->view->openApp = $moduleGroup;
|
||||
@@ -962,7 +962,7 @@ class product extends control
|
||||
$moduleIndex = array_search('product', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
|
||||
$this->view->project = $this->loadModel('project')->getById($this->session->project);
|
||||
$this->view->project = $this->loadModel('project')->getById($this->session->PRJ);
|
||||
}
|
||||
|
||||
$this->loadModel($fromModule)->setMenu($this->products, key($this->products));
|
||||
@@ -1173,7 +1173,7 @@ class product extends control
|
||||
$this->session->set('productList', $this->app->getURI(true));
|
||||
|
||||
/* Get all product list. Locate to the create product page if there is no product. */
|
||||
$this->products = $this->product->getPairs('', $this->session->project);
|
||||
$this->products = $this->product->getPairs('', $this->session->PRJ);
|
||||
if(empty($this->products) and strpos('create|view', $this->methodName) === false) $this->locate($this->createLink('product', 'create'));
|
||||
|
||||
/* Get current product. */
|
||||
|
||||
@@ -43,3 +43,5 @@ th.table-nest-title .sort-down {padding-left: 5px;}
|
||||
#productTableList .icon-product:before {content: '\e98f'; width: 22px; height: 22px; background: none; color: #16a8f8; top: 0; line-height: 22px; margin-right: 2px; font-size: 14px}
|
||||
|
||||
.main-table thead>tr>th {padding: 0px 8px; line-height: 24px;}
|
||||
|
||||
.icon-move {color: #16a8f8}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<?php include '../../common/view/datatable.fix.html.php';?>
|
||||
<?php js::set('browseType', $browseType);?>
|
||||
<?php js::set('productID', $productID);?>
|
||||
<?php js::set('projectID', $this->session->project);?>
|
||||
<?php js::set('projectID', $this->session->PRJ);?>
|
||||
<?php js::set('branch', $branch);?>
|
||||
<?php js::set('rawModule', $this->app->rawModule);?>
|
||||
<?php
|
||||
@@ -136,14 +136,14 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
|
||||
if(commonModel::isTutorialMode())
|
||||
{
|
||||
$wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&moduleID=$moduleID");
|
||||
if($isProjectStory) $wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&moduleID=$moduleID&storyID=&projectID={$this->session->project}");
|
||||
if($isProjectStory) $wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&moduleID=$moduleID&storyID=&projectID={$this->session->PRJ}");
|
||||
$link = $this->createLink('tutorial', 'wizard', "module=story&method=create¶ms=$wizardParams");
|
||||
echo html::a($link, $lang->story->createCommon, '', "data-group='$openApp'");
|
||||
}
|
||||
else
|
||||
{
|
||||
$link = $this->createLink('story', 'create', "product=$productID&branch=$branch&moduleID=$moduleID&storyID=0&projectID=0&bugID=0&planID=0&todoID=0&extra=&type=$storyType");
|
||||
if($isProjectStory) $link = $this->createLink('story', 'create', "product=$productID&branch=$branch&moduleID=$moduleID&storyID=0&projectID={$this->session->project}");
|
||||
if($isProjectStory) $link = $this->createLink('story', 'create', "product=$productID&branch=$branch&moduleID=$moduleID&storyID=0&projectID={$this->session->PRJ}");
|
||||
$disabled = '';
|
||||
if(!common::hasPriv('story', 'create'))
|
||||
{
|
||||
@@ -158,7 +158,7 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
|
||||
<li <?php echo $batchDisabled;?>>
|
||||
<?php
|
||||
$batchLink = $this->createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID&storyID=0&project=0&plan=0&type=$storyType");
|
||||
if($isProjectStory) $batchLink = $this->createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID&storyID=0&project={$this->session->project}");
|
||||
if($isProjectStory) $batchLink = $this->createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID&storyID=0&project={$this->session->PRJ}");
|
||||
echo html::a($batchLink, $lang->story->batchCreate, '', "data-group='$openApp'");
|
||||
?>
|
||||
</li>
|
||||
@@ -178,7 +178,7 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
|
||||
echo "<i class='icon-link'></i> {$lang->execution->linkStory} <span class='caret'></span>";
|
||||
echo '</button>';
|
||||
echo "<ul class='dropdown-menu pull-right' id='linkActionMenu'>";
|
||||
if(common::hasPriv('projectstory', 'linkStory')) echo '<li>' . html::a($this->createLink('projectstory', 'linkStory', "project={$this->session->project}"), $lang->execution->linkStory). "</li>";
|
||||
if(common::hasPriv('projectstory', 'linkStory')) echo '<li>' . html::a($this->createLink('projectstory', 'linkStory', "project={$this->session->PRJ}"), $lang->execution->linkStory). "</li>";
|
||||
if(common::hasPriv('project', 'importPlanStories')) echo '<li>' . html::a('#linkStoryByPlan', $lang->execution->linkStoryByPlan, '', 'data-toggle="modal"') . "</li>";
|
||||
echo '</ul>';
|
||||
}
|
||||
@@ -212,7 +212,7 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $storyType == 'story' ? $lang->story->noStory : $lang->story->noRequirement;?></span>
|
||||
<?php if(common::canModify('product', $product) and common::hasPriv('story', 'create')):?>
|
||||
<?php $projectID = $isProjectStory ? $this->session->project : 0;?>
|
||||
<?php $projectID = $isProjectStory ? $this->session->PRJ : 0;?>
|
||||
<?php $openApp = $isProjectStory ? 'project' : 'product';?>
|
||||
<?php echo html::a($this->createLink('story', 'create', "productID={$productID}&branch={$branch}&moduleID={$moduleID}&storyID=0&projectID=$projectID&bugID=0&planID=0&todoID=0&extra=&type=$storyType"), "<i class='icon icon-plus'></i> " . $lang->story->createCommon, '', "class='btn btn-info' data-group='$openApp'");?>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -266,7 +266,7 @@ class productplan extends control
|
||||
$sort = $this->loadModel('common')->appendOrder($orderBy);
|
||||
|
||||
$this->commonAction($plan->product, $plan->branch);
|
||||
$products = $this->product->getProductPairsByProject($this->session->project);
|
||||
$products = $this->product->getProductPairsByProject($this->session->PRJ);
|
||||
|
||||
$bugPager = new pager(0, $recPerPage, $type == 'bug' ? $pageID : 1);
|
||||
$storyPager = new pager(0, $recPerPage, $type == 'story' ? $pageID : 1);
|
||||
@@ -368,7 +368,7 @@ class productplan extends control
|
||||
$this->loadModel('tree');
|
||||
$plan = $this->productplan->getByID($planID);
|
||||
$this->commonAction($plan->product, $plan->branch);
|
||||
$products = $this->product->getProductPairsByProject($this->session->project);
|
||||
$products = $this->product->getProductPairsByProject($this->session->PRJ);
|
||||
|
||||
/* Load pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
|
||||
@@ -372,7 +372,7 @@ class project extends control
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
|
||||
$locateLink = $this->session->projectBrowse ? $this->session->projectBrowse : inLink('view', "projectID=$projectID");
|
||||
$locateLink = $this->session->PRJBrowse ? $this->session->PRJBrowse : inLink('view', "projectID=$projectID");
|
||||
if($from == 'program') $locateLink = $this->createLink('program', 'browse');
|
||||
if($from == 'programProject') $locateLink = $this->session->programProject ? $this->session->programProject : $this->createLink('program', 'project', "projectID=$projectID");
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locateLink));
|
||||
@@ -456,10 +456,10 @@ class project extends control
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
}
|
||||
die(js::locate($this->session->projectList, 'parent'));
|
||||
die(js::locate($this->session->PRJList, 'parent'));
|
||||
}
|
||||
|
||||
$projectIdList = $this->post->projectIdList ? $this->post->projectIdList : die(js::locate($this->session->projectList, 'parent'));
|
||||
$projectIdList = $this->post->projectIdList ? $this->post->projectIdList : die(js::locate($this->session->PRJList, 'parent'));
|
||||
$projects = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->in($projectIdList)->fetchAll('id');
|
||||
|
||||
foreach($projects as $project) $appendPMUsers[$project->PM] = $project->PM;
|
||||
@@ -1130,7 +1130,7 @@ class project extends control
|
||||
$diffProducts = array_merge(array_diff($oldProducts, $newProducts), array_diff($newProducts, $oldProducts));
|
||||
if($diffProducts) $this->loadModel('action')->create('project', $projectID, 'Managed', '', !empty($_POST['products']) ? join(',', $_POST['products']) : '');
|
||||
|
||||
$locateLink = $this->session->projectBrowse ? $this->session->projectBrowse : inLink('manageProducts', "projectID=$projectID");
|
||||
$locateLink = $this->session->PRJBrowse ? $this->session->PRJBrowse : inLink('manageProducts', "projectID=$projectID");
|
||||
if($from == 'program') $locateLink = $this->createLink('program', 'browse');
|
||||
if($from == 'programproject') $locateLink = $this->session->programProject ? $this->session->programProject : inLink('programProject', "projectID=$projectID");
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locateLink));
|
||||
|
||||
@@ -28,6 +28,7 @@ $lang->project->addProduct = '新建产品';
|
||||
$lang->project->manageGroupMember = '维护分组用户';
|
||||
$lang->project->moduleSetting = '列表设置';
|
||||
$lang->project->moduleOpen = '显示项目集名';
|
||||
$lang->project->dynamic = '动态';
|
||||
$lang->project->updateOrder = '排序';
|
||||
$lang->project->sort = '项目排序';
|
||||
$lang->project->whitelist = '项目白名单';
|
||||
|
||||
@@ -121,14 +121,14 @@ class projectModel extends model
|
||||
{
|
||||
if($projectID > 0) $this->session->set('project', (int)$projectID);
|
||||
if($projectID == 0 and $this->cookie->lastProject) $this->session->set('project', (int)$this->cookie->lastProject);
|
||||
if($projectID == 0 and $this->session->project == '') $this->session->set('project', key($projects));
|
||||
if(!isset($projects[$this->session->project]))
|
||||
if($projectID == 0 and $this->session->PRJ == '') $this->session->set('project', key($projects));
|
||||
if(!isset($projects[$this->session->PRJ]))
|
||||
{
|
||||
$this->session->set('project', key($projects));
|
||||
if($projectID && strpos(",{$this->app->user->view->projects},", ",{$this->session->project},") === false) $this->accessDenied();
|
||||
if($projectID && strpos(",{$this->app->user->view->projects},", ",{$this->session->PRJ},") === false) $this->accessDenied();
|
||||
}
|
||||
|
||||
return $this->session->project;
|
||||
return $this->session->PRJ;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1557,7 +1557,7 @@ class projectModel extends model
|
||||
}
|
||||
|
||||
/* In the case of the waterfall model, calculate the sub-stage. */
|
||||
$project = $this->getByID($this->session->project);
|
||||
$project = $this->getByID($this->session->PRJ);
|
||||
if($project and $project->model == 'waterfall')
|
||||
{
|
||||
foreach($parents as $id => $execution)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<td><?php echo html::textarea('comment', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='text-center form-actions' colspan='2'><?php echo html::submitButton() . html::linkButton($lang->goback, $this->session->projectList, 'self', '', 'btn btn-wide'); ?></td>
|
||||
<td class='text-center form-actions' colspan='2'><?php echo html::submitButton() . html::linkButton($lang->goback, $this->session->PRJList, 'self', '', 'btn btn-wide'); ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -27,7 +27,7 @@ class projectrelease extends control
|
||||
$products = array();
|
||||
$this->loadModel('product');
|
||||
$this->loadModel('release');
|
||||
$this->view->products = $this->products = $this->product->getProductPairsByProject($this->session->project);
|
||||
$this->view->products = $this->products = $this->product->getProductPairsByProject($this->session->PRJ);
|
||||
if(empty($this->view->products)) $this->locate($this->createLink('product', 'create'));
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ class projectrelease extends control
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
|
||||
|
||||
/* Get product and product list by project. */
|
||||
$products = $this->product->getProductPairsByProject($this->session->project);
|
||||
$products = $this->product->getProductPairsByProject($this->session->PRJ);
|
||||
if(!$productID) $productID = key($products);
|
||||
$product = $this->product->getById($productID);
|
||||
|
||||
@@ -53,7 +53,7 @@ class projectrelease extends control
|
||||
$this->view->product = $product;
|
||||
$this->view->branches = (isset($product->type) and $product->type == 'normal') ? array() : $this->loadModel('branch')->getPairs($productID);
|
||||
$this->view->branch = $branch;
|
||||
$this->view->project = $this->loadModel('project')->getByID($this->session->project);
|
||||
$this->view->project = $this->loadModel('project')->getByID($this->session->PRJ);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -66,13 +66,13 @@ class projectrelease extends control
|
||||
public function browse($type = 'all')
|
||||
{
|
||||
$this->session->set('releaseList', $this->app->getURI(true));
|
||||
$execution = $this->loadModel('execution')->getById($this->session->project);
|
||||
$execution = $this->loadModel('execution')->getById($this->session->PRJ);
|
||||
|
||||
$this->view->title = $execution->name . $this->lang->colon . $this->lang->release->browse;
|
||||
$this->view->position[] = $this->lang->release->browse;
|
||||
$this->view->execution = $execution;
|
||||
$this->view->products = $this->loadModel('product')->getProducts($this->session->project);
|
||||
$this->view->releases = $this->projectrelease->getList($this->session->project, $type);
|
||||
$this->view->products = $this->loadModel('product')->getProducts($this->session->PRJ);
|
||||
$this->view->releases = $this->projectrelease->getList($this->session->PRJ, $type);
|
||||
$this->view->type = $type;
|
||||
$this->display();
|
||||
}
|
||||
@@ -99,10 +99,10 @@ class projectrelease extends control
|
||||
}
|
||||
|
||||
/* Get the builds that can select. */
|
||||
$productPairs = $this->loadModel('product')->getProductPairsByProject($this->session->project);
|
||||
$productPairs = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
|
||||
$productIdList = array_keys($productPairs);
|
||||
$builds = $this->loadModel('build')->getProductBuildPairs($productIdList, 0, 0, 'notrunk');
|
||||
$releaseBuilds = $this->projectrelease->getReleaseBuilds($this->session->project);
|
||||
$releaseBuilds = $this->projectrelease->getReleaseBuilds($this->session->PRJ);
|
||||
foreach($releaseBuilds as $build) unset($builds[$build]);
|
||||
unset($builds['trunk']);
|
||||
|
||||
@@ -110,7 +110,7 @@ class projectrelease extends control
|
||||
$this->view->title = $this->view->project->name . $this->lang->colon . $this->lang->release->create;
|
||||
$this->view->position[] = $this->lang->release->create;
|
||||
$this->view->builds = $builds;
|
||||
$this->view->lastRelease = $this->projectrelease->getLast($this->session->project);
|
||||
$this->view->lastRelease = $this->projectrelease->getLast($this->session->PRJ);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ class projectrelease extends control
|
||||
$this->view->position[] = $this->lang->release->edit;
|
||||
$this->view->release = $release;
|
||||
$this->view->build = $build;
|
||||
$this->view->builds = $this->loadModel('build')->getProjectBuildPairs($this->session->project, $release->product, $release->branch, 'notrunk|withbranch');
|
||||
$this->view->builds = $this->loadModel('build')->getProjectBuildPairs($this->session->PRJ, $release->product, $release->branch, 'notrunk|withbranch');
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -547,7 +547,7 @@ class projectrelease extends control
|
||||
$this->config->bug->search['style'] = 'simple';
|
||||
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getForProducts(array($release->product => $release->product));
|
||||
$this->config->bug->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($release->product, $viewType = 'bug', $startModuleID = 0);
|
||||
$this->config->bug->search['params']['execution']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($release->product, 0, 'id_desc', $this->session->project);
|
||||
$this->config->bug->search['params']['execution']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($release->product, 0, 'id_desc', $this->session->PRJ);
|
||||
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($release->product, $branch = 0, $params = '');
|
||||
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->config->bug->search['params']['openedBuild']['values'];
|
||||
if($this->session->currentProductType == 'normal')
|
||||
|
||||
@@ -122,7 +122,7 @@ class projectreleaseModel extends model
|
||||
}
|
||||
|
||||
$release = fixer::input('post')
|
||||
->add('project', $this->session->project)
|
||||
->add('project', $this->session->PRJ)
|
||||
->add('product', (int)$productID)
|
||||
->add('branch', (int)$branch)
|
||||
->setDefault('stories', '')
|
||||
@@ -151,7 +151,7 @@ class projectreleaseModel extends model
|
||||
else
|
||||
{
|
||||
$build = new stdclass();
|
||||
$build->project = $this->session->project;
|
||||
$build->project = $this->session->PRJ;
|
||||
$build->product = (int)$productID;
|
||||
$build->branch = (int)$branch;
|
||||
$build->name = $release->name;
|
||||
|
||||
@@ -23,7 +23,7 @@ class projectStory extends control
|
||||
public function __construct($moduleName = '', $methodName = '')
|
||||
{
|
||||
parent::__construct($moduleName, $methodName);
|
||||
$this->products = $this->loadModel('product')->getProductPairsByProject($this->session->project);
|
||||
$this->products = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
|
||||
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=projectstory")));
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ class projectStory extends control
|
||||
public function view($storyID)
|
||||
{
|
||||
$story = $this->loadModel('story')->getByID($storyID);
|
||||
echo $this->fetch('story', 'view', "storyID=$storyID&version=$story->version¶m=" . $this->session->project);
|
||||
echo $this->fetch('story', 'view', "storyID=$storyID&version=$story->version¶m=" . $this->session->PRJ);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -266,8 +266,8 @@ class searchModel extends model
|
||||
$users = $this->loadModel('user')->getPairs('realname|noclosed', $appendUsers, $this->config->maxCount);
|
||||
$users['$@me'] = $this->lang->search->me;
|
||||
}
|
||||
if($hasProduct) $products = array('' => '') + $this->loadModel('product')->getPairs('', $this->session->project);
|
||||
if($hasExecution) $executions = array('' => '') + $this->loadModel('execution')->getPairs($this->session->project);
|
||||
if($hasProduct) $products = array('' => '') + $this->loadModel('product')->getPairs('', $this->session->PRJ);
|
||||
if($hasExecution) $executions = array('' => '') + $this->loadModel('execution')->getPairs($this->session->PRJ);
|
||||
|
||||
foreach($fields as $fieldName)
|
||||
{
|
||||
|
||||
@@ -78,7 +78,7 @@ class stakeholder extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->view->members = $this->loadModel('execution')->getTeamMemberPairs($this->session->project);
|
||||
$this->view->members = $this->loadModel('execution')->getTeamMemberPairs($this->session->PRJ);
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->stakeholder->create;
|
||||
@@ -110,11 +110,11 @@ class stakeholder extends control
|
||||
$this->view->title = $this->lang->stakeholder->batchCreate;
|
||||
$this->view->position[] = $this->lang->stakeholder->batchCreate;
|
||||
|
||||
$this->view->project = $this->loadModel('project')->getByID($this->session->project);
|
||||
$this->view->project = $this->loadModel('project')->getByID($this->session->PRJ);
|
||||
$this->view->users = $this->user->getPairs('all|nodeleted|noclosed');
|
||||
$this->view->deptUsers = $deptUsers;
|
||||
$this->view->dept = $dept;
|
||||
$this->view->projectID = $this->session->project;
|
||||
$this->view->projectID = $this->session->PRJ;
|
||||
$this->view->depts = array('' => '') + $this->dept->getOptionMenu();
|
||||
$this->view->stakeholders = $this->stakeholder->getStakeholders('all', 'id_desc');
|
||||
$this->view->parentStakeholders = $this->program->getStakeholders($parentID, 't1.id_desc');
|
||||
@@ -153,10 +153,10 @@ class stakeholder extends control
|
||||
}
|
||||
|
||||
$users = array('' => '');
|
||||
if($stakeholder->type == 'team') $users = $this->loadModel('execution')->getTeamMemberPairs($this->session->project);
|
||||
if($stakeholder->type == 'team') $users = $this->loadModel('execution')->getTeamMemberPairs($this->session->PRJ);
|
||||
elseif($stakeholder->type == 'company')
|
||||
{
|
||||
$members = $this->loadModel('execution')->getTeamMemberPairs($this->session->project);
|
||||
$members = $this->loadModel('execution')->getTeamMemberPairs($this->session->PRJ);
|
||||
$users = $this->loadModel('user')->getPairs('noclosed');
|
||||
$users = array('' => '') + array_diff($users, $members);
|
||||
}
|
||||
@@ -180,7 +180,7 @@ class stakeholder extends control
|
||||
*/
|
||||
public function ajaxGetMembers($user = '', $programID = 0)
|
||||
{
|
||||
$members = $programID == 0 ? $this->loadModel('execution')->getTeamMemberPairs($this->session->project) : $this->loadModel('project')->getTeamMemberPairs($programID);
|
||||
$members = $programID == 0 ? $this->loadModel('execution')->getTeamMemberPairs($this->session->PRJ) : $this->loadModel('project')->getTeamMemberPairs($programID);
|
||||
die(html::select('user', $members, $user, "class='form-control chosen'"));
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ class stakeholder extends control
|
||||
*/
|
||||
public function ajaxGetCompanyUser($user = '', $programID = 0)
|
||||
{
|
||||
$members = $programID == 0 ? $this->loadModel('execution')->getTeamMemberPairs($this->session->project) : $this->loadModel('project')->getTeamMemberPairs($programID);
|
||||
$members = $programID == 0 ? $this->loadModel('execution')->getTeamMemberPairs($this->session->PRJ) : $this->loadModel('project')->getTeamMemberPairs($programID);
|
||||
$users = $this->loadModel('user')->getPairs('noclosed');
|
||||
$companyUsers = array('' => '') + array_diff($users, $members);
|
||||
|
||||
@@ -274,7 +274,7 @@ class stakeholder extends control
|
||||
else
|
||||
{
|
||||
$this->stakeholder->delete(TABLE_STAKEHOLDER, $userID);
|
||||
$this->loadModel('user')->updateUserView($this->session->project, 'project');
|
||||
$this->loadModel('user')->updateUserView($this->session->PRJ, 'project');
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
@@ -293,7 +293,7 @@ class stakeholder extends control
|
||||
$this->view->position[] = $this->lang->stakeholder->view;
|
||||
|
||||
$this->view->user = $this->stakeholder->getByID($userID);
|
||||
$this->view->users = $this->loadModel('execution')->getTeamMemberPairs($this->session->project,'nodeleted');
|
||||
$this->view->users = $this->loadModel('execution')->getTeamMemberPairs($this->session->PRJ,'nodeleted');
|
||||
$this->view->expects = $this->stakeholder->getExpectByUser($userID);
|
||||
|
||||
$this->display();
|
||||
@@ -356,7 +356,7 @@ class stakeholder extends control
|
||||
$this->view->title = $this->lang->stakeholder->common . $this->lang->colon . $this->lang->stakeholder->communicate;
|
||||
$this->view->position[] = $this->lang->stakeholder->view;
|
||||
$this->view->user = $this->stakeholder->getByID($userID);
|
||||
$this->view->users = $this->loadModel('execution')->getTeamMemberPairs($this->session->project,'nodeleted');
|
||||
$this->view->users = $this->loadModel('execution')->getTeamMemberPairs($this->session->PRJ,'nodeleted');
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ class stakeholderModel extends model
|
||||
$data = fixer::input('post')
|
||||
->setIF($programID == 0, 'objectType', 'project')
|
||||
->setIF($programID != 0, 'objectType', 'program')
|
||||
->setIF($programID == 0, 'objectID', $this->session->project)
|
||||
->setIF($programID == 0, 'objectID', $this->session->PRJ)
|
||||
->setIF($programID != 0, 'objectID', $programID)
|
||||
->setDefault('createdBy', $this->app->user->account)
|
||||
->setDefault('createdDate', helper::today())
|
||||
@@ -113,17 +113,17 @@ class stakeholderModel extends model
|
||||
$this->loadModel('action');
|
||||
$data = (array)fixer::input('post')->get();
|
||||
|
||||
$members = $this->loadModel('execution')->getTeamMemberPairs($this->session->project);
|
||||
$members = $this->loadModel('execution')->getTeamMemberPairs($this->session->PRJ);
|
||||
$accounts = array_unique($data['accounts']);
|
||||
$oldJoin = $this->dao->select('`user`, createdDate')->from(TABLE_STAKEHOLDER)->where('objectID')->eq((int)$this->session->project)->andWhere('objectType')->eq('project')->fetchPairs();
|
||||
$this->dao->delete()->from(TABLE_STAKEHOLDER)->where('objectID')->eq((int)$this->session->project)->andWhere('objectType')->eq('project')->exec();
|
||||
$oldJoin = $this->dao->select('`user`, createdDate')->from(TABLE_STAKEHOLDER)->where('objectID')->eq((int)$this->session->PRJ)->andWhere('objectType')->eq('project')->fetchPairs();
|
||||
$this->dao->delete()->from(TABLE_STAKEHOLDER)->where('objectID')->eq((int)$this->session->PRJ)->andWhere('objectType')->eq('project')->exec();
|
||||
|
||||
foreach($accounts as $key => $account)
|
||||
{
|
||||
if(empty($account)) continue;
|
||||
|
||||
$stakeholder = new stdclass();
|
||||
$stakeholder->objectID = $this->session->project;
|
||||
$stakeholder->objectID = $this->session->PRJ;
|
||||
$stakeholder->objectType = 'project';
|
||||
$stakeholder->user = $account;
|
||||
$stakeholder->type = in_array($account, array_keys($members)) ? 'inside' : 'outside';
|
||||
@@ -142,7 +142,7 @@ class stakeholderModel extends model
|
||||
$changedAccounts = array_merge($changedAccounts, array_diff($oldAccounts, $accounts));
|
||||
$changedAccounts = array_unique($changedAccounts);
|
||||
|
||||
$this->loadModel('user')->updateUserView($this->session->project, 'project', $changedAccounts);
|
||||
$this->loadModel('user')->updateUserView($this->session->PRJ, 'project', $changedAccounts);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -206,7 +206,7 @@ class stakeholderModel extends model
|
||||
->leftJoin(TABLE_COMPANY)->alias('t3')->on('t2.company=t3.id')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t4')->on('t1.objectID=t4.id')
|
||||
->where('t1.deleted')->eq('0')
|
||||
->andWhere('t1.objectID')->eq($this->session->project)
|
||||
->andWhere('t1.objectID')->eq($this->session->PRJ)
|
||||
->beginIF($browseType == 'inside')->andWhere('t1.type')->eq('inside')->fi()
|
||||
->beginIF($browseType == 'outside')->andWhere('t1.type')->eq('outside')->fi()
|
||||
->beginIF($browseType == 'key')->andWhere('t1.key')->ne('0')->fi()
|
||||
@@ -230,7 +230,7 @@ class stakeholderModel extends model
|
||||
{
|
||||
$stakeholders = $this->dao->select('id, user')->from(TABLE_STAKEHOLDER)
|
||||
->where('deleted')->eq('0')
|
||||
->andWhere('objectID')->eq($this->session->project)
|
||||
->andWhere('objectID')->eq($this->session->PRJ)
|
||||
->orderBy('id_desc')
|
||||
->fetchPairs();
|
||||
|
||||
@@ -309,7 +309,7 @@ class stakeholderModel extends model
|
||||
$stakeholders = $this->dao->select('t2.realname as name, t2.account, t1.type, t2.role')->from(TABLE_STAKEHOLDER)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.user=t2.account')
|
||||
->where('t1.deleted')->eq('0')
|
||||
->andWhere('t1.objectID')->eq($this->session->project)
|
||||
->andWhere('t1.objectID')->eq($this->session->PRJ)
|
||||
->fetchGroup('type');
|
||||
|
||||
return $stakeholders;
|
||||
@@ -329,7 +329,7 @@ class stakeholderModel extends model
|
||||
->leftJoin(TABLE_COMPANY)->alias('t3')->on('t2.company=t3.id')
|
||||
->where('t1.id')->eq($userID)
|
||||
->andWhere('t1.deleted')->eq('0')
|
||||
->andWhere('t1.objectID')->eq($this->session->project)
|
||||
->andWhere('t1.objectID')->eq($this->session->PRJ)
|
||||
->fetch();
|
||||
|
||||
return $stakeholder;
|
||||
@@ -344,7 +344,7 @@ class stakeholderModel extends model
|
||||
public function getProcessGroup()
|
||||
{
|
||||
$group = $this->dao->select('process, activity')->from(TABLE_PROGRAMACTIVITY)
|
||||
->where('project')->eq($this->session->project)
|
||||
->where('project')->eq($this->session->PRJ)
|
||||
->andWhere('result')->eq('yes')
|
||||
->fetchGroup('process');
|
||||
|
||||
@@ -374,7 +374,7 @@ class stakeholderModel extends model
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_INTERVENTION)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('project')->eq($this->session->project)
|
||||
->andWhere('project')->eq($this->session->PRJ)
|
||||
->fetchAll('activity');
|
||||
}
|
||||
|
||||
@@ -389,7 +389,7 @@ class stakeholderModel extends model
|
||||
$stakeholders = $this->getStakeHolderPairs();
|
||||
return $this->dao->select('*')->from(TABLE_ISSUE)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('project')->eq($this->session->project)
|
||||
->andWhere('project')->eq($this->session->PRJ)
|
||||
->andWhere('owner')->in(array_values($stakeholders))
|
||||
->orWhere('activity')->ne('')
|
||||
->orderBy('id_desc')
|
||||
@@ -440,7 +440,7 @@ class stakeholderModel extends model
|
||||
->add('userID', $userID)
|
||||
->add('createdBy', $this->app->user->account)
|
||||
->add('createdDate', date('Y-m-d'))
|
||||
->add('project', $this->session->project)
|
||||
->add('project', $this->session->PRJ)
|
||||
->stripTags($this->config->stakeholder->editor->expect['id'], $this->config->allowedTags)
|
||||
->get();
|
||||
|
||||
@@ -492,7 +492,7 @@ class stakeholderModel extends model
|
||||
$expects = $this->dao->select('t1.*,t2.key,t3.realname')->from(TABLE_EXPECT)->alias('t1')
|
||||
->leftJoin(TABLE_STAKEHOLDER)->alias('t2')->on('t1.userID=t2.id')
|
||||
->leftJoin(TABLE_USER)->alias('t3')->on('t2.user=t3.account')
|
||||
->where('t1.project')->eq($this->session->project)
|
||||
->where('t1.project')->eq($this->session->PRJ)
|
||||
->beginIF($browseType == 'bysearch')
|
||||
->andWhere($stakeholderQuery)
|
||||
->fi()
|
||||
@@ -565,7 +565,7 @@ class stakeholderModel extends model
|
||||
$users = $this->dao->select("t1.id, CONCAT_WS('/', t3.name,t2.realname) as realname")->from(TABLE_STAKEHOLDER)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.user=t2.account')
|
||||
->leftJoin(TABLE_COMPANY)->alias('t3')->on('t2.company=t3.id')
|
||||
->where('t1.objectID')->eq($this->session->project)
|
||||
->where('t1.objectID')->eq($this->session->PRJ)
|
||||
->andWhere('t1.deleted')->eq('0')
|
||||
->fetchPairs('id', 'realname');
|
||||
|
||||
@@ -583,7 +583,7 @@ class stakeholderModel extends model
|
||||
$users = $this->dao->select("t1.user, CONCAT_WS('/', t3.name,t2.realname) as realname")->from(TABLE_STAKEHOLDER)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.user=t2.account')
|
||||
->leftJoin(TABLE_COMPANY)->alias('t3')->on('t2.company=t3.id')
|
||||
->where('t1.objectID')->eq($this->session->project)
|
||||
->where('t1.objectID')->eq($this->session->PRJ)
|
||||
->andWhere('t1.deleted')->eq('0')
|
||||
->fetchPairs('user', 'realname');
|
||||
|
||||
@@ -644,7 +644,7 @@ class stakeholderModel extends model
|
||||
public function getStakeholderIssue($account)
|
||||
{
|
||||
$issueList = $this->dao->select('*')->from(TABLE_ISSUE)
|
||||
->where('project')->eq($this->session->project)
|
||||
->where('project')->eq($this->session->PRJ)
|
||||
->andWhere('owner')->eq($account)
|
||||
->andWhere('deleted')->eq('0')
|
||||
->orderBy('id_desc')
|
||||
|
||||
+10
-10
@@ -139,8 +139,8 @@ class story extends control
|
||||
|
||||
if($executionID != 0)
|
||||
{
|
||||
if($executionID != $this->session->project) $this->loadModel('action')->create('story', $storyID, 'linked2project', '', $executionID);
|
||||
$this->loadModel('action')->create('story', $storyID, 'linked2prj', '', $this->session->project);
|
||||
if($executionID != $this->session->PRJ) $this->loadModel('action')->create('story', $storyID, 'linked2project', '', $executionID);
|
||||
$this->loadModel('action')->create('story', $storyID, 'linked2prj', '', $this->session->PRJ);
|
||||
}
|
||||
|
||||
if($todoID > 0)
|
||||
@@ -387,7 +387,7 @@ class story extends control
|
||||
$products = array();
|
||||
foreach($mails as $story) $products[$story->storyID] = $productID;
|
||||
$this->execution->linkStory($executionID, $stories, $products);
|
||||
if($executionID != $this->session->project) $this->execution->linkStory($this->session->project, $stories, $products);
|
||||
if($executionID != $this->session->PRJ) $this->execution->linkStory($this->session->PRJ, $stories, $products);
|
||||
}
|
||||
|
||||
/* If storyID not equal zero, subdivide this story to child stories and close it. */
|
||||
@@ -658,7 +658,7 @@ class story extends control
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
$this->lang->story->menu = $this->lang->execution->menu;
|
||||
|
||||
$this->execution->setMenu($this->execution->getPairs($this->session->project, 'all', 'nodeleted'), $executionID);
|
||||
$this->execution->setMenu($this->execution->getPairs($this->session->PRJ, 'all', 'nodeleted'), $executionID);
|
||||
$this->lang->set('menugroup.story', 'execution');
|
||||
$this->lang->story->menuOrder = $this->lang->execution->menuOrder;
|
||||
|
||||
@@ -854,9 +854,9 @@ class story extends control
|
||||
$from = $this->app->openApp;
|
||||
if($from == 'project')
|
||||
{
|
||||
$project = $this->dao->findById((int)$this->session->project)->from(TABLE_PROJECT)->fetch();
|
||||
$project = $this->dao->findById((int)$this->session->PRJ)->from(TABLE_PROJECT)->fetch();
|
||||
$this->lang->product->menu = $this->lang->menu->{$project->model};
|
||||
$this->execution->setMenu($this->execution->getPairs($this->session->project, 'all', 'nodeleted'), $project->id);
|
||||
$this->execution->setMenu($this->execution->getPairs($this->session->PRJ, 'all', 'nodeleted'), $project->id);
|
||||
|
||||
/* If status is done, can not create task from story. */
|
||||
$execution = $this->execution->getById($param);
|
||||
@@ -871,7 +871,7 @@ class story extends control
|
||||
|
||||
if($this->app->rawModule == 'projectstory')
|
||||
{
|
||||
$project = $this->dao->findById((int)$this->session->project)->from(TABLE_PROJECT)->fetch();
|
||||
$project = $this->dao->findById((int)$this->session->PRJ)->from(TABLE_PROJECT)->fetch();
|
||||
$this->lang->product->menu = $this->lang->menu->{$project->model};
|
||||
}
|
||||
}
|
||||
@@ -1158,7 +1158,7 @@ class story extends control
|
||||
{
|
||||
$this->lang->story->menu = $this->lang->execution->menu;
|
||||
$this->lang->story->menuOrder = $this->lang->execution->menuOrder;
|
||||
$this->execution->setMenu($this->execution->getPairs($this->session->project, 'all', 'nodeleted'), $executionID);
|
||||
$this->execution->setMenu($this->execution->getPairs($this->session->PRJ, 'all', 'nodeleted'), $executionID);
|
||||
$this->lang->set('menugroup.story', 'execution');
|
||||
$execution = $this->execution->getByID($executionID);
|
||||
$this->view->position[] = html::a($this->createLink('execution', 'story', "executionID=$execution->id"), $execution->name);
|
||||
@@ -1230,7 +1230,7 @@ class story extends control
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = $this->lang->story->successToTask;
|
||||
|
||||
$this->story->batchToTask($executionID, $this->session->project);
|
||||
$this->story->batchToTask($executionID, $this->session->PRJ);
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
@@ -1413,7 +1413,7 @@ class story extends control
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
$tracks = $this->story->getTracks($productID, $branch, $pager);
|
||||
|
||||
if($this->app->rawModule == 'projectstory') $projectProducts = $this->product->getProducts($this->session->project);
|
||||
if($this->app->rawModule == 'projectstory') $projectProducts = $this->product->getProducts($this->session->PRJ);
|
||||
|
||||
$this->view->title = $this->lang->story->track;
|
||||
$this->view->position[] = $this->lang->story->track;
|
||||
|
||||
@@ -247,7 +247,7 @@ class storyModel extends model
|
||||
if($executionID != 0 and $story->status != 'draft')
|
||||
{
|
||||
$this->linkStory($executionID, $this->post->product, $storyID);
|
||||
if($executionID != $this->session->project) $this->linkStory($this->session->project, $this->post->product, $storyID);
|
||||
if($executionID != $this->session->PRJ) $this->linkStory($this->session->PRJ, $this->post->product, $storyID);
|
||||
}
|
||||
|
||||
if(is_array($this->post->URS))
|
||||
@@ -2313,7 +2313,7 @@ class storyModel extends model
|
||||
$type = strtolower($type);
|
||||
if($type == 'bysearch')
|
||||
{
|
||||
if($this->app->rawModule == 'projectstory') $this->session->projectStoryQuery = $this->session->storyQuery;
|
||||
if($this->app->rawModule == 'projectstory') $this->session->PRJStoryQuery = $this->session->storyQuery;
|
||||
$queryID = (int)$param;
|
||||
$products = $this->loadModel('execution')->getProducts($executionID);
|
||||
|
||||
@@ -3488,7 +3488,7 @@ class storyModel extends model
|
||||
common::printIcon('story', 'edit', $vars . "&from=$story->from", $story, 'list', '', '', '', false, "data-group=$story->from");
|
||||
common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$vars", $story, 'list', 'sitemap');
|
||||
common::printIcon('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&storyID=$story->id", $story, 'list', 'split', '', '', '', '', $this->lang->story->subdivide);
|
||||
if($this->app->rawModule == 'projectstory') common::printIcon('projectstory', 'unlinkStory', "projectID={$this->session->project}&storyID=$story->id", '', 'list', 'unlink', 'hiddenwin');
|
||||
if($this->app->rawModule == 'projectstory') common::printIcon('projectstory', 'unlinkStory', "projectID={$this->session->PRJ}&storyID=$story->id", '', 'list', 'unlink', 'hiddenwin');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
$openApp = 'product';
|
||||
if($this->app->rawModule == 'projectstory')
|
||||
{
|
||||
$otherParam = "storyID=&projectID={$this->session->project}";
|
||||
$otherParam = "storyID=&projectID={$this->session->PRJ}";
|
||||
$openGroup = 'project';
|
||||
}
|
||||
?>
|
||||
|
||||
+10
-10
@@ -39,7 +39,7 @@ class task extends control
|
||||
*/
|
||||
public function create($executionID = 0, $storyID = 0, $moduleID = 0, $taskID = 0, $todoID = 0)
|
||||
{
|
||||
$executions = $this->execution->getPairs($this->session->project);
|
||||
$executions = $this->execution->getPairs($this->session->PRJ);
|
||||
$executionID = $this->execution->saveState($executionID, $executions);
|
||||
|
||||
$this->execution->getLimitedExecution();
|
||||
@@ -206,7 +206,7 @@ class task extends control
|
||||
$this->view->title = $title;
|
||||
$this->view->position = $position;
|
||||
$this->view->execution = $execution;
|
||||
$this->view->executions = $this->config->systemMode == 'classic' ? $executions : $this->execution->getByProject($this->session->project, 'all', 0, true);
|
||||
$this->view->executions = $this->config->systemMode == 'classic' ? $executions : $this->execution->getByProject($this->session->PRJ, 'all', 0, true);
|
||||
$this->view->task = $task;
|
||||
$this->view->users = $users;
|
||||
$this->view->stories = $stories;
|
||||
@@ -239,7 +239,7 @@ class task extends control
|
||||
|
||||
if($this->config->systemMode == 'new')
|
||||
{
|
||||
$project = $this->project->getByID($this->session->project);
|
||||
$project = $this->project->getByID($this->session->PRJ);
|
||||
if($project->model == 'waterfall') $this->config->task->create->requiredFields .= ',estStarted,deadline';
|
||||
}
|
||||
|
||||
@@ -248,7 +248,7 @@ class task extends control
|
||||
$storyLink = $this->session->storyList ? $this->session->storyList : $this->createLink('execution', 'story', "executionID=$executionID");
|
||||
|
||||
/* Set menu. */
|
||||
$this->execution->setMenu($this->execution->getPairs($this->session->project), $execution->id);
|
||||
$this->execution->setMenu($this->execution->getPairs($this->session->PRJ), $execution->id);
|
||||
|
||||
/* When common task are child tasks, query whether common task are consumed. */
|
||||
$taskConsumed = 0;
|
||||
@@ -317,7 +317,7 @@ class task extends control
|
||||
$this->view->actions = $this->loadModel('action')->getList('task', $taskID);
|
||||
|
||||
/* Set menu. */
|
||||
$this->execution->setMenu($this->execution->getPairs($this->session->project), $this->view->execution->id);
|
||||
$this->execution->setMenu($this->execution->getPairs($this->session->PRJ), $this->view->execution->id);
|
||||
$this->view->position[] = html::a($this->createLink('execution', 'browse', "execution={$this->view->task->execution}"), $this->view->execution->name);
|
||||
}
|
||||
|
||||
@@ -392,7 +392,7 @@ class task extends control
|
||||
$this->view->users = $this->loadModel('user')->getPairs('nodeleted', "{$this->view->task->openedBy},{$this->view->task->canceledBy},{$this->view->task->closedBy}");
|
||||
$this->view->showAllModule = isset($this->config->execution->task->allModule) ? $this->config->execution->task->allModule : '';
|
||||
$this->view->modules = $this->tree->getTaskOptionMenu($this->view->task->execution, 0, 0, $this->view->showAllModule ? 'allModule' : '');
|
||||
$this->view->executions = $this->config->systemMode == 'classic' ? $this->execution->getPairs() : $this->execution->getByProject($this->session->project, 'all', 0, true);
|
||||
$this->view->executions = $this->config->systemMode == 'classic' ? $this->execution->getPairs() : $this->execution->getByProject($this->session->PRJ, 'all', 0, true);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -445,7 +445,7 @@ class task extends control
|
||||
if($executionID)
|
||||
{
|
||||
$execution = $this->execution->getById($executionID);
|
||||
$this->execution->setMenu($this->execution->getPairs($this->session->project), $execution->id);
|
||||
$this->execution->setMenu($this->execution->getPairs($this->session->PRJ), $execution->id);
|
||||
|
||||
/* Set modules and members. */
|
||||
$showAllModule = isset($this->config->task->allModule) ? $this->config->task->allModule : '';
|
||||
@@ -627,7 +627,7 @@ class task extends control
|
||||
{
|
||||
$task = $this->task->getById($taskID, true);
|
||||
if(!$task) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
$this->session->project = $task->project;
|
||||
$this->session->PRJ = $task->project;
|
||||
|
||||
if($task->fromBug != 0)
|
||||
{
|
||||
@@ -655,7 +655,7 @@ class task extends control
|
||||
|
||||
/* Set menu. */
|
||||
$execution = $this->execution->getById($task->execution);
|
||||
$this->execution->setMenu($this->execution->getPairs($this->session->project), $execution->id);
|
||||
$this->execution->setMenu($this->execution->getPairs($this->session->PRJ), $execution->id);
|
||||
|
||||
$this->executeHooks($taskID);
|
||||
|
||||
@@ -1323,7 +1323,7 @@ class task extends control
|
||||
}
|
||||
}
|
||||
|
||||
$executions = $this->execution->getPairs($this->session->project);
|
||||
$executions = $this->execution->getPairs($this->session->PRJ);
|
||||
|
||||
$this->execution->setMenu($executions, $executionID);
|
||||
$this->executions = $executions;
|
||||
|
||||
@@ -47,7 +47,7 @@ class taskModel extends model
|
||||
->setDefault('execution', $executionID)
|
||||
->setDefault('estimate,left,story', 0)
|
||||
->setDefault('status', 'wait')
|
||||
->setIF($this->config->systemMode == 'new', 'project', $this->session->project)
|
||||
->setIF($this->config->systemMode == 'new', 'project', $this->session->PRJ)
|
||||
->setIF($this->post->estimate != false, 'left', $this->post->estimate)
|
||||
->setIF($this->post->story != false, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story))
|
||||
->setDefault('estStarted', '0000-00-00')
|
||||
@@ -303,7 +303,7 @@ class taskModel extends model
|
||||
$data[$i]->pri = $tasks->pri[$i];
|
||||
$data[$i]->estimate = $tasks->estimate[$i];
|
||||
$data[$i]->left = $tasks->estimate[$i];
|
||||
$data[$i]->project = $this->config->systemMode == 'new' ? $this->session->project : 0;
|
||||
$data[$i]->project = $this->config->systemMode == 'new' ? $this->session->PRJ : 0;
|
||||
$data[$i]->execution = $executionID;
|
||||
$data[$i]->estStarted = empty($tasks->estStarted[$i]) ? '0000-00-00' : $tasks->estStarted[$i];
|
||||
$data[$i]->deadline = empty($tasks->deadline[$i]) ? '0000-00-00' : $tasks->deadline[$i];
|
||||
@@ -2534,7 +2534,7 @@ class taskModel extends model
|
||||
|
||||
$datas = $this->processData4Report($tasks, '', 'execution');
|
||||
|
||||
$executions = $this->loadModel('execution')->getPairs($this->session->project, 'all', 'all');
|
||||
$executions = $this->loadModel('execution')->getPairs($this->session->PRJ, 'all', 'all');
|
||||
foreach($datas as $executionID => $data)
|
||||
{
|
||||
$data->name = isset($executions[$executionID]) ? $executions[$executionID] : $this->lang->report->undefined;
|
||||
@@ -3260,7 +3260,7 @@ class taskModel extends model
|
||||
public function getExtraRequiredFields()
|
||||
{
|
||||
/* Add required fields to waterfall execution. */
|
||||
$execution = $this->loadModel('project')->getByID($this->session->project);
|
||||
$execution = $this->loadModel('project')->getByID($this->session->PRJ);
|
||||
if(!empty($execution) && $execution->model == 'waterfall')
|
||||
{
|
||||
$this->config->task->create->requiredFields .= ',estStarted,deadline';
|
||||
|
||||
@@ -73,7 +73,7 @@ class testcaseModel extends model
|
||||
->add('fromBug', $bugID)
|
||||
->setDefault('openedBy', $this->app->user->account)
|
||||
->setDefault('openedDate', $now)
|
||||
->setIF($this->config->systemMode == 'new' && $this->lang->navGroup->testcase != 'qa', 'project', $this->session->project)
|
||||
->setIF($this->config->systemMode == 'new' && $this->lang->navGroup->testcase != 'qa', 'project', $this->session->PRJ)
|
||||
->setIF($this->post->story != false, 'storyVersion', $this->loadModel('story')->getVersion((int)$this->post->story))
|
||||
->remove('steps,expects,files,labels,stepType,forceNotReview')
|
||||
->setDefault('story', 0)
|
||||
@@ -165,7 +165,7 @@ class testcaseModel extends model
|
||||
|
||||
$data[$i] = new stdclass();
|
||||
$data[$i]->product = $productID;
|
||||
if($this->config->systemMode == 'new' && $this->lang->navGroup->testcase != 'qa') $data[$i]->project = $this->session->project;
|
||||
if($this->config->systemMode == 'new' && $this->lang->navGroup->testcase != 'qa') $data[$i]->project = $this->session->PRJ;
|
||||
$data[$i]->branch = $cases->branch[$i];
|
||||
$data[$i]->module = $cases->module[$i];
|
||||
$data[$i]->type = $cases->type[$i];
|
||||
@@ -242,7 +242,7 @@ class testcaseModel extends model
|
||||
return $this->dao->select('t1.*, t2.title as storyTitle')->from(TABLE_CASE)->alias('t1')
|
||||
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story=t2.id')
|
||||
->where('t1.product')->eq((int)$productID)
|
||||
->beginIF($this->lang->navGroup->testcase != 'qa')->andWhere('t1.project')->eq($this->session->project)->fi()
|
||||
->beginIF($this->lang->navGroup->testcase != 'qa')->andWhere('t1.project')->eq($this->session->PRJ)->fi()
|
||||
->beginIF($branch)->andWhere('t1.branch')->eq($branch)->fi()
|
||||
->beginIF($moduleIdList)->andWhere('t1.module')->in($moduleIdList)->fi()
|
||||
->beginIF($browseType == 'wait')->andWhere('t1.status')->eq($browseType)->fi()
|
||||
@@ -271,7 +271,7 @@ class testcaseModel extends model
|
||||
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story=t2.id')
|
||||
->leftJoin(TABLE_SUITECASE)->alias('t3')->on('t1.id=t3.case')
|
||||
->where('t1.product')->eq((int)$productID)
|
||||
->beginIF($this->lang->navGroup->testcase != 'qa')->andWhere('t1.project')->eq($this->session->project)->fi()
|
||||
->beginIF($this->lang->navGroup->testcase != 'qa')->andWhere('t1.project')->eq($this->session->PRJ)->fi()
|
||||
->andWhere('t3.suite')->eq((int)$suiteID)
|
||||
->beginIF($branch)->andWhere('t1.branch')->eq($branch)->fi()
|
||||
->beginIF($moduleIdList)->andWhere('t1.module')->in($moduleIdList)->fi()
|
||||
@@ -364,7 +364,7 @@ class testcaseModel extends model
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->andWhere('t2.version > t1.storyVersion')
|
||||
->andWhere('t1.product')->eq($productID)
|
||||
->beginIF($this->lang->navGroup->testcase != 'qa')->andWhere('t1.project')->eq($this->session->project)->fi()
|
||||
->beginIF($this->lang->navGroup->testcase != 'qa')->andWhere('t1.project')->eq($this->session->PRJ)->fi()
|
||||
->beginIF($branch)->andWhere('t1.branch')->eq($branch)->fi()
|
||||
->beginIF($modules)->andWhere('t1.module')->in($modules)->fi()
|
||||
->beginIF($auto != 'unit')->andWhere('t1.auto')->ne('unit')->fi()
|
||||
@@ -1124,7 +1124,7 @@ class testcaseModel extends model
|
||||
}
|
||||
else
|
||||
{
|
||||
if($this->config->systemMode == 'new' && $this->lang->navGroup->testcase != 'qa') $caseData->project = $this->session->project;
|
||||
if($this->config->systemMode == 'new' && $this->lang->navGroup->testcase != 'qa') $caseData->project = $this->session->PRJ;
|
||||
$caseData->version = 1;
|
||||
$caseData->openedBy = $this->app->user->account;
|
||||
$caseData->openedDate = $now;
|
||||
|
||||
@@ -422,7 +422,7 @@ class testreport extends control
|
||||
{
|
||||
$report = $this->testreport->getById($reportID);
|
||||
if(!$report) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
$this->session->project = $report->project;
|
||||
$this->session->PRJ = $report->project;
|
||||
|
||||
$execution = $this->execution->getById($report->execution);
|
||||
if($from == 'product' and is_numeric($report->product))
|
||||
@@ -535,7 +535,7 @@ class testreport extends control
|
||||
{
|
||||
if($objectType == 'product')
|
||||
{
|
||||
$projectID = $this->lang->navGroup->testreport == 'qa' ? 0 : $this->session->project;
|
||||
$projectID = $this->lang->navGroup->testreport == 'qa' ? 0 : $this->session->PRJ;
|
||||
$this->products = $this->product->getProductPairsByProject($projectID);
|
||||
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=testreport")));
|
||||
$productID = $this->product->saveState($objectID, $this->products);
|
||||
@@ -544,7 +544,7 @@ class testreport extends control
|
||||
}
|
||||
elseif($objectType == 'project')
|
||||
{
|
||||
$this->executions = $this->execution->getPairs($this->session->project, 'all', 'nocode');
|
||||
$this->executions = $this->execution->getPairs($this->session->PRJ, 'all', 'nocode');
|
||||
$executionID = $this->execution->saveState($objectID, $this->executions);
|
||||
$this->execution->setMenu($this->executions, $executionID);
|
||||
$this->lang->testreport->menu = $this->lang->execution->menu;
|
||||
|
||||
@@ -23,7 +23,7 @@ class testreportModel extends model
|
||||
public function setMenu($products, $productID, $branch = 0)
|
||||
{
|
||||
$this->loadModel('product')->setMenu($products, $productID, $branch);
|
||||
$selectHtml = $this->product->select($products, $productID, 'testreport', 'browse', $this->session->project, $branch);
|
||||
$selectHtml = $this->product->select($products, $productID, 'testreport', 'browse', $this->session->PRJ, $branch);
|
||||
|
||||
/* Remove branch. */
|
||||
if(strpos($selectHtml, 'currentBranch') !== false) $selectHtml = substr($selectHtml, 0, strrpos($selectHtml, "<div class='btn-group'>")) . '</div>';
|
||||
@@ -57,7 +57,7 @@ class testreportModel extends model
|
||||
{
|
||||
$data = fixer::input('post')
|
||||
->stripTags($this->config->testreport->editor->create['id'], $this->config->allowedTags)
|
||||
->setIF($this->config->systemMode == 'new' and $this->lang->navGroup->testreport != 'qa', 'project', $this->session->project)
|
||||
->setIF($this->config->systemMode == 'new' and $this->lang->navGroup->testreport != 'qa', 'project', $this->session->PRJ)
|
||||
->add('createdBy', $this->app->user->account)
|
||||
->add('createdDate', helper::now())
|
||||
->join('stories', ',')
|
||||
@@ -149,7 +149,7 @@ class testreportModel extends model
|
||||
{
|
||||
$objectID = (int)$objectID;
|
||||
return $this->dao->select('*')->from(TABLE_TESTREPORT)->where('deleted')->eq(0)
|
||||
->beginIF($this->lang->navGroup->testreport != 'qa')->andWhere('project')->eq($this->session->project)->fi()
|
||||
->beginIF($this->lang->navGroup->testreport != 'qa')->andWhere('project')->eq($this->session->PRJ)->fi()
|
||||
->beginIF($objectType == 'project')->andWhere('objectID')->eq($objectID)->andWhere('objectType')->eq('project')->fi()
|
||||
->beginIF($objectType == 'product' and $extra)->andWhere('objectID')->eq((int)$extra)->andWhere('objectType')->eq('testtask')->fi()
|
||||
->beginIF($objectType == 'product' and empty($extra))->andWhere('product')->eq($objectID)->fi()
|
||||
|
||||
@@ -69,7 +69,7 @@ class testsuite extends control
|
||||
$this->session->set('testsuiteList', $this->app->getURI(true));
|
||||
|
||||
/* Set menu. */
|
||||
$projectID = $this->lang->navGroup->testreport == 'qa' ? 0 : $this->session->project;
|
||||
$projectID = $this->lang->navGroup->testreport == 'qa' ? 0 : $this->session->PRJ;
|
||||
$this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($projectID);
|
||||
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=testsuite")));
|
||||
$productID = $this->product->saveState($productID, $this->products);
|
||||
@@ -136,7 +136,7 @@ class testsuite extends control
|
||||
}
|
||||
|
||||
/* Set menu. */
|
||||
$this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->project);
|
||||
$this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
|
||||
$productID = $this->product->saveState($productID, $this->products);
|
||||
$this->testsuite->setMenu($this->products, $productID);
|
||||
|
||||
@@ -169,7 +169,7 @@ class testsuite extends control
|
||||
if($suite->type == 'private' and $suite->addedBy != $this->app->user->account and !$this->app->user->admin) die(js::error($this->lang->error->accessDenied) . js::locate('back'));
|
||||
$productID = $suite->product;
|
||||
|
||||
$this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->project);
|
||||
$this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
|
||||
$this->testsuite->setMenu($this->products, $productID);
|
||||
|
||||
/* Save session. */
|
||||
@@ -239,7 +239,7 @@ class testsuite extends control
|
||||
if($suite->type == 'private' and $suite->addedBy != $this->app->user->account and !$this->app->user->admin) die(js::error($this->lang->error->accessDenied) . js::locate('back'));
|
||||
|
||||
/* Get suite info. */
|
||||
$this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->project);
|
||||
$this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
|
||||
$productID = $this->product->saveState($suite->product, $this->products);
|
||||
|
||||
/* Set menu. */
|
||||
@@ -319,7 +319,7 @@ class testsuite extends control
|
||||
$this->session->set('caseList', $this->app->getURI(true));
|
||||
|
||||
/* Get suite and product id. */
|
||||
$this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->project);
|
||||
$this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
|
||||
$suite = $this->testsuite->getById($suiteID);
|
||||
$productID = $this->product->saveState($suite->product, $this->products);
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ class testsuiteModel extends model
|
||||
{
|
||||
$suite = fixer::input('post')
|
||||
->stripTags($this->config->testsuite->editor->create['id'], $this->config->allowedTags)
|
||||
->setIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa', 'project', $this->session->project)
|
||||
->setIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa', 'project', $this->session->PRJ)
|
||||
->add('product', (int)$productID)
|
||||
->add('addedBy', $this->app->user->account)
|
||||
->add('addedDate', helper::now())
|
||||
@@ -133,7 +133,7 @@ class testsuiteModel extends model
|
||||
{
|
||||
return $this->dao->select("*")->from(TABLE_TESTSUITE)
|
||||
->where('product')->eq((int)$productID)
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('project')->eq($this->session->project)->fi()
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('project')->eq($this->session->PRJ)->fi()
|
||||
->andWhere('deleted')->eq(0)
|
||||
->andWhere("(`type` = 'public' OR (`type` = 'private' and addedBy = '{$this->app->user->account}'))")
|
||||
->orderBy($orderBy)
|
||||
@@ -242,7 +242,7 @@ class testsuiteModel extends model
|
||||
$cases = $this->dao->select('t1.*,t2.version as caseVersion')->from(TABLE_CASE)->alias('t1')
|
||||
->leftJoin(TABLE_SUITECASE)->alias('t2')->on('t1.id=t2.case')
|
||||
->where('t2.suite')->eq($suiteID)
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('t1.project')->eq($this->session->project)->fi()
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('t1.project')->eq($this->session->PRJ)->fi()
|
||||
->andWhere('t1.product')->eq($suite->product)
|
||||
->andWhere('t1.product')->eq($suite->product)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
@@ -286,7 +286,7 @@ class testsuiteModel extends model
|
||||
$linkedCases = $this->getLinkedCases($suite->id, 'id_desc', null, $append = false);
|
||||
$cases = $this->dao->select('*')->from(TABLE_CASE)->where($query)
|
||||
->andWhere('id')->notIN(array_keys($linkedCases))
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('project')->eq($this->session->project)->fi()
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('project')->eq($this->session->PRJ)->fi()
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy('id desc')
|
||||
->page($pager)
|
||||
@@ -323,7 +323,7 @@ class testsuiteModel extends model
|
||||
{
|
||||
$importedCases = $this->dao->select('fromCaseID')->from(TABLE_CASE)
|
||||
->where('product')->eq($productID)
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('project')->eq($this->session->project)->fi()
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('project')->eq($this->session->PRJ)->fi()
|
||||
->andWhere('lib')->eq($libID)
|
||||
->andWhere('fromCaseID')->ne('')
|
||||
->andWhere('deleted')->eq(0)
|
||||
@@ -357,7 +357,7 @@ class testsuiteModel extends model
|
||||
return $this->dao->select('*')->from(TABLE_CASE)->where('deleted')->eq(0)
|
||||
->beginIF($browseType != 'bysearch')->andWhere('lib')->eq($libID)->fi()
|
||||
->beginIF($browseType == 'bysearch')->andWhere($query)->fi()
|
||||
->begin($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('project')->eq($this->session->project)->fi()
|
||||
->begin($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('project')->eq($this->session->PRJ)->fi()
|
||||
->andWhere('product')->eq(0)
|
||||
->andWhere('id')->notIN($importedCases)
|
||||
->orderBy($orderBy)
|
||||
|
||||
@@ -190,7 +190,7 @@ class testtask extends control
|
||||
|
||||
/* Create testtask from testtask of test.*/
|
||||
$productID = $productID ? $productID : key($this->products);
|
||||
$projectID = $this->lang->navGroup->testtask == 'qa' ? 0 : $this->session->project;
|
||||
$projectID = $this->lang->navGroup->testtask == 'qa' ? 0 : $this->session->PRJ;
|
||||
$executions = empty($productID) ? array() : $this->product->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID);
|
||||
$builds = empty($productID) ? array() : $this->loadModel('build')->getProductBuildPairs($productID, 0, 'notrunk', true);
|
||||
|
||||
@@ -226,8 +226,8 @@ class testtask extends control
|
||||
if(!$task) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
/* When the session changes, you need to query the related products again. */
|
||||
if($this->session->project != $task->project) $this->view->products = $this->products = $this->product->getProductPairsByProject($task->project);
|
||||
$this->session->project = $task->project;
|
||||
if($this->session->PRJ != $task->project) $this->view->products = $this->products = $this->product->getProductPairsByProject($task->project);
|
||||
$this->session->PRJ = $task->project;
|
||||
|
||||
$productID = $task->product;
|
||||
$buildID = $task->build;
|
||||
@@ -624,7 +624,7 @@ class testtask extends control
|
||||
|
||||
/* Create testtask from testtask of test.*/
|
||||
$productID = $productID ? $productID : key($this->products);
|
||||
$projectID = $this->lang->navGroup->testtask == 'qa' ? 0 : $this->session->project;
|
||||
$projectID = $this->lang->navGroup->testtask == 'qa' ? 0 : $this->session->PRJ;
|
||||
$executions = empty($productID) ? array() : $this->product->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID);
|
||||
$builds = empty($productID) ? array() : $this->loadModel('build')->getProductBuildPairs($productID, 0, 'notrunk', true);
|
||||
|
||||
@@ -1195,7 +1195,7 @@ class testtask extends control
|
||||
$this->app->loadLang('job');
|
||||
|
||||
$productID = $productID ? $productID : key($this->products);
|
||||
$projectID = $this->lang->navGroup->testtask == 'qa' ? 0 : $this->session->project;
|
||||
$projectID = $this->lang->navGroup->testtask == 'qa' ? 0 : $this->session->PRJ;
|
||||
$executions = empty($productID) ? array() : $this->product->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID);
|
||||
$builds = empty($productID) ? array() : $this->loadModel('build')->getProductBuildPairs($productID, 0, 'notrunk');
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ class testtaskModel extends model
|
||||
|
||||
if($testtask and $this->app->viewType != 'mhtml')
|
||||
{
|
||||
$testtasks = $this->getProductTasks($productID, 0, 'id_desc', null, array('local', 'totalStatus'), 0, 0, $this->session->project);
|
||||
$testtasks = $this->getProductTasks($productID, 0, 'id_desc', null, array('local', 'totalStatus'), 0, 0, $this->session->PRJ);
|
||||
if(!isset($testtasks[$testtask])) $testtasks[$testtask] = $this->getById($testtask);
|
||||
|
||||
$selectHtml .= "<div class='btn-group angle-btn'>";
|
||||
@@ -155,7 +155,7 @@ class testtaskModel extends model
|
||||
{
|
||||
$task = fixer::input('post')
|
||||
->setDefault('build', '')
|
||||
->setIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa', 'project', $this->session->project)
|
||||
->setIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa', 'project', $this->session->PRJ)
|
||||
->stripTags($this->config->testtask->editor->create['id'], $this->config->allowedTags)
|
||||
->join('mailto', ',')
|
||||
->remove('uid,contactListMenu')
|
||||
@@ -203,7 +203,7 @@ class testtaskModel extends model
|
||||
->leftJoin(TABLE_PROJECTPRODUCT)->alias('t5')->on('t1.execution = t5.project and t1.product = t5.product')
|
||||
|
||||
->where('t1.deleted')->eq(0)
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('t1.project')->eq($this->session->project)->fi()
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('t1.project')->eq($this->session->PRJ)->fi()
|
||||
->andWhere('t1.auto')->ne('unit')
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t3.id')->in("0,{$this->app->user->view->sprints}")->fi()
|
||||
->beginIF($scopeAndStatus[0] == 'local')->andWhere('t1.product')->eq((int)$productID)->fi()
|
||||
@@ -239,7 +239,7 @@ class testtaskModel extends model
|
||||
->leftJoin(TABLE_BUILD)->alias('t4')->on('t1.build = t4.id')
|
||||
->where('t1.deleted')->eq(0)
|
||||
->andWhere('t1.product')->eq($productID)
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('t1.project')->eq($this->session->project)->fi()
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('t1.project')->eq($this->session->PRJ)->fi()
|
||||
->andWhere('t1.auto')->eq('unit')
|
||||
->beginIF($browseType != 'all' and $browseType != 'newest' and $beginAndEnd)
|
||||
->andWhere('t1.end')->ge($beginAndEnd['begin'])
|
||||
@@ -455,7 +455,7 @@ class testtaskModel extends model
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_CASE)->where($query)
|
||||
->andWhere('id')->notIN($linkedCases)
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('project')->eq($this->session->project)->fi()
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('project')->eq($this->session->PRJ)->fi()
|
||||
->andWhere('status')->ne('wait')
|
||||
->andWhere('type')->ne('unit')
|
||||
->beginIF($task->branch)->andWhere('branch')->in("0,$task->branch")->fi()
|
||||
@@ -484,7 +484,7 @@ class testtaskModel extends model
|
||||
{
|
||||
$cases = $this->dao->select('*')->from(TABLE_CASE)
|
||||
->where($query)
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('project')->eq($this->session->project)->fi()
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('project')->eq($this->session->PRJ)->fi()
|
||||
->andWhere('product')->eq($productID)
|
||||
->andWhere('status')->ne('wait')
|
||||
->beginIF($linkedCases)->andWhere('id')->notIN($linkedCases)->fi()
|
||||
@@ -517,7 +517,7 @@ class testtaskModel extends model
|
||||
if($bugs)
|
||||
{
|
||||
$cases = $this->dao->select('*')->from(TABLE_CASE)->where($query)
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('project')->eq($this->session->project)->fi()
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('project')->eq($this->session->PRJ)->fi()
|
||||
->andWhere('product')->eq($productID)
|
||||
->andWhere('status')->ne('wait')
|
||||
->beginIF($linkedCases)->andWhere('id')->notIN($linkedCases)->fi()
|
||||
@@ -550,7 +550,7 @@ class testtaskModel extends model
|
||||
return $this->dao->select('t1.*,t2.version as version')->from(TABLE_CASE)->alias('t1')
|
||||
->leftJoin(TABLE_SUITECASE)->alias('t2')->on('t1.id=t2.case')
|
||||
->where($query)
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('t1.project')->eq($this->session->project)->fi()
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('t1.project')->eq($this->session->PRJ)->fi()
|
||||
->andWhere('t2.suite')->eq((int)$suite)
|
||||
->andWhere('t1.product')->eq($productID)
|
||||
->andWhere('status')->ne('wait')
|
||||
@@ -585,7 +585,7 @@ class testtaskModel extends model
|
||||
->where($query)
|
||||
->andWhere('t1.id')->notin($linkedCases)
|
||||
->andWhere('t2.task')->eq($testTask)
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('t1.project')->eq($this->session->project)->fi()
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('t1.project')->eq($this->session->PRJ)->fi()
|
||||
->andWhere('t1.status')->ne('wait')
|
||||
->page($pager)
|
||||
->fetchAll();
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php js::import($jsRoot . 'misc/date.js');?>
|
||||
<?php js::set('projectID', $this->session->project);?>
|
||||
<?php js::set('projectID', $this->session->PRJ);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
|
||||
@@ -400,7 +400,7 @@ class todo extends control
|
||||
}
|
||||
|
||||
$projects = $this->loadModel('project')->getPairs();
|
||||
if(!isset($this->session->project)) $this->session->set('project', key($projects));
|
||||
if(!isset($this->session->PRJ)) $this->session->set('project', key($projects));
|
||||
|
||||
$this->view->title = $this->app->user->account == $todo->account ? "{$this->lang->todo->common} #$todo->id $todo->name" : $this->lang->todo->common ;
|
||||
$this->view->position[] = $this->lang->todo->view;
|
||||
@@ -411,9 +411,9 @@ class todo extends control
|
||||
$this->view->actions = $this->loadModel('action')->getList('todo', $todoID);
|
||||
$this->view->from = $from;
|
||||
$this->view->projects = $projects;
|
||||
$this->view->executions = $this->loadModel('execution')->getPairs($this->session->project);
|
||||
$this->view->executions = $this->loadModel('execution')->getPairs($this->session->PRJ);
|
||||
$this->view->products = $this->loadModel('product')->getPairs();
|
||||
$this->view->projectProducts = $this->loadModel('product')->getProductPairsByProject($this->session->project);
|
||||
$this->view->projectProducts = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ class tree extends control
|
||||
if($from == 'project')
|
||||
{
|
||||
$this->lang->navGroup->tree = 'project';
|
||||
$productPairs = $this->product->getProductPairsByProject($this->session->project);
|
||||
$productPairs = $this->product->getProductPairsByProject($this->session->PRJ);
|
||||
}
|
||||
elseif($from == 'qa')
|
||||
{
|
||||
@@ -141,7 +141,7 @@ class tree extends control
|
||||
if($from == 'project')
|
||||
{
|
||||
$this->lang->navGroup->tree = 'project';
|
||||
$productPairs = $this->product->getProductPairsByProject($this->session->project);
|
||||
$productPairs = $this->product->getProductPairsByProject($this->session->PRJ);
|
||||
}
|
||||
elseif($from == 'qa')
|
||||
{
|
||||
@@ -210,7 +210,7 @@ class tree extends control
|
||||
$this->lang->tree->menuOrder = $this->lang->project->menuOrder;
|
||||
|
||||
/* The project parameter needs to be present when the tree module belongs to the project grouping. */
|
||||
if($this->session->docList && $this->session->project && strpos($this->session->docList, 'project') === false) $this->session->set('docList', $this->session->docList . '?project=' . $this->session->project);
|
||||
if($this->session->docList && $this->session->PRJ && strpos($this->session->docList, 'project') === false) $this->session->set('docList', $this->session->docList . '?project=' . $this->session->PRJ);
|
||||
}
|
||||
|
||||
if($from == 'doc') $this->lang->navGroup->doc = 'doc';
|
||||
@@ -226,7 +226,7 @@ class tree extends control
|
||||
}
|
||||
elseif($viewType == 'line')
|
||||
{
|
||||
$products = $this->product->getPairs('', $this->session->project);
|
||||
$products = $this->product->getPairs('', $this->session->PRJ);
|
||||
|
||||
$this->lang->set('menugroup.tree', 'product');
|
||||
$this->product->setMenu($products, $rootID, $branch, 'line', '', 'line');
|
||||
@@ -306,7 +306,7 @@ class tree extends control
|
||||
$products = $this->execution->getProducts($rootID);
|
||||
$this->view->products = $products;
|
||||
|
||||
$executions = $this->execution->getPairs($this->session->project);
|
||||
$executions = $this->execution->getPairs($this->session->PRJ);
|
||||
|
||||
/* Set menu. */
|
||||
$this->lang->set('menugroup.tree', 'execution');
|
||||
|
||||
@@ -875,7 +875,7 @@ class treeModel extends model
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function createProjectStoryLink($type, $module, $extra)
|
||||
public function createExecutionStoryLink($type, $module, $extra)
|
||||
{
|
||||
$executionID = $extra['executionID'];
|
||||
$productID = $extra['productID'];
|
||||
|
||||
@@ -51,8 +51,8 @@ a.showMoreImage:hover {opacity: 1;}
|
||||
|
||||
.chosen-container .chosen-drop{z-index: 1100;}
|
||||
|
||||
.table-actions .btn{border: 1px solid #1183fb; color: #1183fb}
|
||||
.table-actions .btn:hover{background: #b3d4fc}
|
||||
.table-actions .btn {background: #78bdf5; color: #fff; border-color: #78bdf5}
|
||||
.table-footer .checked+div .btn, .table-actions .btn:hover {background: #16a8f8; border-color: #16a8f8}
|
||||
|
||||
#header #toolbar a{color: #fff; font-size: 13px; line-height: 15px; border: #84a2e2 1px solid}
|
||||
#header #toolbar i{font-size: 16px;}
|
||||
|
||||
Reference in New Issue
Block a user