From 3579538412f7fbd4c8148ce1bd721fa549045c4d Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 19 Mar 2021 10:19:31 +0800 Subject: [PATCH 01/14] * fix error. --- module/search/model.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module/search/model.php b/module/search/model.php index 194c103036..093c0a245c 100644 --- a/module/search/model.php +++ b/module/search/model.php @@ -578,13 +578,13 @@ class searchModel extends model { if(!isset($this->config->objectTables[$record->objectType])) continue; $table = $this->config->objectTables[$record->objectType]; - $executionID = $this->dao->select('execution')->from($table)->where('id')->eq($record->objectID)->fetch('execution'); - $record->url = helper::createLink($module, $method, "id={$record->objectID}", '', false, $executionID); + $projectID = $this->dao->select('project')->from($table)->where('id')->eq($record->objectID)->fetch('project'); + $record->url = helper::createLink($module, $method, "id={$record->objectID}", '', false, $projectID); } elseif($module == 'issue') { - $issue = $this->dao->select('id,execution,owner')->from(TABLE_ISSUE)->where('id')->eq($record->objectID)->fetch(); - $record->url = helper::createLink($module, $method, "id={$record->objectID}", '', false, $issue->execution); + $issue = $this->dao->select('id,project,owner')->from(TABLE_ISSUE)->where('id')->eq($record->objectID)->fetch(); + $record->url = helper::createLink($module, $method, "id={$record->objectID}", '', false, $issue->project); $record->extraType = empty($issue->owner) ? 'commonIssue' : 'stakeholderIssue'; } elseif($module == 'story') From 1c4fcc83a6d59cde199a6046d097a5b9f58aee21 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Mon, 22 Mar 2021 10:45:11 +0800 Subject: [PATCH 02/14] * Modify the build jump problem under the project. --- module/project/view/build.html.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/project/view/build.html.php b/module/project/view/build.html.php index 6ceca83724..0d597f4b4f 100644 --- a/module/project/view/build.html.php +++ b/module/project/view/build.html.php @@ -60,11 +60,11 @@ $builds):?> $build):?> - id"), sprintf('%03d', $build->id));?> + id"), sprintf('%03d', $build->id), '', "data-app='project'");?> productName;?> branchName) echo "{$build->branchName}"?> - createLink('build', 'view', "build=$build->id"), $build->name);?> + createLink('build', 'view', "build=$build->id"), $build->name, '', "data-app='project'");?> executionName;?> scmPath, 'http') === 0 ? html::a($build->scmPath) : $build->scmPath;?> From e742810a1f45dba5af78c21625ba925919ba2dab Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Mon, 22 Mar 2021 10:46:37 +0800 Subject: [PATCH 03/14] * Modify the build jump problem under the project. --- module/bug/control.php | 2 +- module/build/control.php | 29 +++++++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 86eecab27e..d1813cb5c6 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -293,7 +293,7 @@ class bug extends control $extras = str_replace(array(',', ' '), array('&', ''), $extras); parse_str($extras, $output); - if(isset($output['executionID'])) commonModel::setAppObjectID('execution', $output['executionID']); + if(isset($output['executionID'])) commonModel::setMenuVars('execution', $output['executionID']); foreach($output as $paramKey => $paramValue) { diff --git a/module/build/control.php b/module/build/control.php index 64f9e38007..0db63601c0 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -40,15 +40,23 @@ class build extends control if($this->app->openApp == 'project') { + $model = $this->dao->select('model')->from(TABLE_PROJECT)->where('id')->eq($projectID)->fetch('model'); + $this->lang->project->menu = $this->lang->$model->menu; + $this->lang->project->menuOrder = $this->lang->$model->menuOrder; + commonModel::setMenuVars('project', $projectID); + $executions = $this->execution->getPairs($projectID); $executionID = isset($executions[$this->session->executionID]) ? $this->session->executionID : key($executions); $this->session->set('executionID', 0); + $this->session->set('PRJ', $projectID); } elseif($this->app->openApp == 'execution') { $execution = $this->execution->getByID($executionID); $executions = $this->execution->getPairs($execution->project); $this->execution->setMenu($executions, $executionID); + + $this->session->set('PRJ', $execution->project); } $productGroups = $this->execution->getProducts($executionID); @@ -104,6 +112,14 @@ class build extends control $this->loadModel('product'); $build = $this->build->getById((int)$buildID); + if($this->app->openApp == 'project') + { + $model = $this->dao->select('model')->from(TABLE_PROJECT)->where('id')->eq($build->project)->fetch('model'); + $this->lang->project->menu = $this->lang->$model->menu; + $this->lang->project->menuOrder = $this->lang->$model->menuOrder; + commonModel::setMenuVars('project', $build->project); + } + /* Set menu. */ $this->execution->setMenu($this->execution->getPairs($build->project), $build->execution); @@ -165,10 +181,19 @@ class build extends control */ public function view($buildID, $type = 'story', $link = 'false', $param = '', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 100, $pageID = 1) { + $build = $this->build->getByID((int)$buildID, true); if(!$build) die(js::error($this->lang->notFound) . js::locate('back')); $this->session->PRJ = $build->project; + if($this->app->openApp == 'project') + { + $model = $this->dao->select('model')->from(TABLE_PROJECT)->where('id')->eq($build->project)->fetch('model'); + $this->lang->project->menu = $this->lang->$model->menu; + $this->lang->project->menuOrder = $this->lang->$model->menuOrder; + commonModel::setMenuVars('project', $build->project); + } + /* Set session and load modules. */ if($type == 'story')$this->session->set('storyList', $this->app->getURI(true)); if($type == 'bug') $this->session->set('bugList', $this->app->getURI(true)); @@ -200,7 +225,7 @@ class build extends control foreach($stages as $storyID => $stage)$stories[$storyID]->stage = $stage; /* Set menu. */ - commonModel::setAppObjectID('execution', $build->execution); + commonModel::setMenuVars('execution', $build->execution); $executions = $this->loadModel('execution')->getPairs($this->session->PRJ, 'all', 'empty'); $this->view->title = "BUILD #$build->id $build->name - " . $executions[$build->execution]; @@ -551,7 +576,7 @@ class build extends control if($browseType == 'bySearch') { - $allBugs = $this->bug->getBySearch($build->product, $build->branch, $queryID, 'id_desc', $build->bugs, $pager); + $allBugs = $this->bug->getBySearch($build->product, $build->branch, $queryID, 'id_desc', $build->bugs, $pager, $build->project); } else { From 163a736f996746420fd7f5d961606da9d718a56f Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Mon, 22 Mar 2021 10:51:40 +0800 Subject: [PATCH 04/14] * Fix project index error. --- module/block/control.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/block/control.php b/module/block/control.php index 97b8c240ed..76b685e7a1 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -205,16 +205,17 @@ class block extends control * * @param string $module * @param string $type + * @param int $projectID * @access public * @return void */ - public function dashboard($module, $type = '') + public function dashboard($module, $type = '', $projectID = 0) { if($this->loadModel('user')->isLogon()) $this->session->set('blockModule', $module); $blocks = $this->block->getBlockList($module, $type); $commonField = 'common'; - if($module == 'project') + if($module == 'project' and $projectID) { $project = $this->loadModel('project')->getByID($this->session->PRJ); $commonField = $project->model . 'common'; From 935e78dd70157d1f792a42bd85b1477b81ddfb37 Mon Sep 17 00:00:00 2001 From: hufangzhou <746775970@qq.com> Date: Mon, 22 Mar 2021 10:52:11 +0800 Subject: [PATCH 05/14] * Fix an error. --- module/product/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/product/control.php b/module/product/control.php index 28caed261b..89b19f3cb0 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -132,7 +132,7 @@ class product extends control $this->loadModel('execution'); /* Set product, module and query. */ - $productID = $this->app->openApp != 'projectstory' ? $this->product->saveState($productID, $this->products) : $productID; + $productID = $this->app->openApp != 'project' ? $this->product->saveState($productID, $this->products) : $productID; $branch = ($branch === '') ? (int)$this->cookie->preBranch : (int)$branch; setcookie('preProductID', $productID, $this->config->cookieLife, $this->config->webRoot, '', false, true); setcookie('preBranch', (int)$branch, $this->config->cookieLife, $this->config->webRoot, '', false, true); From a66bf2a165d4855cc99e33f3ba65f8775525b3ab Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Mon, 22 Mar 2021 11:03:35 +0800 Subject: [PATCH 06/14] * Fix bug #11260. --- module/project/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/project/config.php b/module/project/config.php index 3e000a43ec..a0892f2c03 100644 --- a/module/project/config.php +++ b/module/project/config.php @@ -69,7 +69,7 @@ $config->project->datatable->fieldList['budget']['required'] = 'yes'; $config->project->datatable->fieldList['teamCount']['title'] = 'teamCount'; $config->project->datatable->fieldList['teamCount']['fixed'] = 'no'; -$config->project->datatable->fieldList['teamCount']['width'] = '40'; +$config->project->datatable->fieldList['teamCount']['width'] = '70'; $config->project->datatable->fieldList['teamCount']['required'] = 'no'; $config->project->datatable->fieldList['teamCount']['sort'] = 'no'; From 9531c783de38691aa9d446625dc535f7d53bcdcf Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 22 Mar 2021 11:04:27 +0800 Subject: [PATCH 07/14] * finish task #36749. --- module/execution/control.php | 3 +- module/execution/model.php | 4 +- .../execution/view/ajaxgetdropmenu.html.php | 46 ++++++++++-------- module/product/view/ajaxgetdropmenu.html.php | 44 ++++++++++------- module/project/view/ajaxgetdropmenu.html.php | 48 +++++++++++-------- 5 files changed, 83 insertions(+), 62 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index d43091bab6..7c1cd7ab8e 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2551,7 +2551,7 @@ class execution extends control * @access public * @return void */ - public function ajaxGetDropMenu($module, $method, $extra) + public function ajaxGetDropMenu($executionID, $module, $method, $extra) { $projects = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->in($this->app->user->view->projects)->andWhere('deleted')->eq(0)->orderBy('order_desc')->fetchAll('id'); @@ -2579,6 +2579,7 @@ class execution extends control $this->view->link = $this->execution->getLink($module, $method, $extra); $this->view->module = $module; $this->view->method = $method; + $this->view->executionID = $executionID; $this->view->extra = $extra; $this->view->projects = $this->project->getPairsByModel(); $this->view->executions = $orderedExecutions; diff --git a/module/execution/model.php b/module/execution/model.php index 7ce583bb40..65a9080a8f 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -139,7 +139,7 @@ class executionModel extends model } } - $dropMenuLink = helper::createLink('execution', 'ajaxGetDropMenu', "module=$currentModule&method=$currentMethod&extra=$extra"); + $dropMenuLink = helper::createLink('execution', 'ajaxGetDropMenu', "executionID=$executionID&module=$currentModule&method=$currentMethod&extra=$extra"); $currentExecutionName = ''; if(isset($currentExecution->name)) $currentExecutionName = $currentExecution->name; @@ -850,7 +850,7 @@ class executionModel extends model $currentExecutionName = $currentExecution->name; } - $dropMenuLink = helper::createLink('execution', 'ajaxGetDropMenu', "module=$currentModule&method=$currentMethod&extra="); + $dropMenuLink = helper::createLink('execution', 'ajaxGetDropMenu', "executionID=$executionID&module=$currentModule&method=$currentMethod&extra="); $output = "
" . html::a(helper::createLink('execution', 'all'), " {$this->lang->execution->common}", '', "class='btn'") . '
'; $output .= "
-
- -
+
+ diff --git a/module/product/view/ajaxgetdropmenu.html.php b/module/product/view/ajaxgetdropmenu.html.php index 45311efea1..6009847aba 100644 --- a/module/product/view/ajaxgetdropmenu.html.php +++ b/module/product/view/ajaxgetdropmenu.html.php @@ -22,43 +22,44 @@ $closedProductsHtml = ''; foreach($products as $product) { + $selected = $product->id == $productID ? 'selected' : ''; $productName = $product->program ? zget($programs, $product->program, '') . '/' : ''; $productName .= $product->line ? zget($lines, $product->line, '') . '/' . $product->name : $product->name; if($product->status == 'normal' and $product->PO == $this->app->user->account) { $objectID = ($product->type != 'platform' && $module == 'branch' && $method == 'manage') ? $productID : $product->id; $linkHtml = $this->product->setParamsForLink($module, $link, $projectID, $product->id); - $myProductsHtml .= html::a($linkHtml, $productName, '', "class='text-important' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$openApp'"); + $myProductsHtml .= html::a($linkHtml, $productName, '', "class='text-important $selected' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$openApp'"); } else if($product->status == 'normal' and !($product->PO == $this->app->user->account)) { $objectID = ($product->type != 'platform' && $module == 'branch' && $method == 'manage') ? $productID : $product->id; $linkHtml = $this->product->setParamsForLink($module, $link, $projectID, $product->id); - $normalProductsHtml .= html::a($linkHtml, $productName, '', "title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$openApp'"); + $normalProductsHtml .= html::a($linkHtml, $productName, '', "class='$selected' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$openApp'"); } else if($product->status == 'closed') { $objectID = ($product->type != 'platform' && $module == 'branch' && $method == 'manage') ? $productID : $product->id; $linkHtml = $this->product->setParamsForLink($module, $link, $projectID, $objectID); - $closedProductsHtml .= html::a($linkHtml, $productName, '', "title='{$productName}' class='closed' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$openApp'"); + $closedProductsHtml .= html::a($linkHtml, $productName, '', "class='$selected' title='{$productName}' class='closed' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$openApp'"); } } ?>
- {$lang->product->mine}
"; - echo $myProductsHtml; - if(!empty($myProductsHtml)) - { - echo "
{$lang->product->other}
"; - } - } - echo $normalProductsHtml; - ?> + {$lang->product->mine}
"; + echo $myProductsHtml; + if(!empty($myProductsHtml)) + { + echo "
{$lang->product->other}
"; + } + } + echo $normalProductsHtml; + ?>
-
- -
+
+ diff --git a/module/project/view/ajaxgetdropmenu.html.php b/module/project/view/ajaxgetdropmenu.html.php index ec39df6304..299cdd5410 100644 --- a/module/project/view/ajaxgetdropmenu.html.php +++ b/module/project/view/ajaxgetdropmenu.html.php @@ -20,34 +20,35 @@ $projectsPinYin = common::convert2Pinyin($projectNames); foreach($projects as $project) { - $link = helper::createLink('project', 'index', "projectID=%s", '', '', $project->id); + $selected = $project->id == $projectID ? 'selected' : ''; + $link = helper::createLink('project', 'index', "projectID=%s", '', '', $project->id); $projectName = zget($programs, $project->parent, '') ? zget($programs, $project->parent) . '/' . $project->name : $project->name; if($project->status != 'done' and $project->status != 'closed' and $project->PM == $this->app->user->account) { - $myProjectsHtml .= html::a(sprintf($link, $project->id), $projectName, '', "class='text-important' title='{$projectName}' data-key='" . zget($projectsPinYin, $projectName, '') . "'"); + $myProjectsHtml .= html::a(sprintf($link, $project->id), $projectName, '', "class='text-important $selected' title='{$projectName}' data-key='" . zget($projectsPinYin, $projectName, '') . "'"); } else if($project->status != 'done' and $project->status != 'closed' and !($project->PM == $this->app->user->account)) { - $normalProjectsHtml .= html::a(sprintf($link, $project->id), $projectName, '', "title='{$projectName}' data-key='" . zget($projectsPinYin, $projectName, '') . "'"); + $normalProjectsHtml .= html::a(sprintf($link, $project->id), $projectName, '', "class='selected' title='{$projectName}' data-key='" . zget($projectsPinYin, $projectName, '') . "'"); } - else if($project->status == 'done' or $project->status == 'closed') $closedProjectsHtml .= html::a(sprintf($link, $project->id), $projectName, '', "title='{$projectName}' data-key='" . zget($projectsPinYin, $projectName, '') . "'"); + else if($project->status == 'done' or $project->status == 'closed') $closedProjectsHtml .= html::a(sprintf($link, $project->id), $projectName, '', "class='$selected' title='{$projectName}' data-key='" . zget($projectsPinYin, $projectName, '') . "'"); } ?>
- {$lang->project->myProject}
"; - echo $myProjectsHtml; - if(!empty($myProjectsHtml)) - { - echo "
{$lang->project->other}
"; - } - } - echo $normalProjectsHtml; - ?> + {$lang->project->myProject}
"; + echo $myProjectsHtml; + if(!empty($myProjectsHtml)) + { + echo "
{$lang->project->other}
"; + } + } + echo $normalProjectsHtml; + ?>
-
- -
+
+ From 80e7cd6aee2a8b7836586386793e7a01b76bf78a Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Mon, 22 Mar 2021 11:10:09 +0800 Subject: [PATCH 08/14] * Hide the option to execution the default landing page. --- module/my/control.php | 2 +- module/my/view/preference.html.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/module/my/control.php b/module/my/control.php index 4205228d1d..642a2d3089 100644 --- a/module/my/control.php +++ b/module/my/control.php @@ -883,7 +883,7 @@ class my extends control $this->view->programLink = isset($this->config->programLink) ? $this->config->programLink : 'program-browse'; $this->view->productLink = isset($this->config->productLink) ? $this->config->productLink : 'product-all'; $this->view->projectLink = isset($this->config->projectLink) ? $this->config->projectLink : 'project-browse'; - $this->view->executionLink = isset($this->config->executionLink) ? $this->config->executionLink : 'execution-task'; + //$this->view->executionLink = isset($this->config->executionLink) ? $this->config->executionLink : 'execution-task'; $this->view->preferenceSetted = isset($this->config->preferenceSetted) ? true : false; $this->display(); diff --git a/module/my/view/preference.html.php b/module/my/view/preference.html.php index 6f6ca08a32..34462f4885 100755 --- a/module/my/view/preference.html.php +++ b/module/my/view/preference.html.php @@ -55,10 +55,12 @@ html,body {height: 100%;} my->projectLinkList, $projectLink, "class='form-control chosen'");?> + From a81bfd39785e411ba1d4b6497e2c93c0860b4caf Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 22 Mar 2021 11:22:34 +0800 Subject: [PATCH 09/14] * fix bug. --- module/execution/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index c73b881786..a403a2761c 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -2444,8 +2444,8 @@ class executionModel extends model ->andWhere('t2.deleted')->eq(0) ->andWhere('t2.status')->ne('closed') ->andWhere('t2.stage')->in('wait,planned,executioned,developing') - ->groupBy('execution') - ->fetchAll('execution'); + ->groupBy('project') + ->fetchAll('project'); foreach($burns as $executionID => $burn) { From 3f56363e96255f66ae73e02119d217c840ede7d9 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Mon, 22 Mar 2021 11:28:54 +0800 Subject: [PATCH 10/14] * Fix bug #11421. --- module/project/view/build.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/project/view/build.html.php b/module/project/view/build.html.php index 0d597f4b4f..388b786cc3 100644 --- a/module/project/view/build.html.php +++ b/module/project/view/build.html.php @@ -79,7 +79,7 @@ } common::printIcon('testtask', 'create', "product=$build->product&executionID={$build->execution}&build=$build->id&projectID=$projectID", $build, 'list', 'bullhorn', '', '', '', "data-app='execution'"); $lang->project->bug = $lang->execution->viewBug; - common::printIcon('execution', 'bug', "project={$build->execution}&orderBy=status&build=$build->id", $build, 'list', '', '', '', '', "data-app='execution'"); + common::printIcon('build', 'view', "buildID=$build->id&type=generatedBug", $build, 'list', 'bug', '', '', '', "data-app='project'"); common::printIcon('build', 'edit', "buildID=$build->id", $build, 'list'); if(common::hasPriv('build', 'delete', $build)) { From 3dee710bbaad6c160c2c51d1fc7053bc1ea8c3dc Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 22 Mar 2021 11:36:33 +0800 Subject: [PATCH 11/14] * fix merege error. --- module/common/lang/en.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/module/common/lang/en.php b/module/common/lang/en.php index 6dfa66f140..1d2cd379eb 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -863,17 +863,10 @@ $lang->icons['score'] = 'tint'; /* Scrum menu. */ $lang->menu = new stdclass(); $lang->menu->scrum = new stdclass(); -<<<<<<< Updated upstream -$lang->menu->scrum->index = 'Index|project|index|project={PROJECT}'; -$lang->menu->scrum->project = "$lang->executionCommon|project|index|locate=no"; -$lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|projectstory|story|', 'subModule' => 'story', 'alias' => 'story,track'); -$lang->menu->scrum->doc = 'Doc|doc|index|'; -======= $lang->menu->scrum->index = 'Index|project|index|project=%s'; $lang->menu->scrum->project = array('link' => "$lang->executionCommon|project|index|locate=no"); $lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|projectstory|story|project=%s', 'subModule' => 'story', 'alias' => 'story,track'); $lang->menu->scrum->doc = array('link' => 'Doc|doc|objectLibs|type=project&objectID=%s', 'subModule' => 'doc'); ->>>>>>> Stashed changes $lang->menu->scrum->qa = 'QA|qa|index'; $lang->menu->scrum->ci = 'Code|repo|browse'; $lang->menu->scrum->build = array('link' => 'Build|project|build|project=%s'); From deae7f5f9d98664b3e3bc864c33ede59bdd227f5 Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Mon, 22 Mar 2021 11:37:11 +0800 Subject: [PATCH 12/14] * Fix bug #11254. --- module/block/view/projectblock.html.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/block/view/projectblock.html.php b/module/block/view/projectblock.html.php index 8d80bab6bf..93862595ea 100644 --- a/module/block/view/projectblock.html.php +++ b/module/block/view/projectblock.html.php @@ -10,10 +10,10 @@ project->name;?> - program->PM;?> - program->status;?> + program->PM;?> + program->status;?> - program->teamCount;?> + program->teamCount;?> task->consumed;?> program->budget;?> project->leftStories;?> From 8f1f42f0c103c9978386de13ed5e72f0a88702ce Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 22 Mar 2021 11:40:00 +0800 Subject: [PATCH 13/14] * fix error. --- module/project/view/ajaxgetdropmenu.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/project/view/ajaxgetdropmenu.html.php b/module/project/view/ajaxgetdropmenu.html.php index 1b02ff79ba..9336ed065a 100644 --- a/module/project/view/ajaxgetdropmenu.html.php +++ b/module/project/view/ajaxgetdropmenu.html.php @@ -29,7 +29,7 @@ foreach($projects as $project) } else if($project->status != 'done' and $project->status != 'closed' and !($project->PM == $this->app->user->account)) { - $normalProjectsHtml .= html::a(sprintf($link, $project->id), $projectName, '', "class='selected' title='{$projectName}' data-key='" . zget($projectsPinYin, $projectName, '') . "'"); + $normalProjectsHtml .= html::a(sprintf($link, $project->id), $projectName, '', "class='$selected' title='{$projectName}' data-key='" . zget($projectsPinYin, $projectName, '') . "'"); } else if($project->status == 'done' or $project->status == 'closed') $closedProjectsHtml .= html::a(sprintf($link, $project->id), $projectName, '', "class='$selected' title='{$projectName}' data-key='" . zget($projectsPinYin, $projectName, '') . "'"); } From f9ec1f84fb948de913e566acc0a41561077ae3a5 Mon Sep 17 00:00:00 2001 From: leiyong <1549684884@qq.com> Date: Mon, 22 Mar 2021 11:42:12 +0800 Subject: [PATCH 14/14] * Fix bug. --- module/action/control.php | 24 +++++++++++++----------- module/action/lang/zh-cn.php | 5 +++-- module/action/model.php | 2 +- module/action/view/trash.html.php | 7 +++---- module/execution/control.php | 4 ++-- module/program/control.php | 4 ++-- module/project/control.php | 21 +++++++++++++++------ module/project/lang/zh-cn.php | 1 + module/project/view/view.html.php | 5 +++-- module/story/view/view.html.php | 2 +- 10 files changed, 44 insertions(+), 31 deletions(-) diff --git a/module/action/control.php b/module/action/control.php index 2d67b28ee0..6220eac8c6 100755 --- a/module/action/control.php +++ b/module/action/control.php @@ -28,17 +28,19 @@ class action extends control /* Save session. */ $uri = $this->app->getURI(true); - $this->session->set('productList', $uri); - $this->session->set('productPlanList', $uri); - $this->session->set('releaseList', $uri); - $this->session->set('storyList', $uri); - $this->session->set('projectList', $uri); - $this->session->set('taskList', $uri); - $this->session->set('buildList', $uri); - $this->session->set('bugList', $uri); - $this->session->set('caseList', $uri); - $this->session->set('testtaskList', $uri); - $this->session->set('docList', $uri); + $this->session->set('productList', $uri, 'product'); + $this->session->set('productPlanList', $uri, 'product'); + $this->session->set('storyList', $uri, 'product'); + $this->session->set('releaseList', $uri, 'execution'); + $this->session->set('programList', $uri, 'program'); + $this->session->set('projectList', $uri, 'project'); + $this->session->set('executionList', $uri, 'execution'); + $this->session->set('taskList', $uri, 'execution'); + $this->session->set('buildList', $uri, 'execution'); + $this->session->set('bugList', $uri, 'qa'); + $this->session->set('caseList', $uri, 'qa'); + $this->session->set('testtaskList', $uri, 'qa'); + $this->session->set('docList', $uri, 'doc'); /* Get deleted objects. */ $this->app->loadClass('pager', $static = true); diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php index 79b3a7443b..e87f3f5f70 100755 --- a/module/action/lang/zh-cn.php +++ b/module/action/lang/zh-cn.php @@ -9,6 +9,8 @@ * @version $Id: zh-cn.php 4955 2013-07-02 01:47:21Z chencongzhi520@gmail.com $ * @link http://www.zentao.net */ +global $config; + $lang->action->common = '系统日志'; $lang->action->product = $lang->productCommon; $lang->action->project = '项目'; @@ -73,7 +75,7 @@ $lang->action->objectTypes['productplan'] = '计划'; $lang->action->objectTypes['release'] = '发布'; $lang->action->objectTypes['program'] = '项目集'; $lang->action->objectTypes['project'] = '项目'; -$lang->action->objectTypes['execution'] = $lang->executionCommon; +$lang->action->objectTypes['execution'] = $config->systemMode == 'new' ? '执行' : $lang->executionCommon; $lang->action->objectTypes['task'] = '任务'; $lang->action->objectTypes['build'] = '版本'; $lang->action->objectTypes['job'] = '构建'; @@ -427,7 +429,6 @@ $lang->action->dynamicAction->entry['created'] = '添加应用'; $lang->action->dynamicAction->entry['edited'] = '编辑应用'; /* 用来生成相应对象的链接。*/ -global $config; $lang->action->label->product = $lang->productCommon . '|product|view|productID=%s'; $lang->action->label->productplan = "计划|productplan|view|productID=%s"; $lang->action->label->release = '发布|release|view|productID=%s'; diff --git a/module/action/model.php b/module/action/model.php index ed30c6d03b..40a2f8e63b 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -501,7 +501,7 @@ class actionModel extends model foreach($typeTrashes as $objectType => $objectIds) { - if(!isset($this->config->objectTables[$objectType]))continue; + if(!isset($this->config->objectTables[$objectType])) continue; $objectIds = array_unique($objectIds); $table = $this->config->objectTables[$objectType]; diff --git a/module/action/view/trash.html.php b/module/action/view/trash.html.php index 9f41580d6d..918bd224d7 100755 --- a/module/action/view/trash.html.php +++ b/module/action/view/trash.html.php @@ -12,7 +12,6 @@ ?>