From 6057c36ce5a5ec083423b82b905458111495bf1a Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Thu, 2 Dec 2021 14:12:17 +0800 Subject: [PATCH 01/15] * Add judgment on null parameters. --- module/tree/model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/tree/model.php b/module/tree/model.php index 016f0eeba5..0f50c26af8 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -123,6 +123,7 @@ class treeModel extends model */ public function getOptionMenu($rootID, $type = 'story', $startModule = 0, $branch = 0) { + if(empty($branch)) $branch = 0; if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getModulePairs(); /* If type of $branch is array, get modules of these branches. */ From 42a5e9bf782095050ef7bdc2f50bfbb3ba451e69 Mon Sep 17 00:00:00 2001 From: zenggang Date: Thu, 2 Dec 2021 09:32:45 +0000 Subject: [PATCH 02/15] * Fix bug#16884,16856 --- module/gitlab/css/managegroupmembers.css | 1 + module/gitlab/css/manageprojectmembers.css | 1 + module/mr/control.php | 3 +-- module/mr/js/view.js | 2 +- module/mr/view/view.html.php | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 module/gitlab/css/managegroupmembers.css create mode 100644 module/gitlab/css/manageprojectmembers.css diff --git a/module/gitlab/css/managegroupmembers.css b/module/gitlab/css/managegroupmembers.css new file mode 100644 index 0000000000..0d940091ae --- /dev/null +++ b/module/gitlab/css/managegroupmembers.css @@ -0,0 +1 @@ +.table-form {min-width: 600px;} diff --git a/module/gitlab/css/manageprojectmembers.css b/module/gitlab/css/manageprojectmembers.css new file mode 100644 index 0000000000..0d940091ae --- /dev/null +++ b/module/gitlab/css/manageprojectmembers.css @@ -0,0 +1 @@ +.table-form {min-width: 600px;} diff --git a/module/mr/control.php b/module/mr/control.php index 9e484e791d..aba3903a58 100644 --- a/module/mr/control.php +++ b/module/mr/control.php @@ -402,8 +402,7 @@ class mr extends control $MR = $this->mr->getByID($MRID); $result = $this->mr->close($MR); - if($result['result'] == 'fali') return $this->send($result); - die(js::locate($result['locate'], 'parent')); + return $this->send($result); } /** diff --git a/module/mr/js/view.js b/module/mr/js/view.js index f75fc67687..a6433ab5d2 100644 --- a/module/mr/js/view.js +++ b/module/mr/js/view.js @@ -1,6 +1,6 @@ $(document).ready(function() { - $('#mergeButton').click(function() + $('#mergeButton,.mergeButton').click(function() { link = $(this).attr('href'); $.getJSON(link, function(response) diff --git a/module/mr/view/view.html.php b/module/mr/view/view.html.php index 7b1b1f5a3e..62b842c95e 100644 --- a/module/mr/view/view.html.php +++ b/module/mr/view/view.html.php @@ -111,7 +111,7 @@ id&action=approve", '', true), ' ' . $lang->mr->approve, '', "id='mergeButton' class='btn iframe showinonlybody'"); ?> id&action=reject", '', true), ' ' . $lang->mr->reject, '', "id='mergeButton' class='btn iframe showinonlybody'" . ($MR->approvalStatus == 'rejected' ? 'disabled' : '')); ?> - id", $MR, 'button', 'off', 'hiddenwin');?> + id"), ' ' . $lang->mr->close, '', "class='btn mergeButton'"); ?> id"), ' ' . str_replace($lang->mr->common, '', $lang->mr->edit), '', "id='mergeButton' class='btn'"); ?> state == 'closed') echo html::a(inlink('reopen', "mr=$MR->id"), ' ' . $lang->mr->reopen, '', "id='mergeButton' class='btn'"); ?> From 346b0cf9e20169e422ded1959478d005c041b582 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Fri, 3 Dec 2021 09:35:36 +0800 Subject: [PATCH 03/15] * Finish task#45015. --- module/execution/model.php | 4 ++++ module/product/model.php | 4 ++++ module/testreport/control.php | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/module/execution/model.php b/module/execution/model.php index d59a6b7c6e..49003345ce 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1374,6 +1374,10 @@ class executionModel extends model { $link = helper::createLink($module, 'browse', "executionID=%s&from=execution"); } + elseif($module == 'testreport' and $method == 'create') + { + $link = helper::createLink('execution', 'testtask', "executionID=%s"); + } else { $link = helper::createLink($module, $method, "executionID=%s"); diff --git a/module/product/model.php b/module/product/model.php index 0f3bef5504..8d7adf489d 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -1987,6 +1987,10 @@ class productModel extends model $projectID = isset($output['projectID']) ? $output['projectID'] : 0; $link = helper::createLink($module, $method, "productID=%s&branch=" . ($branch ? "%s" : '') . "&groupBy=&projectID=$projectID") . "#app=project"; } + elseif($module == 'testreport' and $method == 'create') + { + $link = helper::createLink($module, $method, "objectID=&objectType=testtask&extra=%s"); + } else { $link = helper::createLink($module, $method, "productID=%s" . ($branch ? "&branch=%s" : '')); diff --git a/module/testreport/control.php b/module/testreport/control.php index b5ce1cfbe5..5f3a9164c2 100644 --- a/module/testreport/control.php +++ b/module/testreport/control.php @@ -189,7 +189,7 @@ class testreport extends control $taskPairs = array(); $scopeAndStatus[0] = 'local'; $scopeAndStatus[1] = 'totalStatus'; - $tasks = $this->testtask->getProductTasks($productID, $task->branch, 'id_desc', null, $scopeAndStatus); + $tasks = $this->testtask->getProductTasks($productID, empty($objectID) ? 0 : $task->branch, 'id_desc', null, $scopeAndStatus); foreach($tasks as $testTask) { if($testTask->build == 'trunk') continue; From e61c87a6ff5eec739961f6bb6d3f181f404508d1 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Fri, 3 Dec 2021 10:49:42 +0800 Subject: [PATCH 04/15] * Code for task#45015. --- module/product/model.php | 6 ++++-- module/tree/model.php | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/module/product/model.php b/module/product/model.php index 8d7adf489d..a55a764c7b 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -1987,9 +1987,11 @@ class productModel extends model $projectID = isset($output['projectID']) ? $output['projectID'] : 0; $link = helper::createLink($module, $method, "productID=%s&branch=" . ($branch ? "%s" : '') . "&groupBy=&projectID=$projectID") . "#app=project"; } - elseif($module == 'testreport' and $method == 'create') + elseif($module == 'testreport' and ($method == 'create' or $method == 'edit')) { - $link = helper::createLink($module, $method, "objectID=&objectType=testtask&extra=%s"); + $vars = $method == 'edit' ? "objectID=%s" : "objectID=&objectType=testtask&extra=%s"; + $method = $method == 'edit' ? 'browse' : $method; + $link = helper::createLink($module, $method, $vars); } else { diff --git a/module/tree/model.php b/module/tree/model.php index 016f0eeba5..29bacd8e9e 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -114,10 +114,10 @@ class treeModel extends model /** * Create an option menu in html. * - * @param int $rootID - * @param string $type - * @param int $startModule - * @param int $branch + * @param int $rootID + * @param string $type + * @param int $startModule + * @param int|array $branch * @access public * @return string */ From f619cf0341ebd821ee01d877920d64d47542ef7a Mon Sep 17 00:00:00 2001 From: zenggang Date: Fri, 3 Dec 2021 03:09:37 +0000 Subject: [PATCH 05/15] * Adjust mr view button --- module/mr/view/view.html.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/module/mr/view/view.html.php b/module/mr/view/view.html.php index 62b842c95e..54667871b7 100644 --- a/module/mr/view/view.html.php +++ b/module/mr/view/view.html.php @@ -103,18 +103,18 @@
approvalStatus != 'approved' or ($MR->compileID !=0 and $MR->compileStatus != 'success')) ? ' disabled' : ''; ?> - state == 'opened' and !$rawMR->has_conflicts) echo html::a(inlink('accept', "mr=$MR->id"), ' ' . $lang->mr->acceptMR, '', "id='mergeButton' class='btn' $acceptDisabled"); ?> + state == 'opened' and !$rawMR->has_conflicts) common::printIcon('mr', 'accept', "mr=$MR->id", $MR, 'button', 'flow', 'hiddenwin', 'mergeButton btn', false, $acceptDisabled, $lang->mr->acceptMR);?> state == 'opened'): ?> has_conflicts or ($MR->compileID !=0 and $MR->compileStatus != 'success') or $MR->approvalStatus == 'approved'):?> - id&action=approve", '', true), ' ' . $lang->mr->approve, '', "id='mergeButton' class='btn iframe showinonlybody' disabled"); ?> + id&action=approve", $MR, 'button', 'ok', 'hiddenwin', 'mergeButton', true, 'disabled', $lang->mr->approve);?> - id&action=approve", '', true), ' ' . $lang->mr->approve, '', "id='mergeButton' class='btn iframe showinonlybody'"); ?> + id&action=approve", $MR, 'button', 'ok', 'hiddenwin', 'mergeButton btn iframe showinonlybody', true, '', $lang->mr->approve);?> - id&action=reject", '', true), ' ' . $lang->mr->reject, '', "id='mergeButton' class='btn iframe showinonlybody'" . ($MR->approvalStatus == 'rejected' ? 'disabled' : '')); ?> - id"), ' ' . $lang->mr->close, '', "class='btn mergeButton'"); ?> - id"), ' ' . str_replace($lang->mr->common, '', $lang->mr->edit), '', "id='mergeButton' class='btn'"); ?> + id&action=reject", $MR, 'button', 'bug', 'hiddenwin', 'mergeButton btn iframe showinonlybody', true, ($MR->approvalStatus == 'rejected' ? 'disabled' : ''), $lang->mr->reject);?> + id", $MR, 'button', 'off', 'hiddenwin', 'mergeButton');?> + id", $MR, 'button', 'edit');?> - state == 'closed') echo html::a(inlink('reopen', "mr=$MR->id"), ' ' . $lang->mr->reopen, '', "id='mergeButton' class='btn'"); ?> + state == 'closed') common::printIcon('mr', 'reopen', "mr=$MR->id", $MR, 'button', 'restart', 'hiddenwin', 'mergeButton'); ?> id", $MR, 'button', 'trash', 'hiddenwin');?>
From 5d5045a4ddd44db6095d33b7549437de5b746256 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Fri, 3 Dec 2021 12:30:30 +0800 Subject: [PATCH 06/15] * Adjust code for import form lib. --- module/testcase/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/testcase/control.php b/module/testcase/control.php index e9c4568599..7e9fac1f3b 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -1778,7 +1778,7 @@ class testcase extends control $this->view->productID = $productID; $this->view->branch = $branch; $this->view->cases = $this->loadModel('testsuite')->getNotImportedCases($productID, $libID, $orderBy, $pager, $browseType, $queryID); - $this->view->modules = $this->loadModel('tree')->getOptionMenu($productID, 'case', 0, $branch); + $this->view->modules = $this->loadModel('tree')->getOptionMenu($productID, 'case', 0, (int)$branch); $this->view->libModules = $this->tree->getOptionMenu($libID, 'caselib'); $this->view->pager = $pager; $this->view->orderBy = $orderBy; From 47f1099039df293e16938f5a6516d4c3fcb42fb2 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Fri, 3 Dec 2021 13:09:22 +0800 Subject: [PATCH 07/15] * Fix bug#17061. --- module/testcase/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/testcase/control.php b/module/testcase/control.php index 096ddb77d9..cf16ddad92 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -1840,7 +1840,7 @@ class testcase extends control $caseLang = $this->lang->testcase; $caseConfig = $this->config->testcase; $branches = $this->loadModel('branch')->getPairs($productID); - $modules = $this->loadModel('tree')->getOptionMenu($productID, 'case', 0, empty(array_keys($branches)) ? 0 : array_keys($branches)); + $modules = $this->loadModel('tree')->getOptionMenu($productID, 'case', 0, empty($branches) ? 0 : array_keys($branches)); $stories = $this->loadModel('story')->getProductStoryPairs($productID, $branch); $fields = $this->testcase->getImportFields($productID); $fields = array_flip($fields); From e76a988bbe14c43a1d1bfed1a0724d529a0908d2 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Fri, 3 Dec 2021 13:25:51 +0800 Subject: [PATCH 08/15] * Fix bug #17065. --- module/testcase/model.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/module/testcase/model.php b/module/testcase/model.php index d622bca03d..b6d0896748 100644 --- a/module/testcase/model.php +++ b/module/testcase/model.php @@ -231,10 +231,13 @@ class testcaseModel extends model */ public function getModuleCases($productID, $branch = 0, $moduleIdList = 0, $orderBy = 'id_desc', $pager = null, $browseType = '', $auto = 'no') { - 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->app->tab == 'project')->andWhere('t1.project')->eq($this->session->project)->fi() + $stmt = $this->dao->select('t1.*, t2.title as storyTitle')->from(TABLE_CASE)->alias('t1') + ->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story=t2.id'); + + if($this->app->tab == 'project') $stmt = $stmt->leftJoin(TABLE_PROJECTCASE)->alias('t3')->on('t1.id=t3.case'); + + return $stmt ->where('t1.product')->eq((int)$productID) + ->beginIF($this->app->tab == 'project')->andWhere('t3.project')->eq($this->session->project)->fi() ->beginIF($branch !== 'all')->andWhere('t1.branch')->eq($branch)->fi() ->beginIF($moduleIdList)->andWhere('t1.module')->in($moduleIdList)->fi() ->beginIF($browseType == 'wait')->andWhere('t1.status')->eq($browseType)->fi() From 9cf38e4ff884cd345409590676be1d83edd9b025 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A1=E6=A0=8B?= Date: Fri, 3 Dec 2021 13:53:50 +0800 Subject: [PATCH 09/15] * adjust for projectOverview. --- module/report/model.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/module/report/model.php b/module/report/model.php index 7dfc100dac..bcfda09e5f 100644 --- a/module/report/model.php +++ b/module/report/model.php @@ -382,10 +382,10 @@ class reportModel extends model { if(isset($parents[$task->id])) continue; - $project[$task->projectname]['projectID'] = isset($project[$task->projectname]['projectID']) ? $project[$task->projectname]['projectID'] : $task->project; - $project[$task->projectname]['execution'][$task->executionName]['executionID'] = isset($project[$task->projectname]['execution'][$task->executionName]['executionID']) ? $project[$task->projectname]['execution'][$task->executionName]['executionID'] : $task->execution; - $project[$task->projectname]['execution'][$task->executionName]['count'] = isset($project[$task->projectname]['execution'][$task->executionName]['count']) ? $project[$task->projectname]['execution'][$task->executionName]['count'] + 1 : 1; - $project[$task->projectname]['execution'][$task->executionName]['manhour'] = isset($project[$task->projectname]['execution'][$task->executionName]['manhour']) ? $project[$task->projectname]['execution'][$task->executionName]['manhour'] + $task->left : $task->left; + $project[$task->projectname]['projectID'] = isset($project[$task->projectname]['projectID']) ? $project[$task->projectname]['projectID'] : $task->project; + $project[$task->projectname]['execution'][$task->executionName]['executionID'] = isset($project[$task->projectname]['execution'][$task->executionName]['executionID']) ? $project[$task->projectname]['execution'][$task->executionName]['executionID'] : $task->execution; + $project[$task->projectname]['execution'][$task->executionName]['count'] = isset($project[$task->projectname]['execution'][$task->executionName]['count']) ? $project[$task->projectname]['execution'][$task->executionName]['count'] + 1 : 1; + $project[$task->projectname]['execution'][$task->executionName]['manhour'] = isset($project[$task->projectname]['execution'][$task->executionName]['manhour']) ? $project[$task->projectname]['execution'][$task->executionName]['manhour'] + $task->left : $task->left; $workload[$user]['total']['count'] = isset($workload[$user]['total']['count']) ? $workload[$user]['total']['count'] + 1 : 1; $workload[$user]['total']['manhour'] = isset($workload[$user]['total']['manhour']) ? $workload[$user]['total']['manhour'] + $task->left : $task->left; @@ -1059,8 +1059,10 @@ class reportModel extends model public function getProjectStatusOverview($accounts = array()) { $projectStatus = $this->dao->select('t1.id,t1.status')->from(TABLE_PROJECT)->alias('t1') - ->leftJoin(TABLE_TEAM)->alias('t2')->on("t1.id=t2.root && t2.type='project'") + ->leftJoin(TABLE_TEAM)->alias('t2')->on("t1.id=t2.root") ->where('t1.type')->in($this->config->systemMode == 'classic' ? 'sprint,stage' : 'project') + ->beginIF($this->config->systemMode == 'classic')->andWhere('t2.type')->eq('execution')->fi() + ->beginIF($this->config->systemMode == 'new')->andWhere('t2.type')->eq('project')->fi() ->beginIF(!empty($accounts))->andWhere('t2.account')->in($accounts)->fi() ->fetchPairs('id', 'status'); From d5f6181ea3b59b3e4cbf9d4685c119e4690f1c30 Mon Sep 17 00:00:00 2001 From: zhengrunyu Date: Fri, 3 Dec 2021 13:53:53 +0800 Subject: [PATCH 10/15] *Fixbug 17066. --- module/task/css/view.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/task/css/view.css b/module/task/css/view.css index e3b77998b9..e605f6862d 100644 --- a/module/task/css/view.css +++ b/module/task/css/view.css @@ -1,3 +1,5 @@ .side-col .cell {padding: 0px;} .side-col #legendProjectAndTask .list-unstyled {padding: 10px; border: 1px solid #ddd; border-top: 0px; margin: 0px;} .tab-pane table {border: 1px solid #ddd; border-top: none;} +.page-title{max-width: 80%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;} +.pull-left{max-width: 80%;} From a944ec7ccdc33d59840ae843a7e92ac67a320fb2 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Fri, 3 Dec 2021 14:46:12 +0800 Subject: [PATCH 11/15] * Fix bug#17075. --- module/bug/js/common.js | 2 +- module/build/control.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/module/bug/js/common.js b/module/bug/js/common.js index b3db94683d..a4e7a32948 100644 --- a/module/bug/js/common.js +++ b/module/bug/js/common.js @@ -629,7 +629,7 @@ function notice() productID = $('#product').val(); projectID = $('#project').val(); link = createLink('build', 'create','executionID=' + executionID + '&productID=' + productID + '&projectID=' + projectID); - link += config.requestType == 'GET' ? '&onlybody=yes' : '?onlybody=yes'; + if(config.onlybody != 'yes') link += config.requestType == 'GET' ? '&onlybody=yes' : '?onlybody=yes'; html += '' + createBuild + ' '; html += '' + refresh + ''; } diff --git a/module/build/control.php b/module/build/control.php index d422615cb4..707bedd53f 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -44,6 +44,7 @@ class build extends control } /* Set menu. */ + $executions = array(); if($this->app->tab == 'project') { $this->loadModel('project')->setMenu($projectID); @@ -64,7 +65,7 @@ class build extends control $executions = $this->execution->getPairs($execution->project); } - $executionList = $this->execution->getByIdList(array_keys($executions)); + $executionList = empty($executions) ? array() : $this->execution->getByIdList(array_keys($executions)); foreach($executionList as $execution) { if($execution->lifetime == 'ops') unset($executions[$execution->id]); From 7248447ed72f6e5a62582156968edfce0358a91e Mon Sep 17 00:00:00 2001 From: zenggang Date: Fri, 3 Dec 2021 06:59:44 +0000 Subject: [PATCH 12/15] * Fix bug#16786,16981 --- module/gitlab/lang/en.php | 1 + module/gitlab/lang/zh-cn.php | 1 + module/gitlab/view/binduser.html.php | 14 ++++++++++++-- module/mr/view/browse.html.php | 6 ++++-- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/module/gitlab/lang/en.php b/module/gitlab/lang/en.php index 75fb0e0dd1..4ec1cdea56 100644 --- a/module/gitlab/lang/en.php +++ b/module/gitlab/lang/en.php @@ -16,6 +16,7 @@ $lang->gitlab->gitlabAccount = 'GitLab Account'; $lang->gitlab->zentaoAccount = 'Zentao Account'; $lang->gitlab->bindingStatus = 'Binding Status'; $lang->gitlab->binded = 'Binded'; +$lang->gitlab->bindedError = 'The bound user has been deleted or modified. Please bind again.'; $lang->gitlab->serverFail = 'Connect to GitLab server failed, please check the GitLab server.'; $lang->gitlab->lastUpdate = 'Last Update'; $lang->gitlab->confirmAddWebhook = 'Are you sure about creating Webhook?'; diff --git a/module/gitlab/lang/zh-cn.php b/module/gitlab/lang/zh-cn.php index 940581f9f6..d911572925 100644 --- a/module/gitlab/lang/zh-cn.php +++ b/module/gitlab/lang/zh-cn.php @@ -16,6 +16,7 @@ $lang->gitlab->gitlabAccount = 'GitLab用户'; $lang->gitlab->zentaoAccount = '禅道用户'; $lang->gitlab->bindingStatus = '绑定状态'; $lang->gitlab->binded = '已绑定'; +$lang->gitlab->bindedError = '绑定的用户已删除或者已修改,请重新绑定'; $lang->gitlab->serverFail = '连接GitLab服务器异常,请检查GitLab服务器。'; $lang->gitlab->lastUpdate = '最后更新'; $lang->gitlab->confirmAddWebhook = '您确定创建Webhook吗?'; diff --git a/module/gitlab/view/binduser.html.php b/module/gitlab/view/binduser.html.php index 8a87c6cf4a..c328dcf78b 100644 --- a/module/gitlab/view/binduser.html.php +++ b/module/gitlab/view/binduser.html.php @@ -22,7 +22,7 @@ gitlab->gitlabAccount;?> gitlab->zentaoAccount;?> - gitlab->bindingStatus;?> + gitlab->bindingStatus;?> @@ -49,7 +49,17 @@ account . " <" . $gitlabUser->email . ">";?> id]", $userPairs, $gitlabUser->zentaoAccount, "class='form-control select chosen'" );?> - zentaoAccount]) ? $lang->gitlab->binded : ""; ?> + + zentaoAccount])):?> + zentaoAccount, ''))):?> + gitlab->binded;?> + + ' . $lang->gitlab->bindedError . '';?> + + + + + diff --git a/module/mr/view/browse.html.php b/module/mr/view/browse.html.php index 557bbe03d7..65dc8c834c 100644 --- a/module/mr/view/browse.html.php +++ b/module/mr/view/browse.html.php @@ -64,11 +64,13 @@ + sourceProject])) $projects[$MR->sourceProject] = $this->loadModel('gitlab')->apiGetSingleProject($MR->gitlabID, $MR->sourceProject); ?> + targetProject])) $projects[$MR->targetProject] = $this->loadModel('gitlab')->apiGetSingleProject($MR->gitlabID, $MR->targetProject); ?> id;?> id}"), $MR->title);?> - loadModel('gitlab')->apiGetSingleProject($MR->gitlabID, $MR->sourceProject)->name_with_namespace . ':' . $MR->sourceBranch;?> - loadModel('gitlab')->apiGetSingleProject($MR->gitlabID, $MR->targetProject)->name_with_namespace . ':' . $MR->targetBranch;?> + sourceBranch;?>'>sourceProject]->name_with_namespace . ':' . $MR->sourceBranch;?> + targetBranch;?>'>targetProject]->name_with_namespace . ':' . $MR->targetBranch;?> status == 'closed'):?> mr->statusList, $MR->status);?> From 303ecdf5c81b3c573b5585a2a1ad9860e679bb31 Mon Sep 17 00:00:00 2001 From: zenggang Date: Fri, 3 Dec 2021 07:40:08 +0000 Subject: [PATCH 13/15] * Adjust code stye --- module/gitlab/view/binduser.html.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/module/gitlab/view/binduser.html.php b/module/gitlab/view/binduser.html.php index c328dcf78b..3838da693e 100644 --- a/module/gitlab/view/binduser.html.php +++ b/module/gitlab/view/binduser.html.php @@ -51,13 +51,11 @@ id]", $userPairs, $gitlabUser->zentaoAccount, "class='form-control select chosen'" );?> zentaoAccount])):?> - zentaoAccount, ''))):?> - gitlab->binded;?> - - ' . $lang->gitlab->bindedError . '';?> - + zentaoAccount, ''))):?> + gitlab->binded;?> - + ' . $lang->gitlab->bindedError . '';?> + From c16478c5d028aa6b013b346bf5afe43da9ab4168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A1=E6=A0=8B?= Date: Fri, 3 Dec 2021 15:47:39 +0800 Subject: [PATCH 14/15] * fix for upgrade from lower version. --- module/user/model.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/module/user/model.php b/module/user/model.php index 382b1f592d..2b1661f103 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -969,8 +969,12 @@ class userModel extends model } /* Get can manage projects by user. */ - $projectAdminGroupID = $this->dao->select('id')->from(TABLE_GROUP)->where('role')->eq('projectAdmin')->fetch('id'); - $canManageProjects = $this->dao->select('project')->from(TABLE_USERGROUP)->where('`group`')->eq($projectAdminGroupID)->andWhere('account')->eq($account)->fetch('project'); + $canManageProjects = array(); + if(!defined('IN_UPGRADE')) + { + $projectAdminGroupID = $this->dao->select('id')->from(TABLE_GROUP)->where('role')->eq('projectAdmin')->fetch('id'); + $canManageProjects = $this->dao->select('project')->from(TABLE_USERGROUP)->where('`group`')->eq($projectAdminGroupID)->andWhere('account')->eq($account)->fetch('project'); + } return array('rights' => $rights, 'acls' => $acls, 'projects' => $canManageProjects); } From 2b50a60ddc61ddbdf0609c507504f9b806cab5e9 Mon Sep 17 00:00:00 2001 From: zenggang Date: Fri, 3 Dec 2021 09:36:33 +0000 Subject: [PATCH 15/15] * Adjust code style --- module/gitlab/view/binduser.html.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/module/gitlab/view/binduser.html.php b/module/gitlab/view/binduser.html.php index 3838da693e..107697b1e2 100644 --- a/module/gitlab/view/binduser.html.php +++ b/module/gitlab/view/binduser.html.php @@ -37,11 +37,11 @@ id]", $userPairs, '', "class='form-control select chosen'" );?> - - - - zentaoAccount)) continue;?> - + + + + zentaoAccount)) continue;?> + avatar, "height=40");?> realname;?> @@ -58,8 +58,8 @@ - - + +