From 2dbf74064c790fc6ec2da13d1c9220d046239640 Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Fri, 2 Sep 2022 11:37:53 +0800 Subject: [PATCH 01/40] feedback module --- framework/api/entry.class.php | 2 ++ module/product/model.php | 10 ++++++++-- module/tree/control.php | 8 +++++++- module/tree/view/browse.html.php | 12 +----------- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/framework/api/entry.class.php b/framework/api/entry.class.php index 5c89698e49..3728feb92e 100644 --- a/framework/api/entry.class.php +++ b/framework/api/entry.class.php @@ -18,6 +18,8 @@ class entry extends baseEntry { parent::__construct(); + if($this->app->action == 'options') return $this->send(204); + if(!isset($this->app->user) or $this->app->user->account == 'guest') $this->sendError(401, 'Unauthorized'); $this->dao = $this->loadModel('common')->dao; diff --git a/module/product/model.php b/module/product/model.php index 95766d7eea..2eb24d2727 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -76,7 +76,7 @@ class productModel extends model public function select($products, $productID, $currentModule, $currentMethod, $extra = '', $branch = '', $module = 0, $moduleType = '', $withBranch = true) { $isQaModule = (strpos(',project,execution,', ",{$this->app->tab},") !== false and strpos(',bug,testcase,testtask,ajaxselectstory,', ",{$this->app->rawMethod},") !== false and isset($products[0])) ? true : false; - + $isFeedbackModel = strpos(',feedback,', ",{$this->app->tab},") !== false ? true : false; if(count($products) <= 2 and isset($products[0])) { unset($products[0]); @@ -86,7 +86,7 @@ class productModel extends model if(empty($products)) return; $this->app->loadLang('product'); - if(!$isQaModule and !$productID) + if(!$isQaModule and !$productID and !$isFeedbackModel) { unset($this->lang->product->menu->settings['subMenu']->branch); return; @@ -109,6 +109,12 @@ class productModel extends model $currentProduct->name = $products[$productID]; $currentProduct->type = 'normal'; } + if($isFeedbackModel and !$productID) + { + $currentProduct = new stdclass(); + $currentProduct->name = isset($products[$productID]) ? $products[$productID] : current($products); + $currentProduct->type = 'normal'; + } $this->session->set('currentProductType', $currentProduct->type); $executionID = ($isQaModule and $this->app->tab == 'execution') ? $extra : 0; diff --git a/module/tree/control.php b/module/tree/control.php index 694fb98501..2e63786574 100644 --- a/module/tree/control.php +++ b/module/tree/control.php @@ -45,6 +45,11 @@ class tree extends control $products = $this->product->getProducts($this->session->project, 'all', '', false); if($viewType == 'case') $this->lang->modulePageNav = $this->product->select($products, $rootID, 'tree', 'browse', 'case', $branch); } + else if($this->app->tab == 'feedback') + { + $products = $this->product->getProducts(0, 'all', '', false); + if($viewType == 'feedback') $this->lang->modulePageNav = $this->product->select($products, $rootID, 'tree', 'browse', 'feedback', '', '', '', false); + } /* According to the type, set the module root and modules. */ if(strpos('story|bug|case', $viewType) !== false) @@ -131,8 +136,9 @@ class tree extends control { $this->app->loadLang('feedback'); $this->lang->tree->menu = $this->lang->feedback->menu; + $productItem = $this->product->getById($rootID); $root = new stdclass(); - $root->name = $this->lang->feedback->common; + $root->name = !empty($rootID) ? $productItem->name : $this->lang->feedback->common; $this->view->root = $root; $title = $this->lang->tree->manageFeedback; diff --git a/module/tree/view/browse.html.php b/module/tree/view/browse.html.php index b6582f2936..dc03710379 100644 --- a/module/tree/view/browse.html.php +++ b/module/tree/view/browse.html.php @@ -28,20 +28,14 @@ $name = $lang->tree->name; if($viewType == 'line') $name = $lang->tree->line; if($viewType == 'api') $name = $lang->tree->dir; if($viewType == 'doc') $name = $lang->doc->catalogName; -if($viewType == 'feedback' or $viewType == 'trainskill' or $viewType == 'trainpost') $name = $lang->tree->cate; +if($viewType == 'trainskill' or $viewType == 'trainpost') $name = $lang->tree->cate; $childTitle = $lang->tree->child; -if(strpos($viewType, 'feedback') !== false) $childTitle = $lang->tree->subCategory; if(strpos($viewType, 'doc') !== false or $viewType == 'api') $childTitle = $lang->doc->childType; if($viewType == 'line' or $viewType == 'trainskill' or $viewType == 'trainpost') $childTitle = ''; $editTitle = $lang->tree->edit; $deleteTitle = $lang->tree->delete; -if($viewType == 'feedback') -{ - $editTitle = $lang->tree->editCategory; - $deleteTitle = $lang->tree->delCategory; -} if($viewType == 'doc' or $viewType == 'api') { $editTitle = $lang->doc->editType; @@ -65,10 +59,6 @@ if($viewType == 'doc' or $viewType == 'api') { echo $lang->api->manageType . $lang->colon . $root->name; } - elseif($viewType == 'feedback') - { - echo $lang->feedback->manageCate; - } elseif($viewType == 'line') { echo $lang->tree->manageLine; From 825dadd222777cad1a95574598b234b29cf7b1e7 Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Fri, 2 Sep 2022 14:29:05 +0800 Subject: [PATCH 02/40] feedback action modify todolist --- module/message/model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/message/model.php b/module/message/model.php index 1dd601e02c..03cc3f6639 100755 --- a/module/message/model.php +++ b/module/message/model.php @@ -201,6 +201,7 @@ class messageModel extends model } if($toList == 'closed') $toList = ''; + if($objectType == 'feedback' and $object->status == 'replied') $toList = ',' . $object->openedBy . ','; return $toList; } From 09ec23ea4a24e30d7a646978d6a3de9c82f78329 Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Mon, 5 Sep 2022 11:29:36 +0800 Subject: [PATCH 03/40] add module tree --- module/tree/control.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/tree/control.php b/module/tree/control.php index 2e63786574..9b65c6cd52 100644 --- a/module/tree/control.php +++ b/module/tree/control.php @@ -142,6 +142,7 @@ class tree extends control $this->view->root = $root; $title = $this->lang->tree->manageFeedback; + $this->lang->feedback->menu->browse['subMenu'] = new stdclass(); $position[] = html::a($this->createLink('feedback', 'admin'), $this->lang->tree->manageFeedback); } elseif($viewType == 'case') From 45f0cea0f7d1527df64a122cae406c1b5bb286f6 Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Tue, 6 Sep 2022 15:12:47 +0800 Subject: [PATCH 04/40] * sync product --- module/upgrade/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 6ea2ed9cc3..aebb700555 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -7324,7 +7324,7 @@ class upgradeModel extends model $moduleID = $feedback->module; $product = $feedback->product; if(empty($moduleID)) continue; - $newModuleID = $allProductRelation[$product][$moduleID]; + $newModuleID = isset($allProductRelation[$product][$moduleID]) ? $allProductRelation[$product][$moduleID] : 0; if(empty($newModuleID)) continue; $this->dao->update(TABLE_FEEDBACK)->set('module')->eq($newModuleID)->where('id')->eq($feedback->id)->exec(); From bb17fc804e7015151a0982a58baae662e1a49cc0 Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Tue, 6 Sep 2022 15:46:23 +0800 Subject: [PATCH 05/40] * sync product --- module/tree/model.php | 3 ++- module/upgrade/model.php | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/module/tree/model.php b/module/tree/model.php index 8c8a2582ec..43c85c74c0 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -99,7 +99,8 @@ class treeModel extends model /* $createdVersion < 4.1 or $type == 'story'. */ return $this->dao->select('*')->from(TABLE_MODULE) - ->where('root')->eq((int)$rootID) + ->where('1=1') + ->beginIF($type != 'feedback' and !empty($rootID))->andwhere('root')->eq((int)$rootID)->fi() ->andWhere('type')->eq($type) ->beginIF($startModulePath)->andWhere('path')->like($startModulePath)->fi() ->beginIF($branch !== 'all' and $branch !== '' and $branch !== false) diff --git a/module/upgrade/model.php b/module/upgrade/model.php index aebb700555..48ccdb7bee 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -7283,7 +7283,7 @@ class upgradeModel extends model /* * Process feedback module - * + * * @access public * @return void */ @@ -7313,7 +7313,7 @@ class upgradeModel extends model if(isset($relation[$path])) $newPaths[] = $relation[$path]; } $newPaths = join(',', $newPaths); - $parent = !empty($module->parent) and isset($relation[$module->parent]) ? $relation[$module->parent] : 0; + $parent = !empty($module->parent) ? $relation[$module->parent] : 0; $this->dao->update(TABLE_MODULE)->set('path')->eq($newPaths)->set('parent')->eq($parent)->where('id')->eq($newModuleID)->exec(); } } From a9151f8429df272434eb6b91bf24808b147566aa Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Wed, 7 Sep 2022 09:11:12 +0800 Subject: [PATCH 06/40] * sync product --- module/tree/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/tree/model.php b/module/tree/model.php index 43c85c74c0..e7e402c840 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -100,7 +100,7 @@ class treeModel extends model /* $createdVersion < 4.1 or $type == 'story'. */ return $this->dao->select('*')->from(TABLE_MODULE) ->where('1=1') - ->beginIF($type != 'feedback' and !empty($rootID))->andwhere('root')->eq((int)$rootID)->fi() + ->beginIF($type != 'feedback' or !empty($rootID))->andwhere('root')->eq((int)$rootID)->fi() ->andWhere('type')->eq($type) ->beginIF($startModulePath)->andWhere('path')->like($startModulePath)->fi() ->beginIF($branch !== 'all' and $branch !== '' and $branch !== false) From 087c85c04fb0ee4d023518543698bb10b01f3189 Mon Sep 17 00:00:00 2001 From: mayue Date: Wed, 7 Sep 2022 14:49:25 +0800 Subject: [PATCH 07/40] * Ajust lang. --- module/tree/control.php | 1 - module/tree/view/edit.html.php | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/module/tree/control.php b/module/tree/control.php index 9b65c6cd52..0945f05791 100644 --- a/module/tree/control.php +++ b/module/tree/control.php @@ -483,7 +483,6 @@ class tree extends control if($module->type == 'doc') $confirmLang = $this->lang->tree->confirmDeleteMenu; if($module->type == 'line') $confirmLang = $this->lang->tree->confirmDeleteLine; if($module->type == 'host') $confirmLang = $this->lang->tree->confirmDeleteHost; - if($module->type == 'feedback') $confirmLang = $this->lang->tree->confirmDelCategory; die(js::confirm($confirmLang, $this->createLink('tree', 'delete', "rootID=$rootID&moduleID=$moduleID&confirm=yes"))); } else diff --git a/module/tree/view/edit.html.php b/module/tree/view/edit.html.php index 92bafdd876..3548a80d01 100644 --- a/module/tree/view/edit.html.php +++ b/module/tree/view/edit.html.php @@ -57,7 +57,7 @@ if(isset($pageCSS)) css::internal($pageCSS); type != 'line'):?> > - tree->parentCate : $lang->tree->parent;?> + tree->parentCate : $lang->tree->parent;?> parent, "class='form-control chosen'");?> @@ -65,7 +65,7 @@ if(isset($pageCSS)) css::internal($pageCSS); tree->name; - if($type == 'doc' || $type == 'feedback') $lblTreeName = $lang->tree->cate; + if($type == 'doc') $lblTreeName = $lang->tree->cate; if($type == 'line') $lblTreeName = $lang->tree->line; echo $lblTreeName; ?> From 7c2244c088ae2dcc61c9d5c70ee3d78694cf0e4f Mon Sep 17 00:00:00 2001 From: zenggang Date: Thu, 8 Sep 2022 00:46:20 +0000 Subject: [PATCH 08/40] * Code for task#67792 --- db/update17.6.sql | 2 ++ module/tree/model.php | 23 ++++++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/db/update17.6.sql b/db/update17.6.sql index 1d60b73fd5..8e93ee9988 100644 --- a/db/update17.6.sql +++ b/db/update17.6.sql @@ -13,3 +13,5 @@ CREATE TABLE `zt_taskteam` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ALTER TABLE `zt_taskestimate` ADD `order` tinyint unsigned NULL DEFAULT '0'; ALTER TABLE `zt_effort` ADD `order` tinyint unsigned NOT NULL DEFAULT '0' AFTER `end`; + +REPLACE INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', 'global', 'syncProductFeedback', '0'); diff --git a/module/tree/model.php b/module/tree/model.php index e7e402c840..18abfd4038 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -1591,7 +1591,7 @@ class treeModel extends model public function updateOrder($orders) { asort($orders); - $orderInfo = $this->dao->select('id,grade, parent, branch')->from(TABLE_MODULE)->where('id')->in(array_keys($orders))->andWhere('deleted')->eq(0)->fetchAll('id'); + $orderInfo = $this->dao->select('*')->from(TABLE_MODULE)->where('id')->in(array_keys($orders))->andWhere('deleted')->eq(0)->fetchAll('id'); $newOrders = array(); foreach($orders as $moduleID => $order) { @@ -1610,6 +1610,12 @@ class treeModel extends model $newOrder = $newOrders[$parent][$grade][$branch] * 10; $this->dao->update(TABLE_MODULE)->set('`order`')->eq($newOrder)->where('id')->eq((int)$moduleID)->limit(1)->exec(); + + $module = $orderInfo[$moduleID]; + if($module->type == 'story' and $this->config->global->syncProductFeedback >= $module->grade) + { + $this->loadModel('feedback')->syncTrigger($moduleID, 'update', $module); + } } } @@ -1693,6 +1699,11 @@ class treeModel extends model $createIdList[] = $moduleID; $childPath = $parentPath . "$moduleID,"; $this->dao->update(TABLE_MODULE)->set('path')->eq($childPath)->where('id')->eq($moduleID)->limit(1)->exec(); + + if($type == 'story' and $this->config->global->syncProductFeedback >= $module->grade) + { + $this->loadModel('feedback')->syncTrigger($moduleID, 'insert'); + } } else { @@ -1716,6 +1727,11 @@ class treeModel extends model $editIdList[] = $moduleID; $moduleChanges[$moduleID] = common::createChanges($oldModule, $newModule); } + + if($type == 'story' and $this->config->global->syncProductFeedback >= $module->grade) + { + $this->loadModel('feedback')->syncTrigger($moduleID, 'update', $oldModule); + } } } @@ -1922,6 +1938,11 @@ class treeModel extends model $this->dao->update(TABLE_BUG)->set('module')->eq($module->parent)->where('module')->in($childs)->exec(); $this->dao->update(TABLE_CASE)->set('module')->eq($module->parent)->where('module')->in($childs)->exec(); $cookieName = 'storyModule'; + + if($this->config->global->syncProductFeedback >= $module->grade) + { + $this->loadModel('feedback')->syncTrigger($moduleID, 'delete'); + } break; } if(strpos($this->session->{$module->type . 'List'}, 'param=' . $moduleID)) $this->session->set($module->type . 'List', str_replace('param=' . $moduleID, 'param=0', $this->session->{$module->type . 'List'})); From adde17f7120a9af0dcb52343d009857e0ba155ae Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Thu, 8 Sep 2022 10:15:13 +0800 Subject: [PATCH 09/40] * fix bug #27317 --- module/product/model.php | 5 ++++- module/tree/control.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/module/product/model.php b/module/product/model.php index 2eb24d2727..a3ab49e00f 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -121,7 +121,10 @@ class productModel extends model $output = ''; if(!empty($products)) { - $dropMenuLink = helper::createLink($isQaModule ? 'bug' : 'product', 'ajaxGetDropMenu', "objectID=$productID&module=$currentModule&method=$currentMethod&extra=$extra"); + $moduleName = 'product'; + if($isQaModule) $moduleName = 'bug'; + if($isFeedbackModel) $moduleName = 'feedback'; + $dropMenuLink = helper::createLink($moduleName, 'ajaxGetDropMenu', "objectID=$productID&module=$currentModule&method=$currentMethod&extra=$extra"); $output = "
"; diff --git a/module/tree/control.php b/module/tree/control.php index 9b65c6cd52..96c22c8a14 100644 --- a/module/tree/control.php +++ b/module/tree/control.php @@ -47,7 +47,7 @@ class tree extends control } else if($this->app->tab == 'feedback') { - $products = $this->product->getProducts(0, 'all', '', false); + $products = $this->loadModel('feedback')->getGrantProducts(); if($viewType == 'feedback') $this->lang->modulePageNav = $this->product->select($products, $rootID, 'tree', 'browse', 'feedback', '', '', '', false); } From 6e88d850038ee62c84aca46036335a331baa75a2 Mon Sep 17 00:00:00 2001 From: zenggang Date: Thu, 8 Sep 2022 02:29:15 +0000 Subject: [PATCH 10/40] * Add sql --- db/zentao.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/db/zentao.sql b/db/zentao.sql index 8ed0a0d092..1ba47863f3 100755 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -6302,6 +6302,7 @@ INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES (' INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'project', '', 'unitList', 'CNY,USD'); INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'project', '', 'defaultCurrency', 'CNY'); INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'story', '', 'reviewRules', 'allpass'); +INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', 'global', 'syncProductFeedback', '0'); -- DROP TABLE IF EXISTS `zt_im_chat`; CREATE TABLE IF NOT EXISTS `zt_im_chat` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, From d1c02c34c0d1289611e295dc41647574b91866b6 Mon Sep 17 00:00:00 2001 From: zenggang Date: Thu, 8 Sep 2022 07:24:42 +0000 Subject: [PATCH 11/40] * Adjust code --- config/zentaopms.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/zentaopms.php b/config/zentaopms.php index 5e57c970f7..df8d0a3a4a 100644 --- a/config/zentaopms.php +++ b/config/zentaopms.php @@ -225,6 +225,7 @@ $config->openMethods[] = 'tree.viewhistory'; $config->openMethods[] = 'doc.createbasicinfo'; $config->openMethods[] = 'project.createguide'; $config->openMethods[] = 'task.editteam'; +$config->openMethods[] = 'feedback.mergeproductmodule'; /* Define the tables. */ define('TABLE_COMPANY', '`' . $config->db->prefix . 'company`'); @@ -402,4 +403,4 @@ $config->waterfallModules = array('workestimation', 'durationestimation', 'budge $config->showMainMenu = true; $config->maxPriValue = '256'; -$config->importWhiteList = array('user', 'task', 'story', 'bug', 'testcase', 'feedback'); \ No newline at end of file +$config->importWhiteList = array('user', 'task', 'story', 'bug', 'testcase', 'feedback'); From 2d0901b36c9efdcd3f4852f3b0fa36de450b9216 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Sat, 15 Oct 2022 08:52:40 +0800 Subject: [PATCH 12/40] * Add top menu for feedback. --- module/product/model.php | 4 ++++ module/product/view/ajaxgetdropmenu.html.php | 5 +++++ module/tree/control.php | 3 ++- module/tree/lang/zh-cn.php | 1 + module/tree/view/browse.html.php | 2 ++ 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/module/product/model.php b/module/product/model.php index a71518aca7..33d81fcbb8 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -2311,6 +2311,10 @@ class productModel extends model $objectID = $module == 'project' ? 'projectID' : 'executionID'; return helper::createLink($module, $method, "$objectID=$extra&productID=%s"); } + elseif($module == 'feedback') + { + return helper::createLink($module, $method, "browseType=byProduct&productID=%s"); + } return $link; } diff --git a/module/product/view/ajaxgetdropmenu.html.php b/module/product/view/ajaxgetdropmenu.html.php index 81b430e4d9..4147879cbe 100644 --- a/module/product/view/ajaxgetdropmenu.html.php +++ b/module/product/view/ajaxgetdropmenu.html.php @@ -29,6 +29,7 @@ div#closed {width: 90px; height: 25px; line-height: 25px; background-color: #ddd; color: #3c495c; text-align: center; margin-left: 15px; border-radius: 2px;} #gray-line {width: 230px; height: 1px; margin-left: 10px; margin-bottom:2px; background-color: #ddd;} #swapper li >.selected {color: #0c64eb!important;background: #e9f2fb!important;} +#dropMenu .col-footer .selected{color: #2e7fff!important;background: #e6f0ff!important; padding: 1px 10px;border-radius: 4px;} '; ' . $lang->product->all, '', 'class="not-list-item"'); ?> ' . $lang->project->all, '', 'class="not-list-item"'); ?> product->closed?> + app->tab == 'feedback'):?> + + product->all, '', "class='not-list-item pull-left toggle-left-col $selected'"); ?> +
diff --git a/module/tree/control.php b/module/tree/control.php index 9f306f3fa5..fd5cd84e2a 100644 --- a/module/tree/control.php +++ b/module/tree/control.php @@ -48,7 +48,8 @@ class tree extends control else if($this->app->tab == 'feedback') { $products = $this->loadModel('feedback')->getGrantProducts(); - if($viewType == 'feedback') $this->lang->modulePageNav = $this->product->select($products, $rootID, 'tree', 'browse', 'feedback', '', '', '', false); + if(!$rootID) $rootID = key($products); + $this->loadModel('feedback')->setMenu($rootID); } /* According to the type, set the module root and modules. */ diff --git a/module/tree/lang/zh-cn.php b/module/tree/lang/zh-cn.php index 1c6c9a6a11..9050ff21e9 100755 --- a/module/tree/lang/zh-cn.php +++ b/module/tree/lang/zh-cn.php @@ -50,6 +50,7 @@ $lang->tree->successSave = '成功保存'; $lang->tree->successFixed = '成功修正数据!'; $lang->tree->repeatName = '模块名“%s”已经存在!'; $lang->tree->shouldNotBlank = '模块名不能为空格!'; +$lang->tree->syncProductModule = '同步产品模块'; $lang->tree->module = '模块'; $lang->tree->name = '模块名称'; diff --git a/module/tree/view/browse.html.php b/module/tree/view/browse.html.php index 938817f53e..bb99d086ca 100644 --- a/module/tree/view/browse.html.php +++ b/module/tree/view/browse.html.php @@ -105,6 +105,8 @@ if($viewType == 'doc' or $viewType == 'api')
tree->syncFromProduct, '', "class='btn btn-sm btn-primary'")?>
+ +
createLink('feedback', 'syncProduct', '', '', true), $lang->tree->syncProductModule, '', "class='btn btn-sm btn-primary iframe'");?>
From 36a8194f4c0940866af74ccea35064e35c7fca5a Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Mon, 17 Oct 2022 09:05:08 +0800 Subject: [PATCH 13/40] * Remove merge feedback module for tree and upgrade. --- module/tree/model.php | 21 ---------------- module/upgrade/model.php | 54 ---------------------------------------- 2 files changed, 75 deletions(-) diff --git a/module/tree/model.php b/module/tree/model.php index 3622d6d51c..bbbe2d0c81 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -1610,12 +1610,6 @@ class treeModel extends model $newOrder = $newOrders[$parent][$grade][$branch] * 10; $this->dao->update(TABLE_MODULE)->set('`order`')->eq($newOrder)->where('id')->eq((int)$moduleID)->limit(1)->exec(); - - $module = $orderInfo[$moduleID]; - if($module->type == 'story' and $this->config->global->syncProductFeedback >= $module->grade) - { - $this->loadModel('feedback')->syncTrigger($moduleID, 'update', $module); - } } } @@ -1699,11 +1693,6 @@ class treeModel extends model $createIdList[] = $moduleID; $childPath = $parentPath . "$moduleID,"; $this->dao->update(TABLE_MODULE)->set('path')->eq($childPath)->where('id')->eq($moduleID)->limit(1)->exec(); - - if($type == 'story' and $this->config->global->syncProductFeedback >= $module->grade) - { - $this->loadModel('feedback')->syncTrigger($moduleID, 'insert'); - } } else { @@ -1727,11 +1716,6 @@ class treeModel extends model $editIdList[] = $moduleID; $moduleChanges[$moduleID] = common::createChanges($oldModule, $newModule); } - - if($type == 'story' and $this->config->global->syncProductFeedback >= $module->grade) - { - $this->loadModel('feedback')->syncTrigger($moduleID, 'update', $oldModule); - } } } @@ -1938,11 +1922,6 @@ class treeModel extends model $this->dao->update(TABLE_BUG)->set('module')->eq($module->parent)->where('module')->in($childs)->exec(); $this->dao->update(TABLE_CASE)->set('module')->eq($module->parent)->where('module')->in($childs)->exec(); $cookieName = 'storyModule'; - - if($this->config->global->syncProductFeedback >= $module->grade) - { - $this->loadModel('feedback')->syncTrigger($moduleID, 'delete'); - } break; } if(strpos($this->session->{$module->type . 'List'}, 'param=' . $moduleID)) $this->session->set($module->type . 'List', str_replace('param=' . $moduleID, 'param=0', $this->session->{$module->type . 'List'})); diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 7cf281f24f..cf32236c89 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -713,8 +713,6 @@ class upgradeModel extends model $this->addFlowActions('biz7.4'); $this->addFlowFields('biz7.4'); break; - case 'biz7_6': - //$this->processFeedbackModule(); } } @@ -7246,58 +7244,6 @@ class upgradeModel extends model return true; } - /** - * Process feedback module - * - * @access public - * @return void - */ - public function processFeedbackModule() - { - $products = $this->dao->select('id, name')->from(TABLE_PRODUCT)->fetchAll(); - $modules = $this->dao->select('*')->from(TABLE_MODULE)->where('type')->eq('feedback')->andWhere('root')->eq(0)->fetchAll('id'); - $feedbacks = $this->dao->select('*')->from(TABLE_FEEDBACK)->fetchAll(); - - $allProductRelation = array(); - foreach($products as $product) - { - $productID = $product->id; - $relation = array(); - foreach($modules as $moduleID => $module) - { - unset($module->id); - $module->root = $productID; - $this->dao->insert(TABLE_MODULE)->data($module)->exec(); - $newModuleID = $this->dao->lastInsertID(); - $relation[$moduleID] = $newModuleID; - $allProductRelation[$productID][$moduleID] = $newModuleID; - $newPaths = array(); - foreach(explode(',', trim($module->path, ',')) as $path) - { - if(isset($relation[$path])) $newPaths[] = $relation[$path]; - } - $newPaths = join(',', $newPaths); - $parent = !empty($module->parent) ? $relation[$module->parent] : 0; - $this->dao->update(TABLE_MODULE)->set('path')->eq($newPaths)->set('parent')->eq($parent)->where('id')->eq($newModuleID)->exec(); - } - } - - /* Update feedback module */ - foreach($feedbacks as $feedback) - { - $moduleID = $feedback->module; - $product = $feedback->product; - if(empty($moduleID)) continue; - $newModuleID = isset($allProductRelation[$product][$moduleID]) ? $allProductRelation[$product][$moduleID] : 0; - if(empty($newModuleID)) continue; - - $this->dao->update(TABLE_FEEDBACK)->set('module')->eq($newModuleID)->where('id')->eq($feedback->id)->exec(); - } - - /* Delete history module */ - $this->dao->delete()->from(TABLE_MODULE)->where('type')->eq('feedback')->andWhere('root')->eq(0)->exec(); - } - /* * Convert task team to table: zt_taskteam. * From 72c1b4819e0b8642bdeff377ddc64cda94d8bcf4 Mon Sep 17 00:00:00 2001 From: wangzemei Date: Mon, 17 Oct 2022 16:24:14 +0800 Subject: [PATCH 14/40] * finish task #72349 --- module/task/css/common.css | 19 +++++++++++++++++++ module/task/css/create.css | 17 ----------------- module/task/css/edit.css | 17 +---------------- 3 files changed, 20 insertions(+), 33 deletions(-) diff --git a/module/task/css/common.css b/module/task/css/common.css index 6ac775e840..ffd387d200 100644 --- a/module/task/css/common.css +++ b/module/task/css/common.css @@ -1,2 +1,21 @@ .body-modal > .main {padding: 20px;} .body-modal > .main .table-form {border: 1px solid #ddd;} + +#modalTeam .modal-dialog {padding-bottom: 20px;} +#modalTeam .modal-content {padding: 0 0 5px; height: 340px;} +#modalTeam .modal-body {padding: 12px 13px 20px; max-height: 296px!important; overflow-y: scroll!important;} +#modalTeam .modal-header {height: 44px; padding: 10px 20px; margin: 0; } +#modalTeam .modal-header .modal-title {font-size: 13px; line-height: 24px;} +#taskTeamEditor tr {padding: 8px 7px 8px 7px;} +#taskTeamEditor td .chosen-single .chosen-search input, +#taskTeamEditor tr td .chosen-single {height: 35px; line-height: 24px;} +#taskTeamEditor td .chosen-single .chosen-search::before {top: 10px;} +#taskTeamEditor tr td:first-child {width: 40px; position: relative;} +.team-number {display: inline-block; width: 20px; height: 20px; line-height: 20px; border-radius: 10px; text-align: center; background: #f4f5f7;} +#taskTeamEditor tr td:first-child .icon { position: absolute; top: 42px; left: 10.5px; display: block; font-size: 8px; color: #9ea3bd;;} +#taskTeamEditor tr:last-child td:first-child .icon, #taskTeamEditor tr.member-last td:first-child .icon {display: none;} + +#modalTeam .modal-content input[type="text"]::input-placeholder{color: #c4c4c4;text-align: left;} +#modalTeam .modal-content input[type="text"]::-webkit-input-placeholder{color: #c4c4c4;text-align: left;} +#modalTeam .modal-content input[type="text"]::-moz-placeholder{color: #c4c4c4;text-align: left;} +#modalTeam .modal-content input[type="text"]::-ms-input-placeholder{color: #c4c4c4;text-align: left;} \ No newline at end of file diff --git a/module/task/css/create.css b/module/task/css/create.css index 676e62d8af..603c1d4e69 100644 --- a/module/task/css/create.css +++ b/module/task/css/create.css @@ -29,20 +29,3 @@ .keep-row-height {height: 32px;} #modalTeam .modal-dialog {height: 340px; width: 620px; color: #3c4353;} -#modalTeam .modal-content {padding: 0 0 5px; height: 340px;} -#modalTeam .modal-header {height: 44px; padding: 10px 20px; margin: 0;} -#modalTeam .modal-header .modal-title {font-size: 13px; line-height: 24px;} -#modalTeam .modal-body {padding: 12px 13px 20px; max-height: 296px!important; overflow-y: scroll!important;} -#taskTeamEditor tr {padding: 8px 7px 8px 7px;} -#taskTeamEditor td .chosen-single .chosen-search input, -#taskTeamEditor tr td .chosen-single {height: 35px; line-height: 24px;} -#taskTeamEditor td .chosen-single .chosen-search::before {top: 10px;} -#taskTeamEditor tr td:first-child {width: 40px; position: relative;} -.team-number {display: inline-block; width: 20px; height: 20px; line-height: 20px; border-radius: 10px; text-align: center; background: #f4f5f7;} -#taskTeamEditor tr td:first-child .icon { position: absolute; top: 42px; left: 10.5px; display: block; font-size: 8px; color: #9ea3bd;;} -#taskTeamEditor tr:last-child td:first-child .icon {display: none;} - -#modalTeam .modal-content input[type="text"]::input-placeholder{color: #c4c4c4;text-align: left;} -#modalTeam .modal-content input[type="text"]::-webkit-input-placeholder{color: #c4c4c4;text-align: left;} -#modalTeam .modal-content input[type="text"]::-moz-placeholder{color: #c4c4c4;text-align: left;} -#modalTeam .modal-content input[type="text"]::-ms-input-placeholder{color: #c4c4c4;text-align: left;} diff --git a/module/task/css/edit.css b/module/task/css/edit.css index 9eee7f882d..68968921b2 100644 --- a/module/task/css/edit.css +++ b/module/task/css/edit.css @@ -4,20 +4,5 @@ #taskTeamEditor .sortable .input-group .input-group-addon.required:after {top: 10px; right: 2px; z-index: 3;} #storyIdBox .chosen-container .chosen-drop.chosen-no-wrap>.chosen-results>li {text-overflow: unset;} -#modalTeam .modal-dialog {padding-bottom: 20px;} -#modalTeam .modal-content {padding: 20px 13px 0; height: 340px;max-height: 296px!important; overflow-y: scroll!important;} -#modalTeam .modal-header {height: 44px; padding: 10px 20px; margin: 0; } -#modalTeam .modal-header .modal-title {font-size: 13px; line-height: 24px;} -#taskTeamEditor tr {padding: 8px 7px 8px 7px;} -#taskTeamEditor td .chosen-single .chosen-search input, -#taskTeamEditor tr td .chosen-single {height: 35px; line-height: 24px;} -#taskTeamEditor td .chosen-single .chosen-search::before {top: 10px;} -#taskTeamEditor tr td:first-child {width: 40px; position: relative;} -.team-number {display: inline-block; width: 20px; height: 20px; line-height: 20px; border-radius: 10px; text-align: center; background: #f4f5f7;} -#taskTeamEditor tr td:first-child .icon { position: absolute; top: 42px; left: 10.5px; display: block; font-size: 8px; color: #9ea3bd;;} -#taskTeamEditor tr:last-child td:first-child .icon {display: none;} -#modalTeam .modal-content input[type="text"]::input-placeholder{color: #c4c4c4;text-align: left;} -#modalTeam .modal-content input[type="text"]::-webkit-input-placeholder{color: #c4c4c4;text-align: left;} -#modalTeam .modal-content input[type="text"]::-moz-placeholder{color: #c4c4c4;text-align: left;} -#modalTeam .modal-content input[type="text"]::-ms-input-placeholder{color: #c4c4c4;text-align: left;} +#modalTeam .modal-content {padding: 20px 13px 0; height: 340px;max-height: 296px!important; overflow-y: scroll!important;} From 5064fc3669ce96f7c7eb9be4807db8737b88de72 Mon Sep 17 00:00:00 2001 From: wangzemei Date: Mon, 17 Oct 2022 16:45:59 +0800 Subject: [PATCH 15/40] * update createTaskTeam style --- module/task/css/create.css | 4 +++- module/task/view/taskteam.html.php | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/module/task/css/create.css b/module/task/css/create.css index 603c1d4e69..6aa2ede9c0 100644 --- a/module/task/css/create.css +++ b/module/task/css/create.css @@ -28,4 +28,6 @@ .c-modulel {width: 110px;} .keep-row-height {height: 32px;} -#modalTeam .modal-dialog {height: 340px; width: 620px; color: #3c4353;} +#modalTeam .modal-dialog {height: 340px; width: 520px; color: #3c4353;} +#taskTeamEditor .chosen-single {width: 200px;} +#taskTeamEditor .estimateBox {width: 120px;} diff --git a/module/task/view/taskteam.html.php b/module/task/view/taskteam.html.php index 9e62015a66..f1d3446753 100644 --- a/module/task/view/taskteam.html.php +++ b/module/task/view/taskteam.html.php @@ -60,11 +60,11 @@ if($task->mode == 'multi' and $app->rawMethod == 'activate') $hourDisabled = fal - + - + team)):?>
task->estimateAB}'") ?> @@ -81,7 +81,7 @@ if($task->mode == 'multi' and $app->rawMethod == 'activate') $hourDisabled = fal
- + mode) or $task->mode == 'linear'):?> From e32b0bf2ffd258af2683b8ea2b136c1725c1c269 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Mon, 17 Oct 2022 16:55:25 +0800 Subject: [PATCH 16/40] * Code for feedback module. --- module/tree/model.php | 23 +++++++++++++++-------- module/tree/view/browse.html.php | 2 +- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/module/tree/model.php b/module/tree/model.php index bbbe2d0c81..ca55b7d513 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -63,14 +63,15 @@ class treeModel extends model * Build the sql query. * * @param int $rootID - * @param string $type + * @param int $type * @param int $startModule * @param string|int $branch * @param string $param + * @param int $grade * @access public * @return void */ - public function buildMenuQuery($rootID, $type, $startModule = 0, $branch = 'all', $param = 'nodeleted') + public function buildMenuQuery($rootID, $type, $startModule = 0, $branch = 'all', $param = 'nodeleted', $grade = 0) { /* Set the start module. */ $startModulePath = ''; @@ -79,7 +80,7 @@ class treeModel extends model $startModule = $this->getById($startModule); if($startModule) $startModulePath = $startModule->path . '%'; } - + if($type == 'feedback' and strpos($param, 'noproduct') === false) $type = 'story,' . $type; if($this->isMergeModule($rootID, $type)) { return $this->dao->select('*')->from(TABLE_MODULE) @@ -101,7 +102,8 @@ class treeModel extends model return $this->dao->select('*')->from(TABLE_MODULE) ->where('1=1') ->beginIF($type != 'feedback' or !empty($rootID))->andwhere('root')->eq((int)$rootID)->fi() - ->andWhere('type')->eq($type) + ->andWhere('type')->in($type) + ->beginIF($grade)->andWhere('grade')->lt($grade)->fi() ->beginIF($startModulePath)->andWhere('path')->like($startModulePath)->fi() ->beginIF($branch !== 'all' and $branch !== '' and $branch !== false) ->andWhere('(branch')->eq(0) @@ -124,7 +126,7 @@ class treeModel extends model * @access public * @return string */ - public function getOptionMenu($rootID, $type = 'story', $startModule = 0, $branch = 0, $param = 'nodeleted') + public function getOptionMenu($rootID, $type = 'story', $startModule = 0, $branch = 0, $param = 'nodeleted', $grade = 'all') { if(empty($branch)) $branch = 0; if(defined('TUTORIAL')) @@ -168,7 +170,11 @@ class treeModel extends model { $stmt = $this->dbh->query($this->buildMenuQuery($rootID, $type, $startModule, $branchID, $param)); $modules = array(); - while($module = $stmt->fetch()) $modules[$module->id] = $module; + while($module = $stmt->fetch()) + { + if($grade != 'all' and $module->grade > $grade) continue; + $modules[$module->id] = $module; + } foreach($modules as $module) { @@ -1375,10 +1381,11 @@ class treeModel extends model /* if createVersion <= 4.1 or type == 'story', only get modules of its type. */ if(!$this->isMergeModule($rootID, $type) or $type == 'story') { + if($type == 'feedback') $type = "$type,story"; return $this->dao->select('*')->from(TABLE_MODULE) ->where('root')->eq((int)$rootID) ->andWhere('parent')->eq((int)$moduleID) - ->andWhere('type')->eq($type) + ->andWhere('type')->in($type) ->beginIF($branch !== 'all') ->andWhere("(branch")->eq(0) ->orWhere("branch")->eq((int)$branch) @@ -1390,7 +1397,7 @@ class treeModel extends model } /* else get modules of its type and story type. */ - if(strpos('task|case|bug', $type) !== false) $type = "$type,story"; + if(strpos('task|case|bug|feedback', $type) !== false) $type = "$type,story"; return $this->dao->select('*')->from(TABLE_MODULE) ->where('root')->eq((int)$rootID) diff --git a/module/tree/view/browse.html.php b/module/tree/view/browse.html.php index bb99d086ca..1183e8c7b1 100644 --- a/module/tree/view/browse.html.php +++ b/module/tree/view/browse.html.php @@ -106,7 +106,7 @@ if($viewType == 'doc' or $viewType == 'api')
tree->syncFromProduct, '', "class='btn btn-sm btn-primary'")?>
-
createLink('feedback', 'syncProduct', '', '', true), $lang->tree->syncProductModule, '', "class='btn btn-sm btn-primary iframe'");?>
+
createLink('feedback', 'syncProduct', "productID=$rootID", '', true), $lang->tree->syncProductModule, '', "class='btn btn-sm btn-primary iframe'");?>
From 0b2907217fa235da72bf004fa8e4a7be0a48e631 Mon Sep 17 00:00:00 2001 From: wangzemei Date: Tue, 18 Oct 2022 09:43:23 +0800 Subject: [PATCH 17/40] * replace input component --- module/task/css/common.css | 8 ++++++- module/task/view/taskteam.html.php | 36 ++++++++++++++++++++---------- 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/module/task/css/common.css b/module/task/css/common.css index 98aa13731a..08778de2e4 100644 --- a/module/task/css/common.css +++ b/module/task/css/common.css @@ -14,8 +14,14 @@ .team-number {display: inline-block; width: 20px; height: 20px; line-height: 20px; border-radius: 10px; text-align: center; background: #f4f5f7;} #taskTeamEditor tr td:first-child .icon { position: absolute; top: 42px; left: 10.5px; display: block; font-size: 8px; color: #9ea3bd;;} #taskTeamEditor tr:last-child td:first-child .icon, #taskTeamEditor tr.member-last td:first-child .icon {display: none;} - +#taskTeamEditor tr .input-control {display: inline-block; width: 130px; } +#taskTeamEditor tr .input-control + .input-control {margin-left: 12px; border-left: 1px solid #eee;} #modalTeam .modal-content input[type="text"]::input-placeholder{color: #c4c4c4;text-align: left;} #modalTeam .modal-content input[type="text"]::-webkit-input-placeholder{color: #c4c4c4;text-align: left;} #modalTeam .modal-content input[type="text"]::-moz-placeholder{color: #c4c4c4;text-align: left;} #modalTeam .modal-content input[type="text"]::-ms-input-placeholder{color: #c4c4c4;text-align: left;} + +#modalTeam .input-control input[type="text"]::input-placeholder{text-align: right;} +#modalTeam .input-control input[type="text"]::-webkit-input-placeholder{text-align: right;} +#modalTeam .input-control input[type="text"]::-moz-placeholder{text-align: right;} +#modalTeam .input-control input[type="text"]::-ms-input-placeholder{text-align: right;} \ No newline at end of file diff --git a/module/task/view/taskteam.html.php b/module/task/view/taskteam.html.php index 9bbb22f2e9..28ca7dee5f 100644 --- a/module/task/view/taskteam.html.php +++ b/module/task/view/taskteam.html.php @@ -37,12 +37,18 @@ if($task->mode == 'multi' and $app->rawMethod == 'activate') $hourDisabled = fal
- task->estimate?> - estimate, "class='form-control text-center' placeholder='{$lang->task->hour}'" . ($hourDisabled ? ' readonly' : ''))?> - task->consumed?> - consumed, "class='form-control text-center' readonly placeholder='{$lang->task->hour}'")?> - task->left?> - left, "class='form-control text-center' placeholder='{$lang->task->hour}'" . ($hourDisabled ? ' readonly' : ''))?> +
+ estimate, "class='form-control text-center' placeholder='{$lang->task->estimate}'" . ($hourDisabled ? ' readonly' : ''))?> + +
+
+ consumed, "class='form-control text-center' readonly placeholder='{$lang->task->consumed}'")?> + +
+
+ left, "class='form-control text-center' placeholder='{$lang->task->left}'" . ($hourDisabled ? ' readonly' : ''))?> + +
@@ -73,12 +79,18 @@ if($task->mode == 'multi' and $app->rawMethod == 'activate') $hourDisabled = fal
- task->estimate?> - task->hour}'")?> - task->consumed?> - task->hour}'")?> - task->left?> - task->hour}'")?> +
+ task->estimate}'")?> + +
+
+ task->consumed}'")?> + +
+
+ task->left}'")?> + +
From 22e9cba0df1a65ea8aaad281a3b998169d7cf033 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E8=BE=B0=E8=BD=A9?= Date: Tue, 18 Oct 2022 09:57:51 +0800 Subject: [PATCH 18/40] * Taskrecordestimate get function return empty stdclass if task have not estimate. --- api/v1/entries/taskrecordestimate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v1/entries/taskrecordestimate.php b/api/v1/entries/taskrecordestimate.php index 76dc04f077..b88eabc005 100644 --- a/api/v1/entries/taskrecordestimate.php +++ b/api/v1/entries/taskrecordestimate.php @@ -36,7 +36,7 @@ class taskRecordEstimateEntry extends Entry if(!$data) return $this->error('error'); if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message); - $effort = array(); + $effort = new stdclass(); if($issetEffort and $data->data->efforts) $effort = $data->data->efforts; if(!$issetEffort and $data->data->estimates) $effort = $data->data->estimates; $this->send(200, array('effort' => $effort)); From 7b24f667aac7994cde10621afbf04a7f135fc929 Mon Sep 17 00:00:00 2001 From: dingyongliang Date: Mon, 17 Oct 2022 08:07:57 +0000 Subject: [PATCH 19/40] * task #72367, fix modal style. --- www/theme/default/style.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/www/theme/default/style.css b/www/theme/default/style.css index d09d697a4b..903622c2d1 100644 --- a/www/theme/default/style.css +++ b/www/theme/default/style.css @@ -100,7 +100,7 @@ th.c-confirmed, th.c-confirm {text-align: center;} .icon-size-width:before {content: "\e9c5"; transform: rotate(90deg); -ms-transform: rotate(90deg); -moz-transform: rotate(90deg); -webkit-transform: rotate(90deg); -o-transform: rotate(90deg);} .checkbox-primary > label{overflow: hidden;} -body.xxc-embed {overflow-x: auto; overflow-y: hidden; height: 600px;} +body.xxc-embed {overflow-x: auto; overflow-y: hidden;} body.xxc-embed.m-productplan-view,body.xxc-embed.m-bug-browse,body.xxc-embed.m-product-browse,body.xxc-embed.m-execution-story,body.xxc-embed.m-execution-bug,body.xxc-embed.m-execution-task {height: unset;} .xxc-embed #header {position: fixed;top: 0;width: 100%;z-index: 10;} .xxc-embed #header > #mainHeader > .container {z-index: 10;} @@ -108,7 +108,6 @@ body.xxc-embed.m-productplan-view,body.xxc-embed.m-bug-browse,body.xxc-embed.m-p .xxc-embed #main {position: absolute;top: 50px;bottom: 0;left: 0;right: 0;overflow: auto;} .xxc-embed .fix-table-copy-wrapper {top: 50px!important;} .xxc-embed #headerActions {right: 310px!important;} -.xxc-embed.body-modal #mainContent {padding-top: 13px !important;} .xxc-embed .modal-iframe .modal-header .close {font-size: 28px !important;} #downloadMobile .dropdown-menu {top: -31px !important; min-width: 130px; padding: 0;} From 9eb84fcc4e80ad5a32532996909647811c1c4b95 Mon Sep 17 00:00:00 2001 From: wangzemei Date: Tue, 18 Oct 2022 13:06:15 +0800 Subject: [PATCH 20/40] * modify format --- module/task/css/common.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/task/css/common.css b/module/task/css/common.css index 08778de2e4..842d9c8db3 100644 --- a/module/task/css/common.css +++ b/module/task/css/common.css @@ -3,7 +3,7 @@ #modalTeam .modal-dialog {padding-bottom: 20px;} #modalTeam .modal-content {padding: 0 0 5px; height: 340px;} -#modalTeam .modal-body {padding: 12px 13px 20px; max-height: 296px!important; overflow-y: scroll!important;} +#modalTeam .modal-body {padding: 12px 13px 20px; max-height: 296px !important; overflow-y: scroll !important;} #modalTeam .modal-header {height: 44px; padding: 10px 20px; margin: 0; } #modalTeam .modal-header .modal-title {font-size: 13px; line-height: 24px;} #taskTeamEditor tr {padding: 8px 7px 8px 7px;} @@ -12,7 +12,7 @@ #taskTeamEditor td .chosen-single .chosen-search::before {top: 10px;} #taskTeamEditor tr td:first-child {width: 40px; position: relative;} .team-number {display: inline-block; width: 20px; height: 20px; line-height: 20px; border-radius: 10px; text-align: center; background: #f4f5f7;} -#taskTeamEditor tr td:first-child .icon { position: absolute; top: 42px; left: 10.5px; display: block; font-size: 8px; color: #9ea3bd;;} +#taskTeamEditor tr td:first-child .icon { position: absolute; top: 42px; left: 10.5px; display: block; font-size: 8px; color: #9ea3bd;} #taskTeamEditor tr:last-child td:first-child .icon, #taskTeamEditor tr.member-last td:first-child .icon {display: none;} #taskTeamEditor tr .input-control {display: inline-block; width: 130px; } #taskTeamEditor tr .input-control + .input-control {margin-left: 12px; border-left: 1px solid #eee;} From d7bb46cda599c098a5cec9198f02a97d77d69685 Mon Sep 17 00:00:00 2001 From: liuhong Date: Tue, 18 Oct 2022 05:46:27 +0000 Subject: [PATCH 21/40] *Finish feedback #1133. --- module/bug/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/bug/control.php b/module/bug/control.php index bad730430a..5140c436c6 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -1825,7 +1825,7 @@ class bug extends control $this->view->users = $users; $this->view->assignedTo = $assignedTo; $this->view->productBugs = $productBugs; - $this->view->executions = $this->loadModel('product')->getExecutionPairsByProduct($productID, $bug->branch ? "0,{$bug->branch}" : 0, 'id_desc', $projectID); + $this->view->executions = $this->loadModel('product')->getExecutionPairsByProduct($productID, $bug->branch ? "0,{$bug->branch}" : 0, 'id_desc', $projectID, 'stagefilter'); $this->view->builds = $this->loadModel('build')->getBuildPairs($productID, $bug->branch, 'withbranch'); $this->view->actions = $this->action->getList('bug', $bugID); $this->view->execution = isset($execution) ? $execution : ''; From ccd017af47aa86ce7d49428a1de964849b4e402e Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Tue, 18 Oct 2022 15:04:35 +0800 Subject: [PATCH 22/40] * Finish task #72201,72130,72129. --- db/update17.6.2.sql | 1 + db/update17.6.sql | 2 - db/zentao.sql | 2 +- module/product/model.php | 2 +- module/product/view/ajaxgetdropmenu.html.php | 2 +- module/tree/control.php | 1 - module/tree/model.php | 12 +++-- module/upgrade/model.php | 55 ++++++++++++++++++++ 8 files changed, 68 insertions(+), 9 deletions(-) diff --git a/db/update17.6.2.sql b/db/update17.6.2.sql index 601887adc3..575e6ecbe7 100644 --- a/db/update17.6.2.sql +++ b/db/update17.6.2.sql @@ -4,3 +4,4 @@ ALTER TABLE `zt_kanban` ADD `maxColWidth` smallint(4) NOT NULL DEFAULT '384' AFT ALTER TABLE `zt_project` ADD `colWidth` smallint(4) NOT NULL DEFAULT '264' AFTER `fluidBoard`; ALTER TABLE `zt_project` ADD `minColWidth` smallint(4) NOT NULL DEFAULT '180' AFTER `colWidth`; ALTER TABLE `zt_project` ADD `maxColWidth` smallint(4) NOT NULL DEFAULT '384' AFTER `minColWidth`; +REPLACE INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', 'global', 'syncProductFeedback', '{}'); diff --git a/db/update17.6.sql b/db/update17.6.sql index d8545cd6e1..5f0cbf39ea 100644 --- a/db/update17.6.sql +++ b/db/update17.6.sql @@ -13,7 +13,5 @@ CREATE TABLE `zt_taskteam` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ALTER TABLE `zt_taskestimate` ADD `order` tinyint unsigned NOT NULL DEFAULT '0'; ALTER TABLE `zt_effort` ADD `order` tinyint unsigned NOT NULL DEFAULT '0' AFTER `end`; - -REPLACE INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', 'global', 'syncProductFeedback', '0'); ALTER TABLE `zt_storyspec` ADD `files` text NOT NULL AFTER `verify`; ALTER TABLE `zt_block` CHANGE `block` `block` varchar(30) COLLATE 'utf8_general_ci' NOT NULL AFTER `source`; diff --git a/db/zentao.sql b/db/zentao.sql index 4e57f6efd3..043b03f457 100755 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -6309,7 +6309,7 @@ INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES (' INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'project', '', 'unitList', 'CNY,USD'); INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'project', '', 'defaultCurrency', 'CNY'); INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'story', '', 'reviewRules', 'allpass'); -INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', 'global', 'syncProductFeedback', '0'); +INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', 'global', 'syncProductFeedback', '{}'); -- DROP TABLE IF EXISTS `zt_im_chat`; CREATE TABLE IF NOT EXISTS `zt_im_chat` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, diff --git a/module/product/model.php b/module/product/model.php index 33d81fcbb8..bac3985956 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -2313,7 +2313,7 @@ class productModel extends model } elseif($module == 'feedback') { - return helper::createLink($module, $method, "browseType=byProduct&productID=%s"); + return helper::createLink('feedback', 'admin', "browseType=byProduct&productID=%s"); } return $link; diff --git a/module/product/view/ajaxgetdropmenu.html.php b/module/product/view/ajaxgetdropmenu.html.php index 4147879cbe..eeddfd93c2 100644 --- a/module/product/view/ajaxgetdropmenu.html.php +++ b/module/product/view/ajaxgetdropmenu.html.php @@ -139,7 +139,7 @@ $closedProductsHtml .= ''; product->closed?> app->tab == 'feedback'):?> - product->all, '', "class='not-list-item pull-left toggle-left-col $selected'"); ?> + product->all, '', "class='not-list-item pull-left toggle-left-col $selected'"); ?> diff --git a/module/tree/control.php b/module/tree/control.php index fd5cd84e2a..5d468bde1e 100644 --- a/module/tree/control.php +++ b/module/tree/control.php @@ -143,7 +143,6 @@ class tree extends control $this->view->root = $root; $title = $this->lang->tree->manageFeedback; - $this->lang->feedback->menu->browse['subMenu'] = new stdclass(); $position[] = html::a($this->createLink('feedback', 'admin'), $this->lang->tree->manageFeedback); } elseif($viewType == 'case') diff --git a/module/tree/model.php b/module/tree/model.php index ca55b7d513..bb8c400352 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -80,7 +80,10 @@ class treeModel extends model $startModule = $this->getById($startModule); if($startModule) $startModulePath = $startModule->path . '%'; } - if($type == 'feedback' and strpos($param, 'noproduct') === false) $type = 'story,' . $type; + + /* If feedback module is merge add story module.*/ + $syncConfig = json_decode($this->config->global->syncProductFeedback, true); + if($type == 'feedback' and strpos($param, 'noproduct') === false and isset($syncConfig[$rootID])) $type = 'story,' . $type; if($this->isMergeModule($rootID, $type)) { return $this->dao->select('*')->from(TABLE_MODULE) @@ -1378,10 +1381,13 @@ class treeModel extends model { if($type == 'line') $rootID = 0; + $syncConfig = json_decode($this->config->global->syncProductFeedback, true); + if($type == 'feedback' and isset($syncConfig[$rootID])) $type = "$type,story"; + /* if createVersion <= 4.1 or type == 'story', only get modules of its type. */ if(!$this->isMergeModule($rootID, $type) or $type == 'story') { - if($type == 'feedback') $type = "$type,story"; + return $this->dao->select('*')->from(TABLE_MODULE) ->where('root')->eq((int)$rootID) ->andWhere('parent')->eq((int)$moduleID) @@ -1397,7 +1403,7 @@ class treeModel extends model } /* else get modules of its type and story type. */ - if(strpos('task|case|bug|feedback', $type) !== false) $type = "$type,story"; + if(strpos('task|case|bug', $type) !== false) $type = "$type,story"; return $this->dao->select('*')->from(TABLE_MODULE) ->where('root')->eq((int)$rootID) diff --git a/module/upgrade/model.php b/module/upgrade/model.php index cf32236c89..5027bce860 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -713,6 +713,9 @@ class upgradeModel extends model $this->addFlowActions('biz7.4'); $this->addFlowFields('biz7.4'); break; + case 'biz7_6_2': + $this->processFeedbackModule(); + } } @@ -7508,4 +7511,56 @@ class upgradeModel extends model } return true; } + + /** + * Process feedback module + * + * @access public + * @return void + */ + public function processFeedbackModule() + { + $products = $this->dao->select('id, name')->from(TABLE_PRODUCT)->fetchAll(); + $modules = $this->dao->select('*')->from(TABLE_MODULE)->where('type')->eq('feedback')->andWhere('root')->eq(0)->fetchAll('id'); + $feedbacks = $this->dao->select('*')->from(TABLE_FEEDBACK)->fetchAll(); + + $allProductRelation = array(); + foreach($products as $product) + { + $productID = $product->id; + $relation = array(); + foreach($modules as $moduleID => $module) + { + unset($module->id); + $module->root = $productID; + $this->dao->insert(TABLE_MODULE)->data($module)->exec(); + $newModuleID = $this->dao->lastInsertID(); + $relation[$moduleID] = $newModuleID; + $allProductRelation[$productID][$moduleID] = $newModuleID; + $newPaths = array(); + foreach(explode(',', trim($module->path, ',')) as $path) + { + if(isset($relation[$path])) $newPaths[] = $relation[$path]; + } + $newPaths = join(',', $newPaths); + $parent = !empty($module->parent) ? $relation[$module->parent] : 0; + $this->dao->update(TABLE_MODULE)->set('path')->eq($newPaths)->set('parent')->eq($parent)->where('id')->eq($newModuleID)->exec(); + } + } + + /* Update feedback module */ + foreach($feedbacks as $feedback) + { + $moduleID = $feedback->module; + $product = $feedback->product; + if(empty($moduleID)) continue; + $newModuleID = isset($allProductRelation[$product][$moduleID]) ? $allProductRelation[$product][$moduleID] : 0; + if(empty($newModuleID)) continue; + + $this->dao->update(TABLE_FEEDBACK)->set('module')->eq($newModuleID)->where('id')->eq($feedback->id)->exec(); + } + + /* Delete history module */ + $this->dao->delete()->from(TABLE_MODULE)->where('type')->eq('feedback')->andWhere('root')->eq(0)->exec(); + } } From 6ed33f54dce8a094271c86d170ab8f5b50bafc94 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Tue, 18 Oct 2022 15:31:42 +0800 Subject: [PATCH 23/40] * Adjust modify comments. --- module/tree/model.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/tree/model.php b/module/tree/model.php index bb8c400352..53bcaa06aa 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -63,7 +63,7 @@ class treeModel extends model * Build the sql query. * * @param int $rootID - * @param int $type + * @param string $type * @param int $startModule * @param string|int $branch * @param string $param @@ -126,8 +126,9 @@ class treeModel extends model * @param int $startModule * @param int|array $branch * @param string $param + * @param string $grade * @access public - * @return string + * @return void */ public function getOptionMenu($rootID, $type = 'story', $startModule = 0, $branch = 0, $param = 'nodeleted', $grade = 'all') { From efbbc8a15e36e558498f0821f376a2686f3f6d1a Mon Sep 17 00:00:00 2001 From: zhouxin Date: Tue, 18 Oct 2022 15:34:05 +0800 Subject: [PATCH 24/40] * Fix bug. --- module/my/control.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/my/control.php b/module/my/control.php index 976db3d603..2958fa1100 100755 --- a/module/my/control.php +++ b/module/my/control.php @@ -156,6 +156,7 @@ class my extends control $ncCount = 0; $qaCount = 0; $meetingCount = 0; + $ticketCount = 0; $isMax = $this->config->edition == 'max' ? 1 : 0; $feedbackCount = 0; From 7469bebf0a898044533fb936cb338aac54a6cae6 Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Tue, 18 Oct 2022 16:53:10 +0800 Subject: [PATCH 25/40] task #72131 --- db/update17.6.2.sql | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/db/update17.6.2.sql b/db/update17.6.2.sql index 9e1e6b7722..d3a06f737b 100644 --- a/db/update17.6.2.sql +++ b/db/update17.6.2.sql @@ -67,4 +67,9 @@ ALTER TABLE `zt_kanban` ADD `minColWidth` smallint(4) NOT NULL DEFAULT '180' AFT ALTER TABLE `zt_kanban` ADD `maxColWidth` smallint(4) NOT NULL DEFAULT '384' AFTER `minColWidth`; ALTER TABLE `zt_project` ADD `colWidth` smallint(4) NOT NULL DEFAULT '264' AFTER `fluidBoard`; ALTER TABLE `zt_project` ADD `minColWidth` smallint(4) NOT NULL DEFAULT '180' AFTER `colWidth`; -ALTER TABLE `zt_project` ADD `maxColWidth` smallint(4) NOT NULL DEFAULT '384' AFTER `minColWidth`; \ No newline at end of file +ALTER TABLE `zt_project` ADD `maxColWidth` smallint(4) NOT NULL DEFAULT '384' AFTER `minColWidth`; + +/* feedback */ +ALTER TABLE `zt_feedback` ADD `pri` tinyint unsigned NOT NULL DEFAULT 2; +ALTER TABLE `zt_feedback` ADD `source` varchar(255) NOT NULL; +ALTER TABLE `zt_feedback` CHANGE `pri` `pri` tinyint unsigned NOT NULL DEFAULT 2; \ No newline at end of file From 9ea2d135b3a4a24819c752b526713c3d9b2f9b05 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Tue, 18 Oct 2022 17:29:34 +0800 Subject: [PATCH 26/40] * Fix bug #28624. --- module/tree/control.php | 1 + module/tree/view/browse.html.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/module/tree/control.php b/module/tree/control.php index 5d468bde1e..2cb3028419 100644 --- a/module/tree/control.php +++ b/module/tree/control.php @@ -141,6 +141,7 @@ class tree extends control $root = new stdclass(); $root->name = !empty($rootID) ? $productItem->name : $this->lang->feedback->common; $this->view->root = $root; + $this->view->syncConfig = json_decode($this->config->global->syncProductFeedback, true); $title = $this->lang->tree->manageFeedback; $position[] = html::a($this->createLink('feedback', 'admin'), $this->lang->tree->manageFeedback); diff --git a/module/tree/view/browse.html.php b/module/tree/view/browse.html.php index 1183e8c7b1..fa224c9778 100644 --- a/module/tree/view/browse.html.php +++ b/module/tree/view/browse.html.php @@ -105,7 +105,7 @@ if($viewType == 'doc' or $viewType == 'api')
tree->syncFromProduct, '', "class='btn btn-sm btn-primary'")?>
- +
createLink('feedback', 'syncProduct', "productID=$rootID", '', true), $lang->tree->syncProductModule, '', "class='btn btn-sm btn-primary iframe'");?>
From 80ee6fb2b190676a98ad491fda1a59ce7103bd6b Mon Sep 17 00:00:00 2001 From: tianshujie Date: Wed, 19 Oct 2022 08:25:02 +0800 Subject: [PATCH 27/40] * Fix bug #28573. --- module/testtask/lang/zh-cn.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/testtask/lang/zh-cn.php b/module/testtask/lang/zh-cn.php index 89383c248e..a2712d8935 100644 --- a/module/testtask/lang/zh-cn.php +++ b/module/testtask/lang/zh-cn.php @@ -108,7 +108,7 @@ $lang->testtask->summary = '有%s个用例,失败%s个,耗时%s。 $lang->testtask->pageSummary = '本页共 %s 个测试单。'; $lang->testtask->mySummary = '本页共 %s 个测试单,待测试测试单 %s,测试中测试单 %s,被阻塞测试单 %s。'; $lang->testtask->allSummary = '本页共 %s 个测试单,待测试测试单 %s,测试中测试单 %s,被阻塞测试单 %s,已测测试单 %s。'; -$lang->testtask->checkedAllSummary = '共选中 %total% 个测试单,待测试测试单 %wait%,测试中测试单 %testing%,被阻塞测试单 %blocked%,,已测测试单 %done%。'; +$lang->testtask->checkedAllSummary = '共选中 %total% 个测试单,待测试测试单 %wait%,测试中测试单 %testing%,被阻塞测试单 %blocked%,已测测试单 %done%。'; $lang->testtask->beginAndEnd = '起止时间'; $lang->testtask->to = '至'; From c452bd3595870320b980f87dc1540a801720afa4 Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Wed, 19 Oct 2022 08:27:20 +0800 Subject: [PATCH 28/40] task #72131 --- db/update17.6.2.sql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/db/update17.6.2.sql b/db/update17.6.2.sql index d3a06f737b..1205c3989a 100644 --- a/db/update17.6.2.sql +++ b/db/update17.6.2.sql @@ -69,7 +69,6 @@ ALTER TABLE `zt_project` ADD `colWidth` smallint(4) NOT NULL DEFAULT '264' AFTER ALTER TABLE `zt_project` ADD `minColWidth` smallint(4) NOT NULL DEFAULT '180' AFTER `colWidth`; ALTER TABLE `zt_project` ADD `maxColWidth` smallint(4) NOT NULL DEFAULT '384' AFTER `minColWidth`; -/* feedback */ ALTER TABLE `zt_feedback` ADD `pri` tinyint unsigned NOT NULL DEFAULT 2; ALTER TABLE `zt_feedback` ADD `source` varchar(255) NOT NULL; -ALTER TABLE `zt_feedback` CHANGE `pri` `pri` tinyint unsigned NOT NULL DEFAULT 2; \ No newline at end of file +ALTER TABLE `zt_feedback` CHANGE `pri` `pri` tinyint unsigned NOT NULL DEFAULT 2; From 484cffa1a133788b2015bc0a8dfb5ac1b664267d Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Wed, 19 Oct 2022 09:33:26 +0800 Subject: [PATCH 29/40] * Add ticket module. --- db/update17.6.2.sql | 2 +- db/zentao.sql | 2 +- module/product/model.php | 4 ++++ module/product/view/ajaxgetdropmenu.html.php | 5 +++++ module/tree/control.php | 9 ++++---- module/tree/model.php | 23 ++++++++++++++++---- module/tree/view/browse.html.php | 6 ++++- 7 files changed, 40 insertions(+), 11 deletions(-) diff --git a/db/update17.6.2.sql b/db/update17.6.2.sql index ef413b5d97..8ee98cdf49 100644 --- a/db/update17.6.2.sql +++ b/db/update17.6.2.sql @@ -69,4 +69,4 @@ ALTER TABLE `zt_project` ADD `colWidth` smallint(4) NOT NULL DEFAULT '264' AFTER ALTER TABLE `zt_project` ADD `minColWidth` smallint(4) NOT NULL DEFAULT '180' AFTER `colWidth`; ALTER TABLE `zt_project` ADD `maxColWidth` smallint(4) NOT NULL DEFAULT '384' AFTER `minColWidth`; -REPLACE INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', 'global', 'syncProductFeedback', '{}'); +REPLACE INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', 'global', 'syncProduct', '{"feedback":{},"ticket":{}}'); diff --git a/db/zentao.sql b/db/zentao.sql index f82efc8be9..49725315db 100755 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -6309,7 +6309,7 @@ INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES (' INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'project', '', 'unitList', 'CNY,USD'); INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'project', '', 'defaultCurrency', 'CNY'); INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'story', '', 'reviewRules', 'allpass'); -INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', 'global', 'syncProductFeedback', '{}'); +INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', 'global', 'syncProduct', '{"feedback":{},"ticket":{}}'); -- DROP TABLE IF EXISTS `zt_im_chat`; CREATE TABLE IF NOT EXISTS `zt_im_chat` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, diff --git a/module/product/model.php b/module/product/model.php index bac3985956..3f79ead694 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -2315,6 +2315,10 @@ class productModel extends model { return helper::createLink('feedback', 'admin', "browseType=byProduct&productID=%s"); } + elseif($module == 'ticket') + { + return helper::createLink('ticket', 'browse', "browseType=byProduct&productID=%s"); + } return $link; } diff --git a/module/product/view/ajaxgetdropmenu.html.php b/module/product/view/ajaxgetdropmenu.html.php index eeddfd93c2..e6d20e7f80 100644 --- a/module/product/view/ajaxgetdropmenu.html.php +++ b/module/product/view/ajaxgetdropmenu.html.php @@ -139,8 +139,13 @@ $closedProductsHtml .= ''; product->closed?> app->tab == 'feedback'):?> + product->all, '', "class='not-list-item pull-left toggle-left-col $selected'"); ?> + + product->all, '', "class='not-list-item pull-left toggle-left-col $selected'"); ?> + + diff --git a/module/tree/control.php b/module/tree/control.php index 2cb3028419..e874172f05 100644 --- a/module/tree/control.php +++ b/module/tree/control.php @@ -45,7 +45,7 @@ class tree extends control $products = $this->product->getProducts($this->session->project, 'all', '', false); if($viewType == 'case') $this->lang->modulePageNav = $this->product->select($products, $rootID, 'tree', 'browse', 'case', $branch); } - else if($this->app->tab == 'feedback') + else if($this->app->tab == 'feedback' or $this->app->tab == 'ticket') { $products = $this->loadModel('feedback')->getGrantProducts(); if(!$rootID) $rootID = key($products); @@ -133,7 +133,7 @@ class tree extends control $position[] = html::a($this->createLink('bug', 'browse', "product=$rootID"), $product->name); $position[] = $this->lang->tree->manageBug; } - elseif($viewType == 'feedback') + elseif($viewType == 'feedback' or $viewType == 'ticket') { $this->app->loadLang('feedback'); $this->lang->tree->menu = $this->lang->feedback->menu; @@ -141,9 +141,10 @@ class tree extends control $root = new stdclass(); $root->name = !empty($rootID) ? $productItem->name : $this->lang->feedback->common; $this->view->root = $root; - $this->view->syncConfig = json_decode($this->config->global->syncProductFeedback, true); + $syncConfig = json_decode($this->config->global->syncProduct, true); + $this->view->syncConfig = isset($syncConfig[$viewType]) ? $syncConfig[$viewType] : array(); - $title = $this->lang->tree->manageFeedback; + $title = $this->lang->tree->{$viewType == 'feedback' ? 'manageFeedback' : 'manageTicket'}; $position[] = html::a($this->createLink('feedback', 'admin'), $this->lang->tree->manageFeedback); } elseif($viewType == 'case') diff --git a/module/tree/model.php b/module/tree/model.php index 53bcaa06aa..574008eff8 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -82,8 +82,9 @@ class treeModel extends model } /* If feedback module is merge add story module.*/ - $syncConfig = json_decode($this->config->global->syncProductFeedback, true); - if($type == 'feedback' and strpos($param, 'noproduct') === false and isset($syncConfig[$rootID])) $type = 'story,' . $type; + $syncConfig = json_decode($this->config->global->syncProduct, true); + $syncConfig = isset($syncConfig[$type]) ? $syncConfig[$type] : array(); + if(($type == 'feedback' or $type == 'ticket') and strpos($param, 'noproduct') === false and isset($syncConfig[$rootID])) $type = 'story,' . $type; if($this->isMergeModule($rootID, $type)) { return $this->dao->select('*')->from(TABLE_MODULE) @@ -1312,6 +1313,19 @@ class treeModel extends model return html::a(helper::createLink('feedback', $this->app->methodName, "type=byModule¶m={$module->id}"), $module->name, '_self', "id='module{$module->id}' title='{$module->name}'"); } + /** + * Create link of ticket. + * + * @param string $type + * @param object $module + * @access public + * @return string + */ + public function createTicketLink($type, $module) + { + return html::a(helper::createLink('ticket', $this->app->methodName, "type=byModule¶m={$module->id}"), $module->name, '_self', "id='module{$module->id}' title='{$module->name}'"); + } + /** * Create link of trainskill. * @@ -1382,8 +1396,9 @@ class treeModel extends model { if($type == 'line') $rootID = 0; - $syncConfig = json_decode($this->config->global->syncProductFeedback, true); - if($type == 'feedback' and isset($syncConfig[$rootID])) $type = "$type,story"; + $syncConfig = json_decode($this->config->global->syncProduct, true); + $syncConfig = isset($syncConfig[$type]) ? $syncConfig[$type] : array(); + if(($type == 'feedback' or $type == 'ticket') and isset($syncConfig[$rootID])) $type = "$type,story"; /* if createVersion <= 4.1 or type == 'story', only get modules of its type. */ if(!$this->isMergeModule($rootID, $type) or $type == 'story') diff --git a/module/tree/view/browse.html.php b/module/tree/view/browse.html.php index fa224c9778..84a5815426 100644 --- a/module/tree/view/browse.html.php +++ b/module/tree/view/browse.html.php @@ -106,7 +106,9 @@ if($viewType == 'doc' or $viewType == 'api')
tree->syncFromProduct, '', "class='btn btn-sm btn-primary'")?>
-
createLink('feedback', 'syncProduct', "productID=$rootID", '', true), $lang->tree->syncProductModule, '', "class='btn btn-sm btn-primary iframe'");?>
+
createLink('feedback', 'syncProduct', "productID=$rootID", '', true), $lang->tree->syncProductModule, '', "class='btn btn-sm btn-primary iframe' data-width='40%'");?>
+ +
createLink('ticket', 'syncProduct', "productID=$rootID", '', true), $lang->tree->syncProductModule, '', "class='btn btn-sm btn-primary iframe' data-width='40%'");?>
@@ -229,6 +231,8 @@ $(function() var $toggle = $('' + link + ''); if(item.type === 'bug') $toggle.append('  [B]'); if(item.type === 'case') $toggle.append('  [C]'); + if(item.type === 'feedback') $toggle.append('  [F]'); + if(item.type === 'ticket') $toggle.append('  [T]'); $li.append($toggle); if(item.nodeType || item.type) $li.addClass('tree-item-' + (item.nodeType || item.type)); $li.toggleClass('active', === item.id); From 7959557283713b92b5b3664dcf0ad00672cd209b Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Wed, 19 Oct 2022 11:05:35 +0800 Subject: [PATCH 30/40] * Fix bug #28647. --- module/tree/view/browse.html.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module/tree/view/browse.html.php b/module/tree/view/browse.html.php index 84a5815426..daec520156 100644 --- a/module/tree/view/browse.html.php +++ b/module/tree/view/browse.html.php @@ -330,6 +330,11 @@ $(function() $('#subNavbar > ul > li > a[href*=tree][href*=browse]').not('[href*=]').parent().removeClass('active'); if(window.config.viewType == 'line') $('#modulemenu > .nav > li > a[href*=product][href*=all]').parent('li[data-id=all]').addClass('active'); if(viewType == 'case' || viewType == 'caselib') $('#subNavbar li[data-id="' + viewType +'"]').addClass('active'); + if(viewType == 'ticket') + { + $('#navbar li[data-id="browse"]').removeClass('active'); + $('#navbar li[data-id="' + viewType +'"]').addClass('active'); + } }); if("") parent.$('#triggerModal .modal-content .modal-header .close').on('click', function(){parent.location.reload();}); From 68f702d9ef53a902075ec3353871983ea1a18ede Mon Sep 17 00:00:00 2001 From: wangzemei Date: Wed, 19 Oct 2022 11:07:04 +0800 Subject: [PATCH 31/40] * fix 28395 28640 28406 --- module/my/js/requirement.js | 1 + module/my/view/requirement.html.php | 5 +++-- module/product/css/browse.css | 1 + module/project/view/bug.html.php | 1 + module/task/css/common.css | 3 +-- module/task/css/create.css | 2 +- www/js/my.full.js | 2 +- 7 files changed, 9 insertions(+), 6 deletions(-) diff --git a/module/my/js/requirement.js b/module/my/js/requirement.js index 65996d23e9..7ce09255ea 100644 --- a/module/my/js/requirement.js +++ b/module/my/js/requirement.js @@ -7,6 +7,7 @@ $(function() if($td.find('.label').length > 0) labelWidth = $td.find('.label').width(); $td.find('a').eq(0).css('max-width', $td.width() - labelWidth - 60); }); + toggleFold('#myStoryForm', [], 0, 'requirement'); $(document).on('click', '.story-toggle', function(e) { diff --git a/module/my/view/requirement.html.php b/module/my/view/requirement.html.php index 4072cb4d9f..449c7ef409 100644 --- a/module/my/view/requirement.html.php +++ b/module/my/view/requirement.html.php @@ -11,6 +11,7 @@ */ ?> + recTotal);?> rawMethod);?> @@ -79,7 +80,7 @@ $canBeChanged = common::canBeChanged('story', $story); $spanClass = $canBatchAction ? 'c-span' : ''; ?> - +
@@ -91,7 +92,7 @@ title, null, "style='color: $story->color' data-group='product' title='$story->title'") : "$story->title";?> - children)) echo '';?> + children)) echo '';?> pri;?>' title='story->priList, $story->pri, $story->pri);?>'>story->priList, $story->pri, $story->pri);?> processStatus('story', $story);?> diff --git a/module/product/css/browse.css b/module/product/css/browse.css index 687cadd585..dd98a82845 100644 --- a/module/product/css/browse.css +++ b/module/product/css/browse.css @@ -41,3 +41,4 @@ a.removeModule:hover {color: red;} #productStoryForm tbody tr td .label {max-width: 100px; text-overflow: unset;} .c-span {margin-left: 19px;} .btn-toolbar #query span.text{overflow: hidden; width: 52px; vertical-align: middle; margin-right: 1px;} +#productStoryForm table thead th.c-title {min-width: 50px;} diff --git a/module/project/view/bug.html.php b/module/project/view/bug.html.php index 545084f854..26d7033472 100644 --- a/module/project/view/bug.html.php +++ b/module/project/view/bug.html.php @@ -17,6 +17,7 @@ #subHeader #dropMenu .col-left {padding-bottom: 0px;} #currentBranch + #dropMenu .col-left {padding-bottom: 30px;} .c-deadline {text-align: center;} +#mainContent .main-col {padding-bottom: 20px;}