Merge branch 'zentaoipd' of https://git.zcorp.cc/easycorp/zentaopms into zentaoipd
This commit is contained in:
@@ -298,7 +298,7 @@ class userEntry extends entry
|
||||
$info->issue = array('total' => 0, 'issues' => array());
|
||||
if(!common::hasPriv('my', 'work')) break;
|
||||
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
global $app;
|
||||
$app->rawMethod = 'work';
|
||||
@@ -318,7 +318,7 @@ class userEntry extends entry
|
||||
$info->risk = array('total' => 0, 'risks' => array());
|
||||
if(!common::hasPriv('my', 'work')) break;
|
||||
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
global $app;
|
||||
$app->rawMethod = 'work';
|
||||
@@ -338,7 +338,7 @@ class userEntry extends entry
|
||||
$info->meeting = array('total' => 0, 'meetings' => array());
|
||||
if(!common::hasPriv('my', 'work')) break;
|
||||
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
global $app;
|
||||
$app->rawMethod = 'work';
|
||||
|
||||
@@ -192,9 +192,11 @@ if($config->edition != 'open')
|
||||
{
|
||||
$config->version = $config->edition . $config->{$config->edition . 'Version'};
|
||||
if($config->edition != 'max') unset($config->maxVersion);
|
||||
if($config->edition != 'ipd') unset($config->ipdVersion);
|
||||
}
|
||||
else
|
||||
{
|
||||
unset($config->bizVersion);
|
||||
unset($config->maxVersion);
|
||||
unset($config->ipdVersion);
|
||||
}
|
||||
|
||||
+14
-14
@@ -83,7 +83,7 @@ class block extends control
|
||||
{
|
||||
$this->get->set('dashboard', 'project');
|
||||
|
||||
if($this->config->edition == 'max' and $this->app->tab == 'project')
|
||||
if(($this->config->edition == 'max' or $this->config->edition == 'ipd') and $this->app->tab == 'project')
|
||||
{
|
||||
$project = $this->loadModel('project')->getByID($this->session->project);
|
||||
if(isset($project->model) and !helper::hasFeature("{$project->model}_issue"))
|
||||
@@ -957,7 +957,7 @@ class block extends control
|
||||
$count = isset($this->params->count) ? (int)$this->params->count : 15;
|
||||
|
||||
/* Get projects. */
|
||||
$excludedModel = $this->config->edition == 'max' ? '' : 'waterfall';
|
||||
$excludedModel = ($this->config->edition == 'max' or $this->config->edition == 'ipd') ? '' : 'waterfall';
|
||||
$projects = $this->project->getOverviewList('byStatus', $status, 'order_asc', $count, $excludedModel);
|
||||
if(empty($projects))
|
||||
{
|
||||
@@ -1829,23 +1829,23 @@ class block extends control
|
||||
$hasMeeting = helper::hasFeature('meeting');
|
||||
|
||||
$hasViewPriv = array();
|
||||
if(common::hasPriv('todo', 'view')) $hasViewPriv['todo'] = true;
|
||||
if(common::hasPriv('task', 'view')) $hasViewPriv['task'] = true;
|
||||
if(common::hasPriv('bug', 'view') and $this->config->vision != 'lite') $hasViewPriv['bug'] = true;
|
||||
if(common::hasPriv('story', 'view') and $this->config->vision != 'lite') $hasViewPriv['story'] = true;
|
||||
if($this->config->URAndSR and common::hasPriv('story', 'view') and $this->config->vision != 'lite') $hasViewPriv['requirement'] = true;
|
||||
if(common::hasPriv('risk', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite' && $hasRisk) $hasViewPriv['risk'] = true;
|
||||
if(common::hasPriv('issue', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite' && $hasIssue) $hasViewPriv['issue'] = true;
|
||||
if(common::hasPriv('meeting', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite' && $hasMeeting) $hasViewPriv['meeting'] = true;
|
||||
if(common::hasPriv('feedback', 'view') and in_array($this->config->edition, array('max', 'biz'))) $hasViewPriv['feedback'] = true;
|
||||
if(common::hasPriv('ticket', 'view') and in_array($this->config->edition, array('max', 'biz'))) $hasViewPriv['ticket'] = true;
|
||||
if(common::hasPriv('todo', 'view')) $hasViewPriv['todo'] = true;
|
||||
if(common::hasPriv('task', 'view')) $hasViewPriv['task'] = true;
|
||||
if(common::hasPriv('bug', 'view') and $this->config->vision != 'lite') $hasViewPriv['bug'] = true;
|
||||
if(common::hasPriv('story', 'view') and $this->config->vision != 'lite') $hasViewPriv['story'] = true;
|
||||
if($this->config->URAndSR and common::hasPriv('story', 'view') and $this->config->vision != 'lite') $hasViewPriv['requirement'] = true;
|
||||
if(common::hasPriv('risk', 'view') and ($this->config->edition == 'max' or $this->config->edition == 'ipd') and $this->config->vision != 'lite' && $hasRisk) $hasViewPriv['risk'] = true;
|
||||
if(common::hasPriv('issue', 'view') and ($this->config->edition == 'max' or $this->config->edition == 'ipd') and $this->config->vision != 'lite' && $hasIssue) $hasViewPriv['issue'] = true;
|
||||
if(common::hasPriv('meeting', 'view') and ($this->config->edition == 'max' or $this->config->edition == 'ipd') and $this->config->vision != 'lite' && $hasMeeting) $hasViewPriv['meeting'] = true;
|
||||
if(common::hasPriv('feedback', 'view') and $this->config->edition != 'open') $hasViewPriv['feedback'] = true;
|
||||
if(common::hasPriv('ticket', 'view') and $this->config->edition != 'open') $hasViewPriv['ticket'] = true;
|
||||
|
||||
$params = $this->get->param;
|
||||
$params = json_decode(base64_decode($params));
|
||||
$count = array();
|
||||
$objectList = array('todo' => 'todos', 'task' => 'tasks', 'bug' => 'bugs', 'story' => 'stories', 'requirement' => 'requirements');
|
||||
$objectCountList = array('todo' => 'todoCount', 'task' => 'taskCount', 'bug' => 'bugCount', 'story' => 'storyCount', 'requirement' => 'requirementCount');
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition == 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
if($hasRisk)
|
||||
{
|
||||
@@ -1987,7 +1987,7 @@ class block extends control
|
||||
$hasViewPriv['review'] = true;
|
||||
$count['review'] = count($reviews);
|
||||
$this->view->reviews = $reviews;
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition == 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
$this->app->loadLang('approval');
|
||||
$this->view->flows = $this->dao->select('module,name')->from(TABLE_WORKFLOW)->where('buildin')->eq(0)->fetchPairs('module', 'name');
|
||||
|
||||
@@ -844,7 +844,7 @@ class blockModel extends model
|
||||
$params->bugCount['default'] = 20;
|
||||
$params->bugCount['control'] = 'input';
|
||||
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition == 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
if(helper::hasFeature('risk'))
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<div class="tile-title"><?php echo $lang->block->createdCases;?></div>
|
||||
<div class="tile-amount"><?php echo empty($data['createdCases']) ? 0 : html::a($this->createLink('my', 'contribute', 'mode=testcase&type=openedbyme'), (int)$data['createdCases']);?></div>
|
||||
</div>
|
||||
<?php if($this->config->edition == 'max'):?>
|
||||
<?php if($this->config->edition == 'max' or $this->config->edition == 'ipd'):?>
|
||||
<?php if(helper::hasFeature('risk')):?>
|
||||
<div class="col-xs-4 tile">
|
||||
<div class="tile-title"><?php echo $lang->block->createdRisks;?></div>
|
||||
|
||||
@@ -389,7 +389,7 @@ class bug extends control
|
||||
$this->dao->update(TABLE_TODO)->set('status')->eq('done')->where('id')->eq($output['todoID'])->exec();
|
||||
$this->action->create('todo', $output['todoID'], 'finished', '', "BUG:$bugID");
|
||||
|
||||
if($this->config->edition == 'biz' || $this->config->edition == 'max')
|
||||
if($this->config->edition != 'open')
|
||||
{
|
||||
$todo = $this->dao->select('type, idvalue')->from(TABLE_TODO)->where('id')->eq($output['todoID'])->fetch();
|
||||
if($todo->type == 'feedback' && $todo->idvalue) $this->loadModel('feedback')->updateStatus('todo', $todo->idvalue, 'done');
|
||||
|
||||
+5
-11
@@ -799,7 +799,7 @@ class bugModel extends model
|
||||
|
||||
if($bug->execution and $bug->status != $oldBug->status) $this->loadModel('kanban')->updateLane($bug->execution, 'bug');
|
||||
|
||||
if(($this->config->edition == 'biz' || $this->config->edition == 'max') && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status);
|
||||
if($this->config->edition != 'open' && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status);
|
||||
|
||||
$this->file->processFile4Object('bug', $oldBug, $bug);
|
||||
return common::createChanges($oldBug, $bug);
|
||||
@@ -911,9 +911,6 @@ class bugModel extends model
|
||||
unset($bug);
|
||||
}
|
||||
|
||||
$isBiz = $this->config->edition == 'biz';
|
||||
$isMax = $this->config->edition == 'max';
|
||||
|
||||
/* Update bugs. */
|
||||
foreach($bugs as $bugID => $bug)
|
||||
{
|
||||
@@ -936,7 +933,7 @@ class bugModel extends model
|
||||
|
||||
$allChanges[$bugID] = common::createChanges($oldBug, $bug);
|
||||
|
||||
if(($isBiz || $isMax) && $oldBug->feedback && !isset($feedbacks[$oldBug->feedback]))
|
||||
if($this->config->edition != 'open' && $oldBug->feedback && !isset($feedbacks[$oldBug->feedback]))
|
||||
{
|
||||
$feedbacks[$oldBug->feedback] = $oldBug->feedback;
|
||||
$this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status);
|
||||
@@ -1241,7 +1238,7 @@ class bugModel extends model
|
||||
/* Link bug to build and release. */
|
||||
$this->linkBugToBuild($bugID, $bug->resolvedBuild);
|
||||
|
||||
if(($this->config->edition == 'biz' || $this->config->edition == 'max') && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status);
|
||||
if($this->config->edition != 'open' && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status);
|
||||
|
||||
return common::createChanges($oldBug, $bug);
|
||||
}
|
||||
@@ -1367,9 +1364,6 @@ class bugModel extends model
|
||||
$modules = array();
|
||||
while($module = $stmt->fetch()) $modules[$module->id] = $module;
|
||||
|
||||
$isBiz = $this->config->edition == 'biz';
|
||||
$isMax = $this->config->edition == 'max';
|
||||
|
||||
$changes = array();
|
||||
foreach($bugIDList as $i => $bugID)
|
||||
{
|
||||
@@ -1416,7 +1410,7 @@ class bugModel extends model
|
||||
if($oldBug->execution) $this->loadModel('kanban')->updateLane($oldBug->execution, 'bug');
|
||||
$changes[$bugID] = common::createChanges($oldBug, $bug);
|
||||
|
||||
if(($isBiz || $isMax) && $oldBug->feedback && !isset($feedbacks[$oldBug->feedback]))
|
||||
if($this->config->edition != 'open' && $oldBug->feedback && !isset($feedbacks[$oldBug->feedback]))
|
||||
{
|
||||
$feedbacks[$oldBug->feedback] = $oldBug->feedback;
|
||||
$this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status);
|
||||
@@ -1531,7 +1525,7 @@ class bugModel extends model
|
||||
if(isset($output['toColID'])) $this->kanban->moveCard($bugID, $output['fromColID'], $output['toColID'], $output['fromLaneID'], $output['toLaneID']);
|
||||
}
|
||||
|
||||
if(($this->config->edition == 'biz' || $this->config->edition == 'max') && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status);
|
||||
if($this->config->edition != 'open' && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status);
|
||||
|
||||
return common::createChanges($oldBug, $bug);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
|
||||
<?php
|
||||
if($this->config->edition == 'biz' || $this->config->edition == 'max')
|
||||
if($this->config->edition != 'open')
|
||||
{
|
||||
$action = $this->loadModel('workflowaction')->getByModuleAndAction('bug', 'batchactivate');
|
||||
if($action->js) echo "<script>{$action->js}</script>";
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php if($this->config->edition == 'biz' or $this->config->edition == 'max'):?>
|
||||
<?php if($this->config->edition != 'open'):?>
|
||||
<div class='btn-toolbar pull-right child-position'>
|
||||
<?php common::printLink('chart', 'export', '', "<i class='icon icon-export muted'> </i> " . $lang->export, '', "class='btn btn-link btn-export' id='exportchart'");?>
|
||||
<?php common::printLink('chart', 'browse', '', $lang->chart->toDesign, '', "class='btn btn-primary '");?>
|
||||
|
||||
@@ -295,7 +295,7 @@ class commonModel extends model
|
||||
public function setApproval()
|
||||
{
|
||||
$this->config->openedApproval = false;
|
||||
if($this->config->edition == 'max' && $this->config->vision == 'rnd') $this->config->openedApproval = true;
|
||||
if(($this->config->edition == 'max' or $this->config->edition == 'ipd') && $this->config->vision == 'rnd') $this->config->openedApproval = true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -889,7 +889,7 @@ class customModel extends model
|
||||
|
||||
$enabledScrumFeatures = array();
|
||||
$disabledScrumFeatures = array();
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
foreach($this->config->custom->scrumFeatures as $scrumFeature)
|
||||
{
|
||||
@@ -1048,7 +1048,7 @@ class customModel extends model
|
||||
*/
|
||||
public function hasAssetlibData()
|
||||
{
|
||||
if($this->config->edition == 'max') return $this->dao->select('*')->from(TABLE_ASSETLIB)->where('deleted')->eq(0)->count();
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd') return $this->dao->select('*')->from(TABLE_ASSETLIB)->where('deleted')->eq(0)->count();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1060,7 +1060,7 @@ class customModel extends model
|
||||
*/
|
||||
public function hasScrumIssueData()
|
||||
{
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
return $this->dao->select('t1.*')->from(TABLE_ISSUE)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
@@ -1080,7 +1080,7 @@ class customModel extends model
|
||||
*/
|
||||
public function hasScrumRiskData()
|
||||
{
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
return $this->dao->select('t1.*')->from(TABLE_RISK)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
@@ -1100,7 +1100,7 @@ class customModel extends model
|
||||
*/
|
||||
public function hasScrumOpportunityData()
|
||||
{
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
return $this->dao->select('id')->from(TABLE_OPPORTUNITY)->where('execution')->ne('0')->andWhere('deleted')->eq('0')->count();
|
||||
}
|
||||
@@ -1115,7 +1115,7 @@ class customModel extends model
|
||||
*/
|
||||
public function hasScrumMeetingData()
|
||||
{
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
return $this->dao->select('id')->from(TABLE_PROJECT)->alias('t1')
|
||||
->leftJoin(TABLE_MEETING)->alias('t2')->on('t1.id = t2.project')
|
||||
@@ -1135,7 +1135,7 @@ class customModel extends model
|
||||
*/
|
||||
public function hasScrumAuditplanData()
|
||||
{
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
return $this->dao->select('id')->from(TABLE_PROJECT)->alias('t1')
|
||||
->leftJoin(TABLE_AUDITPLAN)->alias('t2')->on('t1.id = t2.project')
|
||||
@@ -1155,7 +1155,7 @@ class customModel extends model
|
||||
*/
|
||||
public function hasScrumProcessData()
|
||||
{
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
return $this->dao->select('id')->from(TABLE_PROGRAMACTIVITY)->where('execution')->ne('0')->andWhere('deleted')->eq('0')->count();
|
||||
}
|
||||
|
||||
@@ -1912,7 +1912,7 @@ class docModel extends model
|
||||
}
|
||||
elseif($type == 'project')
|
||||
{
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
$issueIdList = $this->dao->select('id')->from(TABLE_ISSUE)->where('project')->eq($objectID)->andWhere('deleted')->eq('0')->andWhere('project')->in($this->app->user->view->projects)->get();
|
||||
$meetingIdList = $this->dao->select('id')->from(TABLE_MEETING)->where('project')->eq($objectID)->andWhere('deleted')->eq('0')->andWhere('project')->in($this->app->user->view->projects)->get();
|
||||
|
||||
@@ -216,7 +216,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if($this->config->edition == 'max'):?>
|
||||
<?php if($this->config->edition== 'max' or $this->config->edition == 'ipd'):?>
|
||||
<div class="modal fade" id="importToPracticeLib">
|
||||
<div class="modal-dialog mw-500px">
|
||||
<div class="modal-content">
|
||||
|
||||
@@ -444,7 +444,7 @@ class executionModel extends model
|
||||
if(!empty($sprint->percent) and isset($this->config->setPercent) and $this->config->setPercent == 1) $this->checkWorkload('create', $sprint->percent, $sprint->project);
|
||||
|
||||
/* Set planDuration and realDuration. */
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
$sprint->planDuration = $this->loadModel('programplan')->getDuration($sprint->begin, $sprint->end);
|
||||
if(!empty($sprint->realBegan) and !empty($sprint->realEnd)) $sprint->realDuration = $this->loadModel('programplan')->getDuration($sprint->realBegan, $sprint->realEnd);
|
||||
@@ -636,7 +636,7 @@ class executionModel extends model
|
||||
if(!empty($execution->percent) and isset($this->config->setPercent) and $this->config->setPercent == 1) $this->checkWorkload('update', $execution->percent, $oldExecution);
|
||||
|
||||
/* Set planDuration and realDuration. */
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
$execution->planDuration = $this->loadModel('programplan')->getDuration($execution->begin, $execution->end);
|
||||
if(!empty($execution->realBegan) and !empty($execution->realEnd)) $execution->realDuration = $this->programplan->getDuration($execution->realBegan, $execution->realEnd);
|
||||
|
||||
@@ -237,7 +237,7 @@ class group extends control
|
||||
$changelogs = ',' . join(',', $changelog) . ',';
|
||||
|
||||
$this->lang->custom->common = $this->lang->group->config;
|
||||
if($this->config->edition == 'max' and $this->config->vision == 'rnd' and isset($this->lang->baseline)) $this->lang->baseline->common = $this->lang->group->docTemplate;
|
||||
if(($this->config->edition == 'max' or $this->config->edition == 'ipd') and $this->config->vision == 'rnd' and isset($this->lang->baseline)) $this->lang->baseline->common = $this->lang->group->docTemplate;
|
||||
|
||||
$modules = $this->group->getPrivManagerPairs('module', $menu);
|
||||
|
||||
|
||||
@@ -533,7 +533,7 @@ class installModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition == 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
/* Update process by lang. */
|
||||
foreach($this->lang->install->processList as $id => $name)
|
||||
|
||||
@@ -980,7 +980,7 @@ EOF;
|
||||
}
|
||||
|
||||
$this->view->flows = array();
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
$this->app->loadLang('approval');
|
||||
$this->view->flows = $this->dao->select('module,name')->from(TABLE_WORKFLOW)->where('buildin')->eq(0)->fetchPairs('module', 'name');
|
||||
|
||||
@@ -130,7 +130,7 @@ class personnelModel extends model
|
||||
$executionPairs = $this->getInvolvedExecutions($projects);
|
||||
$taskInvest = $this->getProjectTaskInvest($projects, $accountPairs);
|
||||
$bugAndStoryInvest = $this->getBugAndStoryInvest($accountPairs, $programID);
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition == 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
$issueInvest = $this->getIssueInvest($accountPairs, $projects);
|
||||
$riskInvest = $this->getRiskInvest($accountPairs, $projects);
|
||||
@@ -153,7 +153,7 @@ class personnelModel extends model
|
||||
|
||||
$personnelList[$user->role][$account] += $taskInvest[$account];
|
||||
$personnelList[$user->role][$account] += $bugAndStoryInvest[$account];
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition == 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
$personnelList[$user->role][$account] += $issueInvest[$account];
|
||||
$personnelList[$user->role][$account] += $riskInvest[$account];
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<th colspan="3"><?php echo $lang->personnel->task;?></th>
|
||||
<th colspan="3"><?php echo $lang->personnel->bug;?></th>
|
||||
<th <?php echo $config->URAndSR ? "colspan='2'" : "rowspan='2'";?> class="c-story"><?php echo $lang->personnel->createStories;?></th>
|
||||
<?php if($this->config->edition == 'max'): ?>
|
||||
<?php if($this->config->edition == 'max' or $this->config->edition == 'ipd'): ?>
|
||||
<th colspan="3"><?php echo $lang->personnel->issue;?></th>
|
||||
<th colspan="3"><?php echo $lang->personnel->risk;?></th>
|
||||
<?php endif;?>
|
||||
@@ -47,7 +47,7 @@
|
||||
<th><?php echo $lang->personnel->UR;?></th>
|
||||
<th><?php echo $lang->personnel->SR;?></th>
|
||||
<?php endif;?>
|
||||
<?php if($this->config->edition == 'max'): ?>
|
||||
<?php if($this->config->edition == 'max' or $this->config->edition == 'ipd'): ?>
|
||||
<th><?php echo $lang->personnel->created;?></th>
|
||||
<th><?php echo $lang->personnel->resolved;?></th>
|
||||
<th><?php echo $lang->personnel->wait;?></th>
|
||||
@@ -77,7 +77,7 @@
|
||||
<td><?php echo $personnel['UR'];?></td>
|
||||
<?php endif;?>
|
||||
<td><?php echo $personnel['SR'];?></td>
|
||||
<?php if($this->config->edition == 'max'): ?>
|
||||
<?php if($this->config->edition == 'max' or $this->config->edition == 'ipd'): ?>
|
||||
<td><?php echo $personnel['createdIssue'];?></td>
|
||||
<td><?php echo $personnel['resolvedIssue'];?></td>
|
||||
<td><?php echo $personnel['pendingIssue'];?></td>
|
||||
|
||||
@@ -868,7 +868,7 @@ class programplanModel extends model
|
||||
foreach($datas as $data)
|
||||
{
|
||||
/* Set planDuration and realDuration. */
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
$data->planDuration = $this->getDuration($data->begin, $data->end);
|
||||
$data->realDuration = $this->getDuration($data->realBegan, $data->realEnd);
|
||||
@@ -1148,7 +1148,7 @@ class programplanModel extends model
|
||||
}
|
||||
|
||||
/* Set planDuration and realDuration. */
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
$plan->planDuration = $this->getDuration($plan->begin, $plan->end);
|
||||
$plan->realDuration = $this->getDuration($plan->realBegan, $plan->realEnd);
|
||||
|
||||
@@ -1017,7 +1017,7 @@ class project extends control
|
||||
$this->session->set('testtaskList', $uri, 'qa');
|
||||
$this->session->set('reportList', $uri, 'qa');
|
||||
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
$this->session->set('riskList', $uri, 'project');
|
||||
$this->session->set('issueList', $uri, 'project');
|
||||
|
||||
@@ -3017,7 +3017,7 @@ class projectModel extends model
|
||||
public function checkCanChangeModel($projectID, $model)
|
||||
{
|
||||
$checkList = $this->config->project->checkList->$model;
|
||||
if($this->config->edition == 'max') $checkList = $this->config->project->maxCheckList->$model;
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd') $checkList = $this->config->project->maxCheckList->$model;
|
||||
foreach($checkList as $module)
|
||||
{
|
||||
if($module == '') continue;
|
||||
|
||||
@@ -759,12 +759,12 @@ class searchModel extends model
|
||||
$table = $this->config->objectTables[$module];
|
||||
|
||||
$fields = '';
|
||||
if($module == 'issue') $fields = $this->config->edition == 'max' ? 'id,project,owner,lib' : 'id,project,owner';
|
||||
if($module == 'issue') $fields = ($this->config->edition == 'max' or $this->config->edition == 'ipd') ? 'id,project,owner,lib' : 'id,project,owner';
|
||||
if($module == 'project') $fields = 'id,model';
|
||||
if($module == 'execution')$fields = 'id,type,project';
|
||||
if($module == 'story' or $module == 'requirement') $fields = $this->config->edition == 'max' ? 'id,type,lib' : 'id,type';
|
||||
if(($module == 'risk' or $module == 'opportunity') and $this->config->edition == 'max') $fields = 'id,lib';
|
||||
if($module == 'doc' and $this->config->edition == 'max') $fields = 'id,assetLib,assetLibType';
|
||||
if($module == 'story' or $module == 'requirement') $fields = ($this->config->edition == 'max' or $this->config->edition == 'ipd') ? 'id,type,lib' : 'id,type';
|
||||
if(($module == 'risk' or $module == 'opportunity') and ($this->config->edition == 'max' or $this->config->edition == 'ipd')) $fields = 'id,lib';
|
||||
if($module == 'doc' and ($this->config->edition == 'max' or $this->config->edition == 'ipd')) $fields = 'id,assetLib,assetLibType';
|
||||
if(empty($fields)) continue;
|
||||
|
||||
$objectList[$module] = $this->dao->select($fields)->from($table)->where('id')->in($idList)->fetchAll('id');
|
||||
@@ -831,7 +831,7 @@ class searchModel extends model
|
||||
|
||||
$record->extraType = isset($story->type) ? $story->type : '';
|
||||
}
|
||||
elseif(($module == 'risk' or $module == 'opportunity') and $this->config->edition == 'max')
|
||||
elseif(($module == 'risk' or $module == 'opportunity') and ($this->config->edition == 'max' or $this->config->edition == 'ipd'))
|
||||
{
|
||||
$object = $objectList[$module][$record->objectID];
|
||||
if(!empty($object->lib))
|
||||
@@ -842,7 +842,7 @@ class searchModel extends model
|
||||
|
||||
$record->url = helper::createLink($module, $method, "id={$record->objectID}", '', false, 0, true);
|
||||
}
|
||||
elseif($module == 'doc' and $this->config->edition == 'max')
|
||||
elseif($module == 'doc' and ($this->config->edition == 'max' or $this->config->edition == 'ipd'))
|
||||
{
|
||||
$doc = $objectList['doc'][$record->objectID];
|
||||
if(!empty($doc->assetLib))
|
||||
|
||||
@@ -5503,7 +5503,7 @@ class storyModel extends model
|
||||
$stories[$id]->cases = $this->loadModel('testcase')->getStoryCases($id);
|
||||
$stories[$id]->bugs = $this->loadModel('bug')->getStoryBugs($id);
|
||||
$stories[$id]->tasks = $this->loadModel('task')->getStoryTasks($id);
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
$stories[$id]->designs = $this->dao->select('id, name')->from(TABLE_DESIGN)
|
||||
->where('story')->eq($id)
|
||||
@@ -5577,7 +5577,7 @@ class storyModel extends model
|
||||
$stories[$id]->cases = $this->loadModel('testcase')->getStoryCases($id);
|
||||
$stories[$id]->bugs = $this->loadModel('bug')->getStoryBugs($id);
|
||||
$stories[$id]->tasks = $this->loadModel('task')->getStoryTasks($id, 0, $projectID);
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
$stories[$id]->designs = $this->dao->select('id, name')->from(TABLE_DESIGN)
|
||||
->where('story')->eq($id)
|
||||
@@ -5621,7 +5621,7 @@ class storyModel extends model
|
||||
$track[$id]->bug = $this->loadModel('bug')->getStoryBugs($id);
|
||||
$track[$id]->story = $this->getByID($id);
|
||||
$track[$id]->task = $this->loadModel('task')->getStoryTasks($id);
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
$track[$id]->design = $this->dao->select('id, name')->from(TABLE_DESIGN)
|
||||
->where('story')->eq($id)
|
||||
|
||||
+8
-10
@@ -793,7 +793,7 @@ class taskModel extends model
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
|
||||
if(($this->config->edition == 'biz' || $this->config->edition == 'max') && $oldParentTask->feedback) $this->loadModel('feedback')->updateStatus('task', $oldParentTask->feedback, $newParentTask->status, $oldParentTask->status);
|
||||
if(($this->config->edition != 'open') && $oldParentTask->feedback) $this->loadModel('feedback')->updateStatus('task', $oldParentTask->feedback, $newParentTask->status, $oldParentTask->status);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1304,7 +1304,7 @@ class taskModel extends model
|
||||
unset($oldTask->parent);
|
||||
unset($task->parent);
|
||||
|
||||
if(($this->config->edition == 'biz' || $this->config->edition == 'max') && $oldTask->feedback) $this->loadModel('feedback')->updateStatus('task', $oldTask->feedback, $task->status, $oldTask->status);
|
||||
if($this->config->edition != 'open' && $oldTask->feedback) $this->loadModel('feedback')->updateStatus('task', $oldTask->feedback, $task->status, $oldTask->status);
|
||||
if(isset($oldTask->team))
|
||||
{
|
||||
$users = $this->loadModel('user')->getPairs('noletter|noempty');
|
||||
@@ -1532,8 +1532,6 @@ class taskModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
$isBiz = $this->config->edition == 'biz';
|
||||
$isMax = $this->config->edition == 'max';
|
||||
foreach($tasks as $taskID => $task)
|
||||
{
|
||||
if(strpos(',doing,pause,', $task->status) && empty($teams) && $task->parent >= 0 && empty($task->left))
|
||||
@@ -1593,7 +1591,7 @@ class taskModel extends model
|
||||
if($task->status == 'done') $this->loadModel('score')->create('task', 'finish', $taskID);
|
||||
if($task->status == 'closed') $this->loadModel('score')->create('task', 'close', $taskID);
|
||||
if($task->status != $oldTask->status) $this->loadModel('kanban')->updateLane($oldTask->execution, 'task', $oldTask->id);
|
||||
if(($isBiz || $isMax) && $oldTask->feedback && !isset($feedbacks[$oldTask->feedback]))
|
||||
if($this->config->edition != 'open' && $oldTask->feedback && !isset($feedbacks[$oldTask->feedback]))
|
||||
{
|
||||
$feedbacks[$oldTask->feedback] = $oldTask->feedback;
|
||||
$this->loadModel('feedback')->updateStatus('task', $oldTask->feedback, $task->status, $oldTask->status);
|
||||
@@ -1839,7 +1837,7 @@ class taskModel extends model
|
||||
$this->loadModel('kanban');
|
||||
if(!isset($output['toColID']) or $task->status == 'done') $this->kanban->updateLane($oldTask->execution, 'task', $taskID);
|
||||
if(isset($output['toColID']) and $task->status == 'doing') $this->kanban->moveCard($taskID, $output['fromColID'], $output['toColID'], $output['fromLaneID'], $output['toLaneID']);
|
||||
if(($this->config->edition == 'biz' || $this->config->edition == 'max') && $oldTask->feedback) $this->loadModel('feedback')->updateStatus('task', $oldTask->feedback, $task->status, $oldTask->status);
|
||||
if($this->config->edition != 'open' && $oldTask->feedback) $this->loadModel('feedback')->updateStatus('task', $oldTask->feedback, $task->status, $oldTask->status);
|
||||
if(!dao::isError()) return common::createChanges($oldTask, $task);
|
||||
}
|
||||
|
||||
@@ -2139,7 +2137,7 @@ class taskModel extends model
|
||||
if(isset($output['toColID'])) $this->kanban->moveCard($taskID, $output['fromColID'], $output['toColID'], $output['fromLaneID'], $output['toLaneID']);
|
||||
}
|
||||
|
||||
if(($this->config->edition == 'biz' || $this->config->edition == 'max') && $oldTask->feedback) $this->loadModel('feedback')->updateStatus('task', $oldTask->feedback, $task->status, $oldTask->status);
|
||||
if($this->config->edition != 'open' && $oldTask->feedback) $this->loadModel('feedback')->updateStatus('task', $oldTask->feedback, $task->status, $oldTask->status);
|
||||
|
||||
return common::createChanges($oldTask, $task);
|
||||
}
|
||||
@@ -2225,7 +2223,7 @@ class taskModel extends model
|
||||
if(!isset($output['toColID'])) $this->kanban->updateLane($oldTask->execution, 'task', $taskID);
|
||||
if(isset($output['toColID'])) $this->kanban->moveCard($taskID, $output['fromColID'], $output['toColID'], $output['fromLaneID'], $output['toLaneID']);
|
||||
|
||||
if(($this->config->edition == 'biz' || $this->config->edition == 'max') && $oldTask->feedback) $this->loadModel('feedback')->updateStatus('task', $oldTask->feedback, $task->status, $oldTask->status);
|
||||
if($this->config->edition != 'open' && $oldTask->feedback) $this->loadModel('feedback')->updateStatus('task', $oldTask->feedback, $task->status, $oldTask->status);
|
||||
|
||||
return common::createChanges($oldTask, $task);
|
||||
}
|
||||
@@ -2519,7 +2517,7 @@ class taskModel extends model
|
||||
if(is_string($type)) $type = strtolower($type);
|
||||
$orderBy = str_replace('pri_', 'priOrder_', $orderBy);
|
||||
$fields = "DISTINCT t1.*, t2.id AS storyID, t2.title AS storyTitle, t2.product, t2.branch, t2.version AS latestStoryVersion, t2.status AS storyStatus, t3.realname AS assignedToRealName, IF(t1.`pri` = 0, {$this->config->maxPriValue}, t1.`pri`) as priOrder";
|
||||
$this->config->edition == 'max' && $fields .= ', t6.name as designName, t6.version as latestDesignVersion';
|
||||
($this->config->edition == 'max' or $this->config->edition == 'ipd') && $fields .= ', t6.name as designName, t6.version as latestDesignVersion';
|
||||
|
||||
$actionIDList = array();
|
||||
if($type == 'assignedbyme') $actionIDList = $this->dao->select('objectID')->from(TABLE_ACTION)->where('objectType')->eq('task')->andWhere('action')->eq('assigned')->andWhere('actor')->eq($this->app->user->account)->fetchPairs('objectID', 'objectID');
|
||||
@@ -2530,7 +2528,7 @@ class taskModel extends model
|
||||
->leftJoin(TABLE_USER)->alias('t3')->on('t1.assignedTo = t3.account')
|
||||
->leftJoin(TABLE_TASKTEAM)->alias('t4')->on('t4.task = t1.id')
|
||||
->leftJoin(TABLE_MODULE)->alias('t5')->on('t1.module = t5.id')
|
||||
->beginIF($this->config->edition == 'max')->leftJoin(TABLE_DESIGN)->alias('t6')->on('t1.design= t6.id')->fi()
|
||||
->beginIF($this->config->edition == 'max' or $this->config->edition == 'ipd')->leftJoin(TABLE_DESIGN)->alias('t6')->on('t1.design= t6.id')->fi()
|
||||
->where('t1.execution')->eq((int)$executionID)
|
||||
->beginIF($type == 'myinvolved')
|
||||
->andWhere("((t4.`account` = '{$this->app->user->account}') OR t1.`assignedTo` = '{$this->app->user->account}' OR t1.`finishedby` = '{$this->app->user->account}')")
|
||||
|
||||
@@ -161,7 +161,7 @@ class testtask extends control
|
||||
$this->lang->scrum->menu->qa['subMenu']->testcase['subModule'] = 'testtask';
|
||||
$this->lang->scrum->menu->qa['subMenu']->testtask['subModule'] = '';
|
||||
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
$this->lang->waterfall->menu->qa['subMenu']->testcase['subModule'] = 'testtask';
|
||||
$this->lang->waterfall->menu->qa['subMenu']->testtask['subModule'] = '';
|
||||
|
||||
@@ -206,7 +206,7 @@ class todo extends control
|
||||
$account = $user->account;
|
||||
|
||||
$reviews = array();
|
||||
if($this->config->edition == 'max') $reviews = $this->loadModel('review')->getUserReviewPairs($account);
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd') $reviews = $this->loadModel('review')->getUserReviewPairs($account);
|
||||
$allTodos = $this->todo->getList($type, $account, $status);
|
||||
if($this->post->todoIDList) $todoIDList = $this->post->todoIDList;
|
||||
|
||||
@@ -228,7 +228,7 @@ class todo extends control
|
||||
$tasks = $this->task->getUserTaskPairs($account, 'wait,doing', '', isset($objectIDList['task']) ? $objectIDList['task'] : '');
|
||||
$storys = $this->loadModel('story')->getUserStoryPairs($account, 10, 'story', '', isset($objectIDList['story']) ? $objectIDList['story'] : '');
|
||||
if($this->config->edition != 'open') $this->view->feedbacks = $this->loadModel('feedback')->getUserFeedbackPairs($account, '', isset($objectIDList['feedback']) ? $objectIDList['feedback'] : '');
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
$issues = $this->loadModel('issue')->getUserIssuePairs($account);
|
||||
$risks = $this->loadmodel('risk')->getUserRiskPairs($account);
|
||||
@@ -256,7 +256,7 @@ class todo extends control
|
||||
$this->view->bugs = $bugs;
|
||||
$this->view->tasks = $tasks;
|
||||
$this->view->storys = $storys;
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
$this->view->issues = $issues;
|
||||
$this->view->risks = $risks;
|
||||
@@ -599,7 +599,7 @@ class todo extends control
|
||||
$bugs = $this->loadModel('bug')->getUserBugPairs($account);
|
||||
$stories = $this->loadModel('story')->getUserStoryPairs($account, 100, 'story');
|
||||
$tasks = $this->loadModel('task')->getUserTaskPairs($account);
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
$issues = $this->loadModel('issue')->getUserIssuePairs($account);
|
||||
$risks = $this->loadModel('risk')->getUserRiskPairs($account);
|
||||
@@ -621,7 +621,7 @@ class todo extends control
|
||||
if($type == 'story') $todo->name = isset($stories[$todo->idvalue]) ? $stories[$todo->idvalue] . "(#$todo->idvalue)" : '';
|
||||
if($type == 'task') $todo->name = isset($tasks[$todo->idvalue]) ? $tasks[$todo->idvalue] . "(#$todo->idvalue)" : '';
|
||||
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
if($type == 'issue') $todo->name = isset($issues[$todo->idvalue]) ? $issues[$todo->idvalue] . "(#$todo->idvalue)" : '';
|
||||
if($type == 'risk') $todo->name = isset($risks[$todo->idvalue]) ? $risks[$todo->idvalue] . "(#$todo->idvalue)" : '';
|
||||
|
||||
@@ -7827,7 +7827,7 @@ class upgradeModel extends model
|
||||
/* User requriement */
|
||||
$requirementStory = $this->dao->select('count(1) as total')->from(TABLE_STORY)->where('type')->eq('requirement')->andWhere('deleted')->eq('0')->fetch('total');
|
||||
if($requirementStory > 0) $returnData['ur'] = true;
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
/* issue,risk,opportunity,process,QA,meeting */
|
||||
$issue = $this->dao->select('count(1) as total')->from(TABLE_ISSUE)->alias('t1')
|
||||
@@ -7901,7 +7901,7 @@ class upgradeModel extends model
|
||||
->fetch('total');
|
||||
if($waterfull > 0) $returnData['waterfall'] = true;
|
||||
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
/* assetlib */
|
||||
$assetlib = $this->dao->select('count(1) as total')->from(TABLE_ASSETLIB)
|
||||
|
||||
@@ -2889,7 +2889,7 @@ class userModel extends model
|
||||
$personalData['createdBugs'] = $this->dao->select($t1Count)->from(TABLE_BUG)->alias('t1')->leftjoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')->where('t1.openedBy')->eq($account)->andWhere('t1.deleted')->eq('0')->andWhere('t2.deleted')->eq('0')->fetch('count');
|
||||
$personalData['resolvedBugs'] = $this->dao->select($t1Count)->from(TABLE_BUG)->alias('t1')->leftjoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')->where('t1.resolvedBy')->eq($account)->andWhere('t1.deleted')->eq('0')->andWhere('t2.deleted')->eq('0')->fetch('count');
|
||||
$personalData['createdCases'] = $this->dao->select($count)->from(TABLE_CASE)->where('openedBy')->eq($account)->andWhere('deleted')->eq('0')->fetch('count');
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
$personalData['createdRisks'] = $this->dao->select($t1Count)->from(TABLE_RISK)->alias('t1')->leftjoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')->where('t1.createdBy')->eq($account)->andWhere('t1.deleted')->eq('0')->andWhere('t2.deleted')->eq('0')->fetch('count');
|
||||
$personalData['resolvedRisks'] = $this->dao->select($t1Count)->from(TABLE_RISK)->alias('t1')->leftjoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')->where('t1.resolvedBy')->eq($account)->andWhere('t1.deleted')->eq('0')->andWhere('t2.deleted')->eq('0')->fetch('count');
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<tr>
|
||||
<td><?php echo html::a($executionLink, $execution->id, '', "data-app='execution'");?></td>
|
||||
<td>
|
||||
<?php if($this->config->edition == 'max'):?>
|
||||
<?php if($this->config->edition== 'max' or $this->config->edition == 'ipd'):?>
|
||||
<span class='project-type-label label label-info label-outline'><?php echo zget($lang->user->executionTypeList, $execution->type);?></span>
|
||||
<?php endif;?>
|
||||
<?php echo html::a($executionLink, $execution->name, '', "data-app='execution'");?>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
common::printLink('user', 'execution', "userID={$user->id}", $label, '', "class='btn btn-link $active executionTab'");
|
||||
}
|
||||
|
||||
if($this->config->edition == 'max')
|
||||
if($this->config->edition== 'max' or $this->config->edition == 'ipd')
|
||||
{
|
||||
$label = "<span class='text'>{$lang->user->issue}</span>";
|
||||
$active = $methodName == 'issue' ? ' btn-active-text' : '';
|
||||
|
||||
Reference in New Issue
Block a user