From 8104185c615af8f6385af4a1c6cd0d862b5ea1f3 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Tue, 18 Apr 2023 10:47:35 +0800 Subject: [PATCH 01/12] * Fix bug #34288, Modify bottom height. --- module/doc/css/common.css | 1 + 1 file changed, 1 insertion(+) diff --git a/module/doc/css/common.css b/module/doc/css/common.css index e7371ef1c3..10e1334449 100644 --- a/module/doc/css/common.css +++ b/module/doc/css/common.css @@ -107,6 +107,7 @@ ol, ul {margin-bottom: 0} #pageNav #dropMenu .table-col .list-group .icon-move {display:block; float: left; font-size: 12px; padding: 3px 4px 3px 1px;} #content .detail-content.article-content {overflow-y: auto; height: calc(100vh - 200px); padding-right: 20px;} +#content.scrollbar-hover .detail-content.article-content {height: 100%;} #aclBox .acl-tip {color: #838a9d;} .ajaxCollect > img.star-empty {margin-right: 0px;} #outlineMenu {background: #fff; position: absolute; height: calc(100vh - 180px)!important; overflow-y: auto; top: 50px; right: 25px;} From 44387b7b9799ba5635bef55a4066cac85eaa1cf0 Mon Sep 17 00:00:00 2001 From: liugang Date: Tue, 18 Apr 2023 03:00:10 +0000 Subject: [PATCH 02/12] * Remove unused files extened in the report extension. --- module/upgrade/config.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/module/upgrade/config.php b/module/upgrade/config.php index 1f5ddf74a0..92355ac620 100644 --- a/module/upgrade/config.php +++ b/module/upgrade/config.php @@ -465,6 +465,11 @@ $config->delete['18_4'][] = 'extension/biz/group/ext/lang/en/report.php'; $config->delete['18_4'][] = 'extension/biz/group/ext/lang/de/report.php'; $config->delete['18_4'][] = 'extension/biz/group/ext/lang/fr/report.php'; $config->delete['18_4'][] = 'extension/biz/group/ext/lang/zh-tw/report.php'; +$config->delete['18_4'][] = 'extension/biz/report/ext/lang/zh-cn/report.php'; +$config->delete['18_4'][] = 'extension/biz/report/ext/lang/en/report.php'; +$config->delete['18_4'][] = 'extension/biz/report/ext/lang/de/report.php'; +$config->delete['18_4'][] = 'extension/biz/report/ext/lang/fr/report.php'; +$config->delete['18_4'][] = 'extension/biz/report/ext/lang/zh-tw/report.php'; $config->delete['18_4'][] = 'extension/max/common/ext/lang/zh-cn/crystal.php'; $config->delete['18_4'][] = 'extension/max/common/ext/lang/en/crystal.php'; $config->delete['18_4'][] = 'extension/max/common/ext/lang/de/crystal.php'; @@ -489,6 +494,11 @@ $config->delete['18_4'][] = 'extension/max/group/ext/lang/de/report.php'; $config->delete['18_4'][] = 'extension/max/group/ext/lang/fr/report.php'; $config->delete['18_4'][] = 'extension/max/group/ext/lang/zh-tw/report.php'; $config->delete['18_4'][] = 'extension/max/report/ext/control/instancetemplate.php'; +$config->delete['18_4'][] = 'extension/max/report/ext/lang/zh-cn/report.php'; +$config->delete['18_4'][] = 'extension/max/report/ext/lang/en/report.php'; +$config->delete['18_4'][] = 'extension/max/report/ext/lang/de/report.php'; +$config->delete['18_4'][] = 'extension/max/report/ext/lang/fr/report.php'; +$config->delete['18_4'][] = 'extension/max/report/ext/lang/zh-tw/report.php'; $config->delete['18_4'][] = 'extension/max/report/ext/view/programsummary.html.php'; $config->delete['18_4'][] = 'extension/max/report/ext/view/programworkload.html.php'; $config->delete['18_4'][] = 'extension/max/report/ext/view/instancetemplate.html.php'; From ab7bfba897a4d16c5d1c4980c0a7887ed61f971d Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Tue, 18 Apr 2023 11:09:19 +0800 Subject: [PATCH 03/12] * Fix bug #34185, Modify sidebar-toggle. --- module/doc/view/lefttree.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/doc/view/lefttree.html.php b/module/doc/view/lefttree.html.php index 1118d69ecd..3d84723b95 100644 --- a/module/doc/view/lefttree.html.php +++ b/module/doc/view/lefttree.html.php @@ -517,7 +517,7 @@ $(function() } }).on('click', '.sidebar-toggle', function() { - var $icon = $(this).find('.icon-drop'); + var $icon = $(this).find('.icon'); if($('#sideBar').hasClass('hidden')) { $icon.addClass('icon-angle-left'); From 77605330f2c36865c7030d4e2d2eb9797eebe7e3 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Tue, 18 Apr 2023 11:16:24 +0800 Subject: [PATCH 04/12] * Modify catalog select style. --- module/doc/view/lefttree.html.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/doc/view/lefttree.html.php b/module/doc/view/lefttree.html.php index 3d84723b95..b6ef026f6e 100644 --- a/module/doc/view/lefttree.html.php +++ b/module/doc/view/lefttree.html.php @@ -503,6 +503,7 @@ $(function() $('body').on('click', function() { + $('a.sort-module').removeClass('dragging-shadow'); var $dropdown = $('.dropdown-in-tree'); if($dropdown.length) { @@ -672,6 +673,7 @@ $(function() start: function() { $('#dropDownCatalogue').remove(); + $('a.sort-module').removeClass('dragging-shadow'); }, canMoveHere: function($ele, $target) { From 72c289b854de6504423e84f9f06808e7c070cb8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E9=87=91=E5=8B=87?= Date: Tue, 18 Apr 2023 04:11:46 +0000 Subject: [PATCH 05/12] * Fix bug#34247. --- module/bug/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/bug/model.php b/module/bug/model.php index 959ef33257..51cfe23452 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1216,7 +1216,7 @@ class bugModel extends model if($bug->resolvedBuild and $bug->resolvedBuild != 'trunk') { $testtaskID = (int) $this->dao->select('id')->from(TABLE_TESTTASK)->where('build')->eq($bug->resolvedBuild)->orderBy('id_desc')->limit(1)->fetch('id'); - if($testtaskID and empty($oldBug->testtask)) $bug->testtask = $testtask; + if($testtaskID and empty($oldBug->testtask)) $bug->testtask = $testtaskID; } $this->dao->update(TABLE_BUG)->data($bug, 'buildName,createBuild,buildExecution,comment') From c9637a04180ce72ce398782a07717a230fea86dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E9=87=91=E5=8B=87?= Date: Tue, 18 Apr 2023 04:22:09 +0000 Subject: [PATCH 06/12] * Fix bug#34305. --- module/task/view/finish.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/task/view/finish.html.php b/module/task/view/finish.html.php index bec2d1532f..99bce11595 100644 --- a/module/task/view/finish.html.php +++ b/module/task/view/finish.html.php @@ -91,7 +91,7 @@
realStarted; + $realStarted = substr($task->realStarted, 0, 19); $readonly = 'readonly'; if(helper::isZeroDate($realStarted)) { From d96a77e3140b0ea9c100ebffc1953d4c64d18293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E9=87=91=E5=8B=87?= Date: Tue, 18 Apr 2023 04:31:10 +0000 Subject: [PATCH 07/12] * Fix bug#34233. --- db/update18.3.sql | 6 ++++++ db/zentao.sql | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/db/update18.3.sql b/db/update18.3.sql index cf9c51a501..f6efd25a12 100644 --- a/db/update18.3.sql +++ b/db/update18.3.sql @@ -738,6 +738,12 @@ CHANGE `team` `team` varchar(90) NOT NULL DEFAULT '', CHANGE `whitelist` `whitelist` text NULL, CHANGE `order` `order` mediumint unsigned NOT NULL DEFAULT '0'; +ALTER TABLE `zt_relation` +CHANGE `project` `project` mediumint NOT NULL DEFAULT '0', +CHANGE `product` `product` mediumint NOT NULL DEFAULT '0', +CHANGE `execution` `execution` mediumint NOT NULL DEFAULT '0', +CHANGE `extra` `extra` char(30) NOT NULL DEFAULT ''; + ALTER TABLE `zt_release` CHANGE `project` `project` varchar(255) NOT NULL DEFAULT '0', CHANGE `leftBugs` `leftBugs` text NULL; diff --git a/db/zentao.sql b/db/zentao.sql index 597de86cd7..b976da3927 100755 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -1379,9 +1379,9 @@ CREATE UNIQUE INDEX `project` ON `zt_projectstory`(`project`,`story`); -- DROP TABLE IF EXISTS `zt_relation`; CREATE TABLE IF NOT EXISTS `zt_relation` ( `id` int(8) NOT NULL AUTO_INCREMENT, - `project` mediumint(8) NOT NULL, - `product` mediumint(8) NOT NULL, - `execution` mediumint(8) NOT NULL, + `project` mediumint(8) NOT NULL DEFAULT '0', + `product` mediumint(8) NOT NULL DEFAULT '0', + `execution` mediumint(8) NOT NULL DEFAULT '0', `AType` char(30) NOT NULL, `AID` mediumint(8) NOT NULL, `AVersion` char(30) NOT NULL, @@ -1389,7 +1389,7 @@ CREATE TABLE IF NOT EXISTS `zt_relation` ( `BType` char(30) NOT NULL, `BID` mediumint(8) NOT NULL, `BVersion` char(30) NOT NULL, - `extra` char(30) NOT NULL, + `extra` char(30) NOT NULL DEFAULT '', PRIMARY KEY (`id`) ) ENGINE='InnoDB' DEFAULT CHARSET=utf8; CREATE UNIQUE INDEX `relation` ON `zt_relation`(`product`,`relation`,`AType`,`BType`, `AID`, `BID`); From 0d31625643b4f9fc07063dbe1440eba3d74b66d4 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 18 Apr 2023 13:04:13 +0800 Subject: [PATCH 08/12] * code for task #91388. --- module/block/config.php | 1 + module/block/control.php | 40 ++++- module/block/model.php | 3 +- module/block/view/productdocblock.html.php | 30 ++-- module/block/view/projectdocblock.html.php | 198 +++++++++++++++++++++ module/doc/css/tablecontents.css | 3 +- module/doc/model.php | 5 +- module/doc/view/doclist.html.php | 2 +- module/doc/view/mydoclist.html.php | 36 ++-- module/product/lang/de.php | 1 + module/product/lang/en.php | 1 + module/product/lang/fr.php | 1 + module/project/lang/de.php | 1 + module/project/lang/en.php | 1 + module/project/lang/fr.php | 1 + module/project/lang/zh-cn.php | 1 + module/project/model.php | 2 +- 17 files changed, 288 insertions(+), 39 deletions(-) diff --git a/module/block/config.php b/module/block/config.php index 15dd685cb6..c7dfa03993 100644 --- a/module/block/config.php +++ b/module/block/config.php @@ -85,3 +85,4 @@ $config->block->modules['doc'] = new stdclass(); $config->block->modules['doc']->moreLinkList = new stdclass(); $config->block->modules['doc']->moreLinkList->docmycollection = 'doc|myspace|type=collect&libID=0&moduleID=0&browseType=all¶m=0&orderBy=editedDate_desc'; $config->block->modules['doc']->moreLinkList->productdoc = 'doc|productspace|'; +$config->block->modules['doc']->moreLinkList->projectdoc = 'doc|projectspace|'; diff --git a/module/block/control.php b/module/block/control.php index c31d135b24..eb16af3daa 100755 --- a/module/block/control.php +++ b/module/block/control.php @@ -2153,14 +2153,14 @@ class block extends control /* Set project status and count. */ $count = isset($this->params->count) ? (int)$this->params->count : 15; - $products = $this->loadModel('product')->getList(0, 'all'); - $involveds = $this->product->getList(0, 'involved'); + $products = $this->loadModel('product')->getOrderedProducts('all'); + $involveds = $this->product->getOrderedProducts('involved'); $productIdList = array_merge(array_keys($products), array_keys($involveds)); - $stmt = $this->dao->select('*')->from(TABLE_DOC) + $stmt = $this->dao->select('id,product,lib,title,type,addedBy,addedDate,editedDate,status,acl,groups,users,deleted')->from(TABLE_DOC)->alias('t1') ->where('deleted')->eq(0) ->andWhere('product')->in($productIdList) - ->orderBy('product,editedDate_desc') + ->orderBy('product,status,editedDate_desc') ->query(); $docGroup = array(); while($doc = $stmt->fetch()) @@ -2184,6 +2184,38 @@ class block extends control */ public function printProjectDocBlock() { + $this->loadModel('doc'); + $this->app->loadLang('project'); + + /* Set project status and count. */ + $count = isset($this->params->count) ? (int)$this->params->count : 15; + $involveds = $this->loadModel('program')->getProjectList('0', 'all', 0, 'order_asc', null, 0, $involved = 1); + $projects = $this->program->getProjectList('0', 'all', 0, 'order_asc'); + $projectIdList = array_merge(array_keys($projects), array_keys($involveds)); + + $stmt = $this->dao->select('t1.id,t1.lib,t1.title,t1.type,t1.addedBy,t1.addedDate,t1.editedDate,t1.status,t1.acl,t1.groups,t1.users,t1.deleted,if(t1.project = 0, t2.project, t1.project) as project')->from(TABLE_DOC)->alias('t1') + ->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.execution=t2.id') + ->where('t1.deleted')->eq(0) + ->andWhere('t2.deleted', true)->eq(0) + ->orWhere('t2.deleted is null') + ->markRight(1) + ->andWhere('t1.project',true)->in($projectIdList) + ->orWhere('t2.project',true)->in($projectIdList) + ->markRight(1) + ->orderBy('project,t1.status,t1.editedDate_desc') + ->query(); + $docGroup = array(); + while($doc = $stmt->fetch()) + { + if(!isset($docGroup[$doc->project])) $docGroup[$doc->project] = array(); + if(count($docGroup[$doc->project]) > $count) break; + if($this->doc->checkPrivDoc($doc)) $docGroup[$doc->project][$doc->id] = $doc; + } + + $this->view->users = $this->loadModel('user')->getPairs('noletter'); + $this->view->projects = $projects; + $this->view->involveds = $involveds; + $this->view->docGroup = $docGroup; } /** diff --git a/module/block/model.php b/module/block/model.php index 150d9a0188..b8a8e627f1 100644 --- a/module/block/model.php +++ b/module/block/model.php @@ -1148,7 +1148,8 @@ class blockModel extends model */ public function getProjectDocParams() { - return false; + $params = $this->appendCountParams(); + return json_encode($params); } /** diff --git a/module/block/view/productdocblock.html.php b/module/block/view/productdocblock.html.php index d4ea3b926c..b6c46c8995 100644 --- a/module/block/view/productdocblock.html.php +++ b/module/block/view/productdocblock.html.php @@ -12,7 +12,7 @@ .block-productdoc .nav-secondary > li {position: relative;} .block-productdoc .nav-secondary > li > a {font-size: 14px; color: #838A9D; position: relative; box-shadow: none; padding-left: 20px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; transition: all .2s;} .block-productdoc .nav-secondary > li > a:first-child {padding-right: 36px;} -.block-productdoc .nav-secondary > li.active > a:first-child {color: #3C4353; background: transparent; box-shadow: none;} +.block-productdoc .nav-secondary > li.active > a:first-child {color: #3C4353; box-shadow: none;} .block-productdoc .nav-secondary > li.active > a:first-child:hover, .block-productdoc .nav-secondary > li.active > a:first-child:focus, .block-productdoc .nav-secondary > li > a:first-child:hover {box-shadow: none; border-radius: 4px 0 0 4px;} @@ -52,6 +52,11 @@ .block-productdoc #productType {position: absolute;top: 6px;left: 120px;} .block-productdoc #productType .btn {border:0px;} + +.block-productdoc .table .c-name > .doc-title {display: inline-block; overflow: hidden; background: transparent; padding-right:0px;} +.block-productdoc .table .c-name > span.doc-title {line-height: 0; vertical-align: inherit;} +.block-productdoc .table .c-name[data-status=draft] > .doc-title {max-width: calc(100% - 35px);} +.block-productdoc .table .c-name > .draft {background-color:rgba(129, 102, 238, 0.12); color:#8166EE;}
@@ -118,21 +123,23 @@ function changeProductType(type)
-