testcase->common . $lang->colon . $lang->testcase->batchEdit;?>

From ce5044b2a5c0fad306a525525c9785110b65a32a Mon Sep 17 00:00:00 2001 From: sunjun Date: Mon, 11 Apr 2022 14:53:31 +0800 Subject: [PATCH 03/25] *Fixbug_sunjun_21618 --- module/testcase/js/batchedit.js | 1 - 1 file changed, 1 deletion(-) diff --git a/module/testcase/js/batchedit.js b/module/testcase/js/batchedit.js index 4b5d929bd9..03f24b342b 100644 --- a/module/testcase/js/batchedit.js +++ b/module/testcase/js/batchedit.js @@ -47,7 +47,6 @@ $(document).ready(function() { $('#navbar li[data-id=caselib]').addClass('active'); $('#navbar li[data-id=testcase]').removeClass('active'); - console.log(isLibCase); } }) From b6b1925c28531052b83bc95648fdc3539352be33 Mon Sep 17 00:00:00 2001 From: Zongjun Lan Date: Mon, 11 Apr 2022 15:45:34 +0800 Subject: [PATCH 04/25] * fix bug error params --- module/kanban/control.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/kanban/control.php b/module/kanban/control.php index 94f5b70d70..a91f8bedd0 100644 --- a/module/kanban/control.php +++ b/module/kanban/control.php @@ -1404,8 +1404,8 @@ class kanban extends control if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); $kanbanID = $this->kanban->getKanbanIDByregion($regionID); - $$browseType = $this->config->vision == 'lite' ? 'task' : 'all'; - $kanbanGroup = $this->kanban->getRDKanban($kanbanID, $$browseType); + $browseType = $this->config->vision == 'lite' ? 'task' : 'all'; + $kanbanGroup = $this->kanban->getRDKanban($kanbanID, $browseType); return print(json_encode($kanbanGroup)); } From 6af3e182b07acab527a72fbd547b9c60e08bdc60 Mon Sep 17 00:00:00 2001 From: Zongjun Lan Date: Mon, 11 Apr 2022 15:48:46 +0800 Subject: [PATCH 05/25] * fix bug error params --- module/kanban/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/kanban/control.php b/module/kanban/control.php index a91f8bedd0..40bd8f5c49 100644 --- a/module/kanban/control.php +++ b/module/kanban/control.php @@ -1404,7 +1404,7 @@ class kanban extends control if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); $kanbanID = $this->kanban->getKanbanIDByregion($regionID); - $browseType = $this->config->vision == 'lite' ? 'task' : 'all'; + $browseType = $this->config->vision == 'lite' ? 'task' : $this->session->execLaneType; $kanbanGroup = $this->kanban->getRDKanban($kanbanID, $browseType); return print(json_encode($kanbanGroup)); From 2ce98e4622153bdf770ce543415759a90424a988 Mon Sep 17 00:00:00 2001 From: zenggang Date: Mon, 11 Apr 2022 08:41:13 +0000 Subject: [PATCH 06/25] * Fix bug#21331 --- module/index/js/index.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/module/index/js/index.js b/module/index/js/index.js index 4e988293c4..a89e2c7fef 100644 --- a/module/index/js/index.js +++ b/module/index/js/index.js @@ -654,6 +654,27 @@ $(window).on('resize', refreshMoreMenu); refreshMoreMenu(); setTimeout(refreshMoreMenu, 500); + + /* Fix bug #21331. */ + var vibibleState =''; + var visibleChange =''; + if(typeof document.visibilityState != 'undefined') + { + visibleChange = 'visibilitychange'; +   vibibleState = 'visibilityState'; + } + else if(typeof document.webkitVisibilityState != 'undefined') + { + visibleChange = 'webkitvisibilitychange'; +   vibibleState = 'webkitVisibilityState'; + } + if(visibleChange) + { + document.addEventListener(visibleChange, function() + { + if(document[vibibleState] == 'visible') showTab($('#bars>li.active').data('app')); + }); + } }); }()); From 07573e3e8f7b8e72ef36cce5c43c65dc856490af Mon Sep 17 00:00:00 2001 From: zenggang Date: Mon, 11 Apr 2022 09:05:29 +0000 Subject: [PATCH 07/25] * Adjust code --- module/index/js/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/index/js/index.js b/module/index/js/index.js index a89e2c7fef..773a5d5e6d 100644 --- a/module/index/js/index.js +++ b/module/index/js/index.js @@ -656,8 +656,8 @@ setTimeout(refreshMoreMenu, 500); /* Fix bug #21331. */ - var vibibleState =''; - var visibleChange =''; + var vibibleState = ''; + var visibleChange = ''; if(typeof document.visibilityState != 'undefined') { visibleChange = 'visibilitychange'; From 68097e7725f38cbb810c302c0cc25a45fdcaa3a8 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Mon, 11 Apr 2022 17:36:44 +0800 Subject: [PATCH 08/25] * Fix bug#14595. --- module/execution/js/managemembers.js | 72 +++++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 1 deletion(-) diff --git a/module/execution/js/managemembers.js b/module/execution/js/managemembers.js index f555bed8cb..8bc575a878 100644 --- a/module/execution/js/managemembers.js +++ b/module/execution/js/managemembers.js @@ -2,7 +2,22 @@ $(function() { $('#execution_chosen').click(function() { - if(systemMode == 'new') $('#execution_chosen ul li:first').append(' '); + if(systemMode == 'new') + { + $('#execution_chosen ul li').each(function(index) + { + if(index == 0) + { + var projectName = subString($(this).text(), 56); + $(this).text(projectName); + $(this).append(' '); + } + else + { + $(this).prepend('   '); + } + }) + } }) }) @@ -21,6 +36,13 @@ function setRole(account, roleID) roleOBJ.val(role) // set the role. } +/** + * Add item. + * + * @param object $obj + * @access public + * @return void + */ function addItem(obj) { var item = $('#addItem').html().replace(/%i%/g, itemIndex); @@ -40,12 +62,26 @@ function addItem(obj) itemIndex ++; } +/** + * Delete item. + * + * @param object $obj + * @access public + * @return void + */ function deleteItem(obj) { if($('#teamForm .table tbody').children().length < 2) return false; $(obj).closest('tr').remove(); } +/** + * Set dept users. + * + * @param object $obj + * @access public + * @return void + */ function setDeptUsers(obj) { dept = $(obj).val(); // Get dept ID. @@ -53,6 +89,13 @@ function setDeptUsers(obj) location.href=link; } +/** + * Chose team to copy. + * + * @param object $obj + * @access public + * @return void + */ function choseTeam2Copy(obj) { team = $(obj).val(); @@ -60,3 +103,30 @@ function choseTeam2Copy(obj) link = createLink('execution', 'manageMembers', 'executionID=' + executionID + '&team2Import=' + team + '&dept=' + dept); location.href=link; } + +/** + * Cut a string of letters and characters with the same length. + * + * @param string $title + * @param int $stringLength + * @access public + * @return string + */ +function subString(title, stringLength) +{ + if(title.replace(/[\u4e00-\u9fa5]/g, "**").length > stringLength) + { + var length = 0; + for(var i = 0; i < title.length; i ++) + { + length += title.charCodeAt(i) > 255 ? 2 : 1; + if(length > stringLength) + { + title = title.substring(0, i) + '...'; + break; + } + } + } + + return title; +} From c36f432e1af1508f2a1655251c0ba84bfb4f5fc0 Mon Sep 17 00:00:00 2001 From: sunjun Date: Tue, 12 Apr 2022 08:35:31 +0800 Subject: [PATCH 09/25] *Fixbug_sunjun_21618 --- module/testcase/control.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/module/testcase/control.php b/module/testcase/control.php index ebf232307b..27ec933b97 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -953,7 +953,6 @@ class testcase extends control if($this->app->tab == 'qa') $this->testcase->setMenu($this->products, $productID, $branch); if($this->app->tab == 'execution') $this->loadModel('execution')->setMenu($this->session->execution); - $isLibCase = $type == 'lib' ? true : false; /* The cases of a product. */ if($productID) { @@ -1094,7 +1093,7 @@ class testcase extends control $this->view->cases = $cases; $this->view->forceNotReview = $this->testcase->forceNotReview(); $this->view->modulePairs = $modulePairs; - $this->view->isLibCase = $isLibCase; + $this->view->isLibCase = $type == 'lib' ? true : false; $this->display(); } From 4f8d2791ed31fb69cb4f544e27334b5bde9ba8de Mon Sep 17 00:00:00 2001 From: zhujinyong Date: Tue, 12 Apr 2022 09:12:07 +0800 Subject: [PATCH 10/25] * Reset cookie. --- api/v1/entries/testcases.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/v1/entries/testcases.php b/api/v1/entries/testcases.php index 7b680a8a8d..2b4e49bc7e 100644 --- a/api/v1/entries/testcases.php +++ b/api/v1/entries/testcases.php @@ -23,6 +23,9 @@ class testcasesEntry extends entry if(empty($productID)) $productID = $this->param('product', 0); if(empty($productID)) return $this->sendError(400, 'Need product id.'); + $this->app->cookie->caseModule = 0; + $this->app->cookie->caseSuite = 0; + $type = 'all'; $param = 0; $moduleID = $this->param('module', 0); From 1571548411e2518f5dbe92def40cd5a59202bbb9 Mon Sep 17 00:00:00 2001 From: zhouxin Date: Tue, 12 Apr 2022 01:34:40 +0000 Subject: [PATCH 11/25] * Fix bug #21654. --- module/user/view/edit.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/user/view/edit.html.php b/module/user/view/edit.html.php index 52ebf043c5..2e7d720c74 100644 --- a/module/user/view/edit.html.php +++ b/module/user/view/edit.html.php @@ -59,7 +59,7 @@ user->accountInfo;?> user->account;?> - account, "class='form-control' disabled");?> + account, "class='form-control' readonly");?> user->email;?> email, "class='form-control'");?> From baf4a67ed8784ce90960c10e2011ef506193fcec Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Tue, 12 Apr 2022 09:51:09 +0800 Subject: [PATCH 12/25] * Fix bug #15633. --- config/zentaopms.php | 1 + module/action/config.php | 3 ++- module/action/view/trash.html.php | 4 ---- module/api/control.php | 3 +-- module/api/model.php | 15 --------------- 5 files changed, 4 insertions(+), 22 deletions(-) diff --git a/config/zentaopms.php b/config/zentaopms.php index 9b6cea5ead..dd24aaf97f 100644 --- a/config/zentaopms.php +++ b/config/zentaopms.php @@ -370,6 +370,7 @@ $config->objectTables['sonarqube'] = TABLE_PIPELINE; $config->objectTables['gitlab'] = TABLE_PIPELINE; $config->objectTables['jebkins'] = TABLE_PIPELINE; $config->objectTables['stage'] = TABLE_STAGE; +$config->objectTables['apistruct'] = TABLE_APISTRUCT; $config->newFeatures = array('introduction', 'tutorial', 'youngBlueTheme', 'visions'); diff --git a/module/action/config.php b/module/action/config.php index eeb7b831c8..43d361b476 100755 --- a/module/action/config.php +++ b/module/action/config.php @@ -43,6 +43,7 @@ $config->action->objectNameFields['kanbancard'] = 'name'; $config->action->objectNameFields['sonarqube'] = 'name'; $config->action->objectNameFields['gitlab'] = 'name'; $config->action->objectNameFields['stage'] = 'name'; +$config->action->objectNameFields['apistruct'] = 'name'; $config->action->commonImgSize = 870; @@ -58,4 +59,4 @@ $config->action->majorList['execution'] = array('opened', 'edited'); $config->action->needGetProjectType = 'build,task,bug,case,testcase,caselib,testtask,testsuite,testreport,doc,issue,release,risk,design,opportunity,trainplan,gapanalysis,researchplan,researchreport,'; $config->action->needGetRelateField = ',story,productplan,release,task,build,bug,case,testtask,testreport,doc,doclib,issue,risk,opportunity,trainplan,gapanalysis,team,whitelist,researchplan,researchreport,meeting,kanbanlane,kanbancolumn,'; -$config->action->noLinkModules = ',doclib,module,webhook,gitlab,sonarqube,pipeline,jenkins,kanban,kanbanspace,kanbancolumn,kanbanlane,kanbanregion,kanbancard,execution,project,traincategory,'; +$config->action->noLinkModules = ',doclib,module,webhook,gitlab,sonarqube,pipeline,jenkins,kanban,kanbanspace,kanbancolumn,kanbanlane,kanbanregion,kanbancard,execution,project,traincategory,apistruct,program,'; diff --git a/module/action/view/trash.html.php b/module/action/view/trash.html.php index 2f00960c77..011ef69af1 100755 --- a/module/action/view/trash.html.php +++ b/module/action/view/trash.html.php @@ -76,10 +76,6 @@ { echo $action->objectName; } - elseif($action->objectType == 'program') - { - echo $action->objectName; - } else { $tab = ''; diff --git a/module/api/control.php b/module/api/control.php index 05d51bd5a6..3b788b81a7 100755 --- a/module/api/control.php +++ b/module/api/control.php @@ -300,9 +300,8 @@ class api extends control } else { - $this->api->deleteStruct($structID); + $this->api->delete(TABLE_APISTRUCT, $structID); if(dao::isError()) return $this->sendError(dao::getError()); - $this->action->create('apistruct', $structID, 'Deleted'); return print(js::locate(inlink('struct', "libID=$libID"), 'parent')); } } diff --git a/module/api/model.php b/module/api/model.php index ba6fb7259c..4454e040a2 100644 --- a/module/api/model.php +++ b/module/api/model.php @@ -173,21 +173,6 @@ class apiModel extends model return common::createChanges($old, $data); } - /** - * Delete a struct. - * - * @param int $id - * @access public - * @return void - */ - public function deleteStruct($id) - { - $this->dao->update(TABLE_APISTRUCT) - ->set('deleted')->eq(1) - ->where('id')->eq($id) - ->exec(); - } - /** * Update an api doc. * From 2031d9df86803bac76826d1a5ff7ef67a0458c80 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Tue, 12 Apr 2022 10:04:08 +0800 Subject: [PATCH 13/25] * Fix bug #15648. --- module/api/view/releases.html.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/module/api/view/releases.html.php b/module/api/view/releases.html.php index 1c1e1a7d69..aca80bb3c8 100644 --- a/module/api/view/releases.html.php +++ b/module/api/view/releases.html.php @@ -19,6 +19,11 @@

api->managePublish;?>