From 5c09cedfe9e227a8db10a602e04034b9517249dc Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Wed, 27 Apr 2022 01:11:34 +0000 Subject: [PATCH 1/6] * Fix bug #22022. --- module/task/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/task/config.php b/module/task/config.php index e79127ec59..ac1b91dcd0 100644 --- a/module/task/config.php +++ b/module/task/config.php @@ -78,7 +78,7 @@ $config->task->datatable->fieldList['status']['width'] = '60'; $config->task->datatable->fieldList['status']['required'] = 'no'; $config->task->datatable->fieldList['estimate']['title'] = 'estimateAB'; -$config->task->datatable->fieldList['estimate']['fixed'] = 'right'; +$config->task->datatable->fieldList['estimate']['fixed'] = 'no'; $config->task->datatable->fieldList['estimate']['width'] = '60'; $config->task->datatable->fieldList['estimate']['required'] = 'no'; From a2e957e3c80d4babf6bad4777c911749c48178fb Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Wed, 27 Apr 2022 01:49:17 +0000 Subject: [PATCH 2/6] * Fix bug #22024. --- module/testcase/css/create.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/testcase/css/create.css b/module/testcase/css/create.css index 7e1773ae69..ef4f0e56c7 100644 --- a/module/testcase/css/create.css +++ b/module/testcase/css/create.css @@ -41,4 +41,4 @@ .pri-selector > .btn {padding: 5px 8px !important; width: 100%;} .pri-selector > .dropdown-menu {padding: 10px;} -.title-group .has-icon-right {min-width: 600px;} +.title-group .has-icon-right {min-width: 550px;} From 06cd4caa4d087535fa5d4fdb39829ebec3c21bb8 Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Wed, 27 Apr 2022 01:55:30 +0000 Subject: [PATCH 3/6] * Fix bug #22024. --- module/testcase/css/create.css | 1 - 1 file changed, 1 deletion(-) diff --git a/module/testcase/css/create.css b/module/testcase/css/create.css index ef4f0e56c7..9371649ca7 100644 --- a/module/testcase/css/create.css +++ b/module/testcase/css/create.css @@ -41,4 +41,3 @@ .pri-selector > .btn {padding: 5px 8px !important; width: 100%;} .pri-selector > .dropdown-menu {padding: 10px;} -.title-group .has-icon-right {min-width: 550px;} From 0424801e4eb806ae3ebecb35ca1aac3b0b6eb9ed Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Wed, 27 Apr 2022 10:48:28 +0800 Subject: [PATCH 4/6] * Fix bug #15654. --- module/api/control.php | 1 + module/api/lang/en.php | 3 -- module/api/lang/zh-cn.php | 3 -- module/api/lang/zh-tw.php | 3 -- module/api/view/createlib.html.php | 12 ------- module/doc/control.php | 2 ++ module/doc/js/common.js | 2 +- module/doc/js/createlib.js | 53 ++++++++++++++++++++++++++++++ module/doc/lang/en.php | 4 +++ module/doc/lang/zh-cn.php | 5 +++ module/doc/view/createlib.html.php | 18 ++++++++-- 11 files changed, 82 insertions(+), 24 deletions(-) diff --git a/module/api/control.php b/module/api/control.php index a97c4c81cf..c445d379ff 100755 --- a/module/api/control.php +++ b/module/api/control.php @@ -319,6 +319,7 @@ class api extends control /* Record action for create api library. */ $this->action->create('docLib', $libID, 'Created'); + if(!helper::isAjaxRequest()) return print(js::locate($this->createLink('api', 'index', "libID=$libID"), 'parent.parent')); return $this->sendSuccess(array('locate' => $this->createLink('api', 'index', "libID=$libID"))); } diff --git a/module/api/lang/en.php b/module/api/lang/en.php index 269484c932..20aefb7498 100644 --- a/module/api/lang/en.php +++ b/module/api/lang/en.php @@ -199,9 +199,6 @@ $lang->api->structParamsOptons = array_merge($lang->api->paramsTypeOptions, ar $lang->api->allParamsTypeOptions = array_merge($lang->api->paramsTypeOptions, $lang->api->paramsTypeCustomOptions); $lang->api->requiredOptions = array(0 => 'No', 1 => 'Yes'); -$lang->doclib = new stdclass(); -$lang->doclib->name = 'API Library Name'; - $lang->apistruct = new stdClass(); $lang->apistruct->name = 'Name'; diff --git a/module/api/lang/zh-cn.php b/module/api/lang/zh-cn.php index ce73a1bf19..e49b961316 100755 --- a/module/api/lang/zh-cn.php +++ b/module/api/lang/zh-cn.php @@ -199,9 +199,6 @@ $lang->api->structParamsOptons = array_merge($lang->api->paramsTypeOptions, ar $lang->api->allParamsTypeOptions = array_merge($lang->api->paramsTypeOptions, $lang->api->paramsTypeCustomOptions); $lang->api->requiredOptions = array(0 => '否', 1 => '是'); -$lang->doclib = new stdclass(); -$lang->doclib->name = '接口库名称'; - $lang->apistruct = new stdClass(); $lang->apistruct->name = '结构名'; diff --git a/module/api/lang/zh-tw.php b/module/api/lang/zh-tw.php index 6e33b20062..e56d998aee 100644 --- a/module/api/lang/zh-tw.php +++ b/module/api/lang/zh-tw.php @@ -199,9 +199,6 @@ $lang->api->structParamsOptons = array_merge($lang->api->paramsTypeOptions, ar $lang->api->allParamsTypeOptions = array_merge($lang->api->paramsTypeOptions, $lang->api->paramsTypeCustomOptions); $lang->api->requiredOptions = array(0 => '否', 1 => '是'); -$lang->doclib = new stdclass(); -$lang->doclib->name = '介面庫名稱'; - $lang->apistruct = new stdClass(); $lang->apistruct->name = '結構名'; diff --git a/module/api/view/createlib.html.php b/module/api/view/createlib.html.php index 9ae2834d75..8e215817d9 100644 --- a/module/api/view/createlib.html.php +++ b/module/api/view/createlib.html.php @@ -65,17 +65,5 @@ - api->noticeAcl);?> diff --git a/module/doc/control.php b/module/doc/control.php index e4dd5e20ba..362d8e7ef4 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -171,6 +171,8 @@ class doc extends control if(empty($projects)) unset($libTypeList['project']); if(empty($executions)) unset($libTypeList['execution']); + $this->app->loadLang('api'); + $this->view->groups = $this->loadModel('group')->getPairs(); $this->view->users = $this->user->getPairs('nocode|noclosed'); $this->view->products = $products; diff --git a/module/doc/js/common.js b/module/doc/js/common.js index 13d5973f69..48edfdbc1d 100644 --- a/module/doc/js/common.js +++ b/module/doc/js/common.js @@ -42,7 +42,7 @@ function toggleAcl(acl, type) var notice = typeof(noticeAcl[libType][acl]) != 'undefined' ? noticeAcl[libType][acl] : ''; $('#noticeAcl').html(notice); - if(libType == 'custom' && acl == 'private') $('#whiteListBox').addClass('hidden'); + if((libType == 'custom' || libType == 'api') && acl == 'private') $('#whiteListBox').addClass('hidden'); if(libType == 'project' && typeof(doclibID) != 'undefined') { diff --git a/module/doc/js/createlib.js b/module/doc/js/createlib.js index 9867c1de4e..109cb8c86a 100644 --- a/module/doc/js/createlib.js +++ b/module/doc/js/createlib.js @@ -29,6 +29,14 @@ function changeByLibType(libType) $('table tr.execution').addClass('hidden'); $('#execution').attr('disabled', true); + $('.normalLib').removeClass('hidden'); + $('.normalLib input').attr('disabled', false); + + $('table tr.apilib').addClass('hidden'); + $('.apilib input, #desc, #baseUrl').attr('disabled', true); + + $('form').removeAttr('action'); + changeDoclibAcl(libType); } else if(libType == 'project') @@ -42,6 +50,14 @@ function changeByLibType(libType) $('table tr.execution').addClass('hidden'); $('#execution').attr('disabled', true); + $('.normalLib').removeClass('hidden'); + $('.normalLib input').attr('disabled', false); + + $('table tr.apilib').addClass('hidden'); + $('.apilib input, #desc, #baseUrl').attr('disabled', true); + + $('form').removeAttr('action'); + changeDoclibAcl(libType); } else if(libType == 'execution') @@ -55,6 +71,35 @@ function changeByLibType(libType) $('table tr.project').addClass('hidden'); $('#project').attr('disabled', true); + $('.normalLib').removeClass('hidden'); + $('.normalLib input').attr('disabled', false); + + $('table tr.apilib').addClass('hidden'); + $('.apilib input, #desc, #baseUrl').attr('disabled', true); + + $('form').removeAttr('action'); + + changeDoclibAcl(libType); + } + else if(libType == 'api') + { + $('table tr.product').addClass('hidden'); + $('#product').attr('disabled', true); + + $('table tr.project').addClass('hidden'); + $('#project').attr('disabled', true); + + $('table tr.execution').addClass('hidden'); + $('#execution').attr('disabled', true); + + $('.normalLib').addClass('hidden'); + $('.normalLib input').attr('disabled', true); + + $('table tr.apilib').removeClass('hidden'); + $('.apilib input, #desc, #baseUrl').attr('disabled', false); + + $('form').attr('action', createLink('api', 'createLib')); + changeDoclibAcl(libType); } else @@ -68,6 +113,14 @@ function changeByLibType(libType) $('table tr.execution').addClass('hidden'); $('#execution').attr('disabled', true); + $('.normalLib').removeClass('hidden'); + $('.normalLib input').attr('disabled', false); + + $('table tr.apilib').addClass('hidden'); + $('.apilib input, #desc, #baseUrl').attr('disabled', true); + + $('form').removeAttr('action'); + changeDoclibAcl(libType); } diff --git a/module/doc/lang/en.php b/module/doc/lang/en.php index 7fa62b2cd8..8dd3708511 100644 --- a/module/doc/lang/en.php +++ b/module/doc/lang/en.php @@ -158,6 +158,7 @@ $lang->doc->allExecutions = 'All' . $lang->executionCommon . 's'; $lang->doc->libTypeList['product'] = $lang->productCommon . ' Library'; if($config->systemMode == 'new') $lang->doc->libTypeList['project'] = 'Project Library'; $lang->doc->libTypeList['execution'] = $lang->execution->common . ' Library'; +$lang->doc->libTypeList['api'] = 'API Library'; $lang->doc->libTypeList['custom'] = 'Custom Library'; $lang->doc->libGlobalList['api'] = 'Api Libray'; @@ -248,6 +249,9 @@ $lang->doc->noticeAcl['lib']['project']['private'] = 'Users who can access the $lang->doc->noticeAcl['lib']['project']['custom'] = 'Users in the whiltelist can access it.'; $lang->doc->noticeAcl['lib']['execution']['default'] = "Users who can access the selected {$lang->executionCommon} can access it."; $lang->doc->noticeAcl['lib']['execution']['custom'] = "Users who can access the selected {$lang->executionCommon} or users in the whiltelist can access it."; +$lang->doc->noticeAcl['lib']['api']['open'] = 'All users can access it.'; +$lang->doc->noticeAcl['lib']['api']['custom'] = 'Users in the whitelist can access it.'; +$lang->doc->noticeAcl['lib']['api']['private'] = 'Only the one who created it can access it.'; $lang->doc->noticeAcl['lib']['custom']['open'] = 'All users can access it.'; $lang->doc->noticeAcl['lib']['custom']['custom'] = 'Users in the whitelist can access it.'; $lang->doc->noticeAcl['lib']['custom']['private'] = 'Only the one who created it can access it.'; diff --git a/module/doc/lang/zh-cn.php b/module/doc/lang/zh-cn.php index c850ff1b94..ff69f8c514 100644 --- a/module/doc/lang/zh-cn.php +++ b/module/doc/lang/zh-cn.php @@ -21,6 +21,7 @@ $lang->doclib->execution = $lang->executionCommon . '库'; $lang->doclib->product = $lang->productCommon . '库'; $lang->doclib->apiLibName = '接口库名称'; +$lang->doclib->aclListA = array(); $lang->doclib->aclListA['default'] = '默认'; $lang->doclib->aclListA['custom'] = '自定义'; @@ -158,6 +159,7 @@ $lang->doc->allExecutions = '所有' . $lang->executionCommon; $lang->doc->libTypeList['product'] = $lang->productCommon . '文档库'; if($config->systemMode == 'new') $lang->doc->libTypeList['project'] = '项目文档库'; $lang->doc->libTypeList['execution'] = $lang->execution->common . '文档库'; +$lang->doc->libTypeList['api'] = '接口库'; $lang->doc->libTypeList['custom'] = '自定义文档库'; $lang->doc->libGlobalList['api'] = '接口文档库'; @@ -248,6 +250,9 @@ $lang->doc->noticeAcl['lib']['project']['private'] = "有所选项目访问权 $lang->doc->noticeAcl['lib']['project']['custom'] = "白名单的用户可以访问。"; $lang->doc->noticeAcl['lib']['execution']['default'] = "有所选{$lang->executionCommon}访问权限的用户可以访问。"; $lang->doc->noticeAcl['lib']['execution']['custom'] = "有所选{$lang->executionCommon}访问权限或白名单里的用户可以访问。"; +$lang->doc->noticeAcl['lib']['api']['open'] = '所有人都可以访问。'; +$lang->doc->noticeAcl['lib']['api']['custom'] = '白名单的用户可以访问。'; +$lang->doc->noticeAcl['lib']['api']['private'] = '只有创建者自己可以访问。'; $lang->doc->noticeAcl['lib']['custom']['open'] = '所有人都可以访问。'; $lang->doc->noticeAcl['lib']['custom']['custom'] = '白名单的用户可以访问。'; $lang->doc->noticeAcl['lib']['custom']['private'] = '只有创建者自己可以访问。'; diff --git a/module/doc/view/createlib.html.php b/module/doc/view/createlib.html.php index f9c701c3af..b0a84345ee 100644 --- a/module/doc/view/createlib.html.php +++ b/module/doc/view/createlib.html.php @@ -19,7 +19,7 @@

doc->createLib;?>

-
+ @@ -45,10 +45,18 @@ - + + + + + + + + + + + + + From e9ef78de3d5433bb896ec329cac7c30f05cac0f1 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Wed, 27 Apr 2022 13:11:35 +0800 Subject: [PATCH 5/6] Fix bug #15612. --- module/api/css/index.css | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/module/api/css/index.css b/module/api/css/index.css index c1d1bbac1c..6aeb9ea8e4 100644 --- a/module/api/css/index.css +++ b/module/api/css/index.css @@ -94,10 +94,22 @@ color: #a41e22; } +.detail .list-group-item a { + display: flex; + align-items: center; +} + +.detail .list-group-item .path, .detail .list-group-item .desc { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + .detail .list-group-item .path { padding-left: 10px; font-size: 14px; - color: black + color: black; + flex: 1; } .detail .list-group-item .desc { width: auto; @@ -105,6 +117,7 @@ line-height: 38px; float: right; padding-right: 10px; + max-width: 200px; } .detail .list-group-item {list-style: none; font-size: 14px; margin-bottom: 10px; line-height: 30px} .detail .list-group-item span {line-height: 30px; width: 65px;} From 36bd7d298db4f56ebc06607b682b3bf3006e2669 Mon Sep 17 00:00:00 2001 From: mayue Date: Wed, 27 Apr 2022 13:34:55 +0800 Subject: [PATCH 6/6] * Fix bug #21706. --- module/story/model.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/module/story/model.php b/module/story/model.php index 0db38fad06..e11a7464b3 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -1732,7 +1732,16 @@ class storyModel extends model if($oldStory->branch) $story->plan = $planID; /* Append the plan id to plan field if product is multi and story is all branch. */ - if($this->session->currentProductType != 'normal' and empty($story->branch) and $planID != 0) $story->plan = $oldStory->plan ? $oldStory->plan . ",$planID" : ",$planID"; + if($this->session->currentProductType != 'normal' and empty($story->branch) and $planID != 0) + { + $branchPlanPairs = $this->dao->select('branch, id as plan')->from(TABLE_PRODUCTPLAN) + ->where('product')->eq($oldStory->product) + ->andWhere('id')->in($oldStory->plan) + ->fetchPairs(); + if(isset($branchPlanPairs[$plan->branch])) $branchPlanPairs[$plan->branch] = $planID; + + $story->plan = $oldStory->plan ? ',' . implode(',', $branchPlanPairs) : ",$planID"; + } /* Change stage. */ if($planID)
doc->libType?>doc->execution?>
doclib->name?>
doclib->control;?> @@ -69,6 +77,12 @@