* Merge 18.8 execution.

This commit is contained in:
tanghucheng
2023-11-23 22:12:41 -05:00
parent 0a479a0adb
commit c5e12335db
3 changed files with 21 additions and 22 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ $config->execution->ownerFields = array('PO', 'PM', 'QD', 'RD');
$config->execution->defaultBurnPeriod = 30;
$config->execution->list = new stdclass();
$config->execution->list->exportFields = 'id,name,projectName,PM,begin,end,status,totalEstimate,totalConsumed,totalLeft,progress';
$config->execution->list->exportFields = 'id,name,projectName,PM,begin,end,status,estimate,consumed,left,progress';
$config->execution->modelList['scrum'] = 'sprint';
$config->execution->modelList['waterfall'] = 'stage';
@@ -63,7 +63,7 @@ $config->execution->search['fields']['estimate'] = $lang->task->estimate;
$config->execution->search['fields']['left'] = $lang->task->left;
$config->execution->search['fields']['consumed'] = $lang->task->consumed;
$config->execution->search['fields']['type'] = $lang->task->type;
$config->execution->search['fields']['fromBug'] = $lang->task->fromBugID;
if($config->vision != 'lite') $config->execution->search['fields']['fromBug'] = $lang->task->fromBugID;
$config->execution->search['fields']['closedReason'] = $lang->task->closedReason;
$config->execution->search['fields']['openedBy'] = $lang->task->openedBy;
+11 -13
View File
@@ -155,12 +155,6 @@ class execution extends control
$pager = new pager($recTotal, $recPerPage, $pageID);
$tasks = $this->execution->getTasks((int)$productID, $executionID, $this->executions, $browseType, $queryID, (int)$moduleID, $sort, $pager);
/* Build the search form. */
$actionURL = $this->createLink('execution', 'task', "executionID=$executionID&status=bySearch&param=myQueryID");
$this->config->execution->search['onMenuBar'] = 'yes';
if(!$execution->multiple) unset($this->config->execution->search['fields']['execution']);
$this->execution->buildTaskSearchForm($executionID, $this->executions, $queryID, $actionURL);
/* team member pairs. */
$memberPairs = array();
foreach($this->view->teamMembers as $key => $member) $memberPairs[$key] = $member->realname;
@@ -191,6 +185,13 @@ class execution extends control
$showAllModule = empty($this->config->execution->task->allModule) ? '' : 'allModule';
$showModule = !empty($this->config->execution->task->showModule) ? $this->config->execution->task->showModule : '';
/* Build the search form. */
$modules = $this->loadModel('tree')->getTaskOptionMenu($executionID, 0, $showModule);
$actionURL = $this->createLink('execution', 'task', "executionID=$executionID&status=bySearch&param=myQueryID");
$this->config->execution->search['onMenuBar'] = 'yes';
if(!$execution->multiple) unset($this->config->execution->search['fields']['execution']);
$this->execution->buildTaskSearchForm($executionID, $this->executions, $queryID, $actionURL, $modules);
$this->view->title = $execution->name . $this->lang->colon . $this->lang->execution->task;
$this->view->tasks = $tasks;
$this->view->pager = $pager;
@@ -199,7 +200,7 @@ class execution extends control
$this->view->status = $status;
$this->view->param = $param;
$this->view->moduleID = $moduleID;
$this->view->modules = $this->loadModel('tree')->getTaskOptionMenu($executionID, 0, $showAllModule);
$this->view->modules = $modules;
$this->view->modulePairs = $this->tree->getModulePairs($executionID, 'task', $showModule);
$this->view->moduleTree = $this->tree->getTaskTreeMenu($executionID, $productID, 0, array('treeModel', 'createTaskLink'), $showModule);
$this->view->memberPairs = $memberPairs;
@@ -1014,7 +1015,7 @@ class execution extends control
$this->view->title = $this->app->tab == 'execution' ? $this->lang->execution->createExec : $this->lang->execution->create;
$this->view->gobackLink = (isset($output['from']) and $output['from'] == 'global') ? $this->createLink('execution', 'all') : '';
$this->view->allProducts = array_filter($this->executionZen->getAllProductsForCreate($project));
$this->view->allProjects = $this->project->getPairsByModel('all', 'noclosed,multiple');
$this->view->allProjects = $this->project->getPairsByModel('scrum,agileplus,waterfall,waterfallplus,kanban', 'noclosed,multiple');
$this->view->multiBranchProducts = $this->loadModel('product')->getMultiBranchPairs();
$this->view->products = $products;
$this->view->teams = $this->execution->getCanCopyObjects($projectID);
@@ -2738,7 +2739,7 @@ class execution extends control
$this->view->productID = $productID;
$this->view->pager = $pager;
$this->view->orderBy = $orderBy;
$this->view->users = $this->loadModel('user')->getPairs('noletter', '', 0, array_unique(array_column($executionStats, 'PM')));
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->projects = array('') + $this->project->getPairsByProgram();
$this->view->status = $status;
$this->view->from = $from;
@@ -2854,10 +2855,7 @@ class execution extends control
{
$execution->PM = zget($users, $execution->PM);
$execution->status = isset($execution->delay) ? $executionLang->delayed : $this->processStatus('execution', $execution);
$execution->totalEstimate = $execution->hours->totalEstimate;
$execution->totalConsumed = $execution->hours->totalConsumed;
$execution->totalLeft = $execution->hours->totalLeft;
$execution->progress = $execution->hours->progress . '%';
$execution->progress .= '%';
$execution->name = isset($execution->title) ? $execution->title : $execution->name;
if($this->app->tab == 'project' and ($project->model == 'agileplus' or $project->model == 'waterfallplus')) $execution->method = zget($executionLang->typeList, $execution->type);
+8 -7
View File
@@ -106,10 +106,11 @@ class executionModel extends model
if($execution->type == 'kanban') $this->executionTao->setKanbanMenu();
/* Check execution permission. */
$executions = $this->getPairs(0, 'all', 'nocode');
$executions = $this->fetchPairs($execution->project, 'all');
if(!$executionID && $this->session->execution) $executionID = $this->session->execution;
if(!$executionID || !in_array($executionID, array_keys($executions))) $executionID = key($executions);
if($executions && (!isset($executions[$executionID]) || !$this->checkPriv($executionID))) return $this->accessDenied();
if(!$executionID) $executionID = key($executions);
if($execution->multiple and !isset($executions[$executionID])) $executionID = key($executions);
if($execution->multiple and $executions and (!isset($executions[$executionID]) or !$this->checkPriv($executionID))) return $this->accessDenied();
/* Replaces the iterated language with the stage. */
if($execution->type == 'stage')
@@ -161,8 +162,8 @@ class executionModel extends model
if(isset($this->lang->execution->menu->storyGroup)) unset($this->lang->execution->menu->storyGroup);
if(isset($this->lang->execution->menu->story['dropMenu']) && $this->app->getMethodName() == 'storykanban')
{
unset($this->lang->execution->menu->story['dropMenu']);
$this->lang->execution->menu->story['link'] = str_replace(array($this->lang->common->story, 'story'), array($this->lang->SRCommon, 'storykanban'), $this->lang->execution->menu->story['link']);
$this->lang->execution->menu->story['link'] = str_replace(array($this->lang->common->story, 'story'), array($this->lang->SRCommon, 'storykanban'), $this->lang->execution->menu->story['link']);
$this->lang->execution->menu->story['dropMenu']->story = str_replace('execution|story', 'execution|storykanban', $this->lang->execution->menu->story['dropMenu']->story);
}
}
@@ -1352,7 +1353,7 @@ class executionModel extends model
->beginIF($status == 'undone')->andWhere('t2.status')->notIN('done,closed')->fi()
->beginIF($branch)->andWhere('t1.branch')->eq($branch)->fi()
->beginIF($status != 'all' and $status != 'undone')->andWhere('status')->in($status)->fi()
->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->sprints)->fi()
->beginIF(!$this->app->user->admin and isset($this->app->user->view))->andWhere('t2.id')->in($this->app->user->view->sprints)->fi()
->beginIF(!$withChildren)->andWhere('grade')->eq(1)->fi()
->orderBy('order_desc')
->page($pager)
@@ -1369,7 +1370,7 @@ class executionModel extends model
->beginIF($status == 'undone')->andWhere('status')->notIN('done,closed')->fi()
->beginIF($status != 'all' and $status != 'undone')->andWhere('status')->in($status)->fi()
->beginIF($projectID)->andWhere('project')->eq($projectID)->fi()
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->sprints)->fi()
->beginIF(!$this->app->user->admin and isset($this->app->user->view))->andWhere('id')->in($this->app->user->view->sprints)->fi()
->beginIF(!$withChildren)->andWhere('grade')->eq(1)->fi()
->orderBy('order_desc')
->page($pager)