From 7a8aa2be4a2f05f61813cd3b2dc64075e7b71e94 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Mon, 27 Feb 2023 23:54:11 +0000 Subject: [PATCH 01/18] * Add the biz and max changelog. --- doc/CHANGELOG | 96 ++++++++++++++++++++++++++++++++++++++ module/misc/lang/de.php | 2 +- module/misc/lang/en.php | 2 +- module/misc/lang/fr.php | 2 +- module/misc/lang/zh-cn.php | 2 +- 5 files changed, 100 insertions(+), 4 deletions(-) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 9183299b31..851e60430e 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -130,6 +130,102 @@ 修复的Bug 开源版: 32397 地盘待处理任务搜索界面报错 +企业版: +18695 bug重新步骤有图片,导出mht没有图片 +22568 特殊情况下,上线中不显示添加的计划 +23227 导出xls格式模板部门字段点击下拉控件无反应 +23588 反馈列表批量编辑时,所属产品作为必填项为空时可以保存 +24026 导出的word中显示多余的空行 +24733 反馈转待办页面,提示关联编号不能为空 +24881 没有详情权限时,历史记录中不应展示链接 +24897 切换左侧筛选标签,上方标签统计数字消失 +24932 自定义切换语言未选中“适用当前语言” +24935 只有默认反馈关闭原因,切换到法语,语言项有问题 +24944 没有详情页权限,点击历史记录提示没权限 +24997 追问时提示回复内容不能为空 +25008 需求详情页弹窗,撤销评审后变空白页了 +25010 任务列表详情页弹窗,返回按钮点击没反应 +25017 导出用例时<>会被转义为<> +25082 用例导入是带有<>符号时显示异常 +25104 反馈指派后,指派人在反馈列表看不到指派的反馈 +25183 测试用例下从用例库导入的用例未同步到项目测试用例下 +25251 代码评审详情页转任务时提示信息不合理 +25442 账号页面搜索条件选择由谁添加/编辑时未列出系统用户 +25468 反馈列表,创建人字段鼠标悬浮不能显示title +25475 法语下创建FAQ按钮语言项错误 +25853 用例详情页显示了导入用例库按钮 +25883 地盘-日志,点击任意日期添加日志遮罩无反应 +26140 wiki文档搜索结果错误 +26147 法语下切换研发综合界面和迅捷界面报错 +26227 一个Bug有多个附件时,导出后多个附件显示在多列了 +26341 用户需求列表导出显示了“所属计划”字段 +26422 数据富文本字段中带有表格时,导出xlsx表格中列宽太宽 +26427 导出项目下研发需求模块和计划显示不正确 +26432 导入需求评审人可以选择所有产品成员 +26435 导出的用例库模板中显示了产品的所属模块 +26436 测试用例库导出模板没有包含模块的系统数据 +26439 项目测试下导入的用例只显示了测试视图下的用例列表中 +26440 导出任务,来源Bug字段只显示了Bug的id +26444 工作流导出模板后导入后,提示没有有效数据 +26446 新增工作流下载模板,里面的字段不对 +26552 文档的上一篇按钮显示缺失 +26568 用例导出特殊字符会异常 +26680 执行甘特图中按钮无图标 +26855 导入时,关掉错误提示弹框,导入按钮置灰 +27039 批量编辑反馈时指派给显示了closed +27113 英文下反馈标签栏换行显示 +27119 反馈转待办,完成待办后动态中缺少语言项 +27127 编辑执行和创建执行可用工作日逻辑不一致 +27207 创建反馈时产品的下拉列表显示顺序和反馈权限列表顺序不一致 +27322 导出反馈数据,数据中字段没有进行重新排序 +27571 执行视图分组视图导出的任务列表相关研发需求丢失 +28630 反馈列表选择产品后,创建反馈时没有显示已选产品 +28680 创建反馈页面选择产品下拉菜单中产品顺序不正确 +28722 编辑反馈时没有显示来源公司字段 +28773 产品模块下的反馈转研发需求/用户需求时,模块没有自动带出来 +28780 新增日志时工作内容输入空格可以保存成功 +28804 工单详情页来源字段处,反馈编号前建议增加“#” +28869 导入用例相关研发需求换行显示 +28890 反馈列表操作按钮换行 +32093 影响版本下拉单选多选不固定 +32098 反馈同步产品模块,反馈模块太长不能完全显示 +旗舰版: +24152 新增自定义严重程度时,QA执行检查时严重程度显示被遮挡 +24499 添加一个风险区块按照状态倒叙排序,默认排序与手动状态倒叙排序不一致 +24525 审批流中选择多个审批人,发起审批时只显示第一个 +24577 审批流中审批类型为角色,发起审批时不显示 +24723 会议生成的日程没有创建日程的历史记录 +24816 德语法语下资产库操作栏菜单显示不全 +24872 资产库预览文档时切换BIG5格式不成功 +25127 评审的问题列表选择评审项后,评审项显示不完整 +25477 过程名称很长时在左侧检查对象区块中显示问题 +25654 QA质量保证计划再次编辑时,不能看到上次填写的备注 +25966 点击上一步回到基础信息页面后,部分信息显示不正确 +25976 阶段的访问控制改为私有后,当前用户也看不到该阶段了 +26041 会议记录页面只显示了在该页面上传的附件 +26288 待处理/贡献、组织团队下的风险列表中风险系数和优先级样式未调整 +26474 升级禅道15系列介绍页面视频下方的空白建议调小点 +26577 基线评审,概要设计名称中含有“-”,获取系统数据会有问题 +26615 工期估算页面展示的界面错误导致无法保存 +27355 质量保证计划检查结果为否,未校验严重程度是否为空 +29011 问题详情页未指派样式建议优化 +29169 费用估算列表的阶段字段换行显示 +29222 分页查看执行附件库时,跳转到文档执行库下 +29413 费用估算列表页中阶段名称换行了 +30351 工作流增加富文本字段,导出后带有html标签,可读性差 +30843 旗舰版瀑布项目阶段排序后,甘特图不会同步 +30912 设置阶段时,输出选择多项后整个页面样式不友好 +31059 火狐浏览器设计审批流页面添加审批节点后页面显示不全不能滑动显示 +31414 审批流浏览器通知,有多条重复标题 +31425 浏览器通知中未显示名称 +31443 任务删除时,同时删除依赖关系 +31941 正在审批的流程显示了上一次审批节点的结果 +31943 项目型项目发起研发需求评审,评审页面无结构化评审内容 +31957 回收站中点击评审问题,详情页中有解决按钮 +31962 删除的文档/活动没有标记已删除 +31964 复制项目型项目提示关联产品或创建产品 +31996 后台过程列表执行搜索后,模型的二级导航下拉菜单高亮了两个 +32117 配置项删除按钮与系统的不一致 2023-02-08 18.1 完成的需求 diff --git a/module/misc/lang/de.php b/module/misc/lang/de.php index 324127988f..9d442bf1ad 100644 --- a/module/misc/lang/de.php +++ b/module/misc/lang/de.php @@ -200,7 +200,7 @@ $lang->misc->releaseDate['7.1.stable'] = '2015-03-07'; $lang->misc->releaseDate['6.3.stable'] = '2014-11-07'; /* Release Detail. */ -$lang->misc->feature->all['18.2'][] = array('title' => 'Agile Plus and Waterfall Plus management models are newly added. Support for unlimited splitting of waterfall project stages. The UI of Admin is completely upgraded and redesigned.', 'desc' => ''); +$lang->misc->feature->all['18.2'][] = array('title' => 'Agile Plus and Waterfall Plus management models are newly added. Support for unlimited splitting of waterfall project stages. The UI of Admin is completely upgraded and redesigned. Fix bugs.', 'desc' => ''); $lang->misc->feature->all['18.1'][] = array('title' => 'The automation testing solution interaction is optimized, while a new snapshot management function is newly added. ZenTao IM implemented online collaboration of PPT documents.Fix bugs.', 'desc' => ''); $lang->misc->feature->all['18.0'][] = array('title' => "Automated test solutions are proposed. Work order related functions are added to the Operation Management Interface. Approval workflow support for adding all types of notifications. And at the same time, we have further improved the earned value calculation rules.", 'desc' => ''); $lang->misc->feature->all['18.0.beta3'][] = array('title' => "The module Statistic is upgraded to BI, with 5 built-in large screens of macro management dimensions.", 'desc' => ''); diff --git a/module/misc/lang/en.php b/module/misc/lang/en.php index 8a6655824b..07c712660f 100644 --- a/module/misc/lang/en.php +++ b/module/misc/lang/en.php @@ -200,7 +200,7 @@ $lang->misc->releaseDate['7.1.stable'] = '2015-03-07'; $lang->misc->releaseDate['6.3.stable'] = '2014-11-07'; /* Release Detail. */ -$lang->misc->feature->all['18.2'][] = array('title' => 'Agile Plus and Waterfall Plus management models are newly added. Support for unlimited splitting of waterfall project stages. The UI of Admin is completely upgraded and redesigned.', 'desc' => ''); +$lang->misc->feature->all['18.2'][] = array('title' => 'Agile Plus and Waterfall Plus management models are newly added. Support for unlimited splitting of waterfall project stages. The UI of Admin is completely upgraded and redesigned. Fix bugs.', 'desc' => ''); $lang->misc->feature->all['18.1'][] = array('title' => 'The automation testing solution interaction is optimized, while a new snapshot management function is newly added. ZenTao IM implemented online collaboration of PPT documents.Fix bugs.', 'desc' => ''); $lang->misc->feature->all['18.0'][] = array('title' => "Automated test solutions are proposed. Work order related functions are added to the Operation Management Interface. Approval workflow support for adding all types of notifications. And at the same time, we have further improved the earned value calculation rules.", 'desc' => ''); $lang->misc->feature->all['18.0.beta3'][] = array('title' => "The module Statistic is upgraded to BI, with 5 built-in large screens of macro management dimensions.", 'desc' => ''); diff --git a/module/misc/lang/fr.php b/module/misc/lang/fr.php index 2060606572..4780d2817f 100644 --- a/module/misc/lang/fr.php +++ b/module/misc/lang/fr.php @@ -200,7 +200,7 @@ $lang->misc->releaseDate['7.1.stable'] = '2015-03-07'; $lang->misc->releaseDate['6.3.stable'] = '2014-11-07'; /* Release Detail. */ -$lang->misc->feature->all['18.2'][] = array('title' => 'Agile Plus and Waterfall Plus management models are newly added. Support for unlimited splitting of waterfall project stages. The UI of Admin is completely upgraded and redesigned.', 'desc' => ''); +$lang->misc->feature->all['18.2'][] = array('title' => 'Agile Plus and Waterfall Plus management models are newly added. Support for unlimited splitting of waterfall project stages. The UI of Admin is completely upgraded and redesigned. Fix bugs.', 'desc' => ''); $lang->misc->feature->all['18.1'][] = array('title' => 'The automation testing solution interaction is optimized, while a new snapshot management function is newly added. ZenTao IM implemented online collaboration of PPT documents.Fix bugs.', 'desc' => ''); $lang->misc->feature->all['18.0'][] = array('title' => "Automated test solutions are proposed. Work order related functions are added to the Operation Management Interface. Approval workflow support for adding all types of notifications. And at the same time, we have further improved the earned value calculation rules.", 'desc' => ''); $lang->misc->feature->all['18.0.beta3'][] = array('title' => "The module Statistic is upgraded to BI, with 5 built-in large screens of macro management dimensions.", 'desc' => ''); diff --git a/module/misc/lang/zh-cn.php b/module/misc/lang/zh-cn.php index 00f8682669..9e3fc37578 100644 --- a/module/misc/lang/zh-cn.php +++ b/module/misc/lang/zh-cn.php @@ -200,7 +200,7 @@ $lang->misc->releaseDate['7.1.stable'] = '2015-03-07'; $lang->misc->releaseDate['6.3.stable'] = '2014-11-07'; /* Release Detail. */ -$lang->misc->feature->all['18.2'][] = array('title' => '新增融合敏捷、融合瀑布管理模型,瀑布项目阶段支持无限级拆分,后台进行全新UI改版。', 'desc' => ''); +$lang->misc->feature->all['18.2'][] = array('title' => '新增融合敏捷、融合瀑布管理模型,瀑布项目阶段支持无限级拆分,后台进行全新UI改版。修复Bug。', 'desc' => ''); $lang->misc->feature->all['18.1'][] = array('title' => '自动化测试解决方案交互优化、新增快照管理功能。禅道客户端实现了 PPT文档在线协作。修复Bug。', 'desc' => ''); $lang->misc->feature->all['18.0'][] = array('title' => '推出自动化测试解决方案;运营管理界面增加工单功能;审批流支持增加所有类型的通知以及挣值计算规则完善。', 'desc' => ''); $lang->misc->feature->all['18.0.beta3'][] = array('title' => '统计模块升级为BI,内置5张宏观管理维度大屏。', 'desc' => ''); From a028eaea160014ec34f63a4e2e2ee98a7874e27c Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Tue, 28 Feb 2023 14:11:52 +0800 Subject: [PATCH 02/18] * Code for bug#28400. --- module/story/model.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/story/model.php b/module/story/model.php index 3323d09ee6..57bcb7b8c2 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -926,9 +926,6 @@ class storyModel extends model ->setDefault('assignedDate', $oldStory->assignedDate) ->setDefault('lastEditedBy', $this->app->user->account) ->setDefault('reviewedBy', $oldStory->reviewedBy) - ->setDefault('title', $oldStory->title) - ->setDefault('spec', $oldStory->spec) - ->setDefault('verify', $oldStory->verify) ->setDefault('mailto', '') ->setDefault('deleteFiles', array()) ->add('id', $storyID) @@ -945,6 +942,9 @@ class storyModel extends model ->setIF(!in_array($this->post->source, $this->config->story->feedbackSource), 'feedbackBy', '') ->setIF(!in_array($this->post->source, $this->config->story->feedbackSource), 'notifyEmail', '') ->setIF(!empty($_POST['plan'][0]) and $oldStory->stage == 'wait', 'stage', 'planned') + ->setIF(!isset($_POST['title']), 'title', $oldStory->title) + ->setIF(!isset($_POST['spec']), 'spec', $oldStory->spec) + ->setIF(!isset($_POST['verify']), 'verify', $oldStory->verify) ->stripTags($this->config->story->editor->edit['id'], $this->config->allowedTags) ->join('mailto', ',') ->join('linkStories', ',') From 23518e36fd18a50f42546977f03131e422809fc7 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Tue, 28 Feb 2023 14:33:43 +0800 Subject: [PATCH 03/18] * Code for bug#32489. --- module/execution/model.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/module/execution/model.php b/module/execution/model.php index 52724ab8d2..a0314f5de2 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -2931,14 +2931,17 @@ class executionModel extends model $this->loadModel('task'); $taskStories = array(); + $parents = array(); $execution = $this->getByID($executionID); - $tasks = $this->dao->select('id,execution,assignedTo,story,consumed,status')->from(TABLE_TASK)->where('id')->in($this->post->tasks)->fetchAll('id'); + $tasks = $this->dao->select('id,execution,assignedTo,story,consumed,status,parent')->from(TABLE_TASK)->where('id')->in($this->post->tasks)->fetchAll('id'); foreach($tasks as $task) { /* Save the assignedToes and stories, should linked to execution. */ $assignedToes[$task->assignedTo] = $task->execution; $taskStories[$task->story] = $task->story; + if($task->parent < 0) $parents[$task->id] = $task->id; + $data = new stdclass(); $data->project = $execution->project; $data->execution = $executionID; @@ -2958,6 +2961,10 @@ class executionModel extends model $this->loadModel('action')->create('task', $task->id, 'moved', '', $task->execution); } + /* Get stories of children task. */ + $childrens = $this->dao->select('*')->from(TABLE_TASK)->where('parent')->in($parents)->fetchAll('id'); + foreach($childrens as $children) $taskStories[$children->story] = $children->story; + /* Remove empty story. */ unset($taskStories[0]); From c2815a260550dac684913945425486e8c5b1d77c Mon Sep 17 00:00:00 2001 From: zenggang Date: Tue, 28 Feb 2023 07:32:22 +0000 Subject: [PATCH 04/18] * Fix task#85166,85171 --- module/zahost/lang/de.php | 1 + module/zahost/lang/en.php | 1 + module/zahost/lang/fr.php | 1 + module/zahost/lang/zh-cn.php | 1 + module/zahost/view/view.html.php | 12 ++-- module/zanode/config.php | 7 ++- module/zanode/control.php | 13 +++-- module/zanode/css/browse.css | 2 +- module/zanode/css/browse.zh-cn.css | 1 + module/zanode/js/create.js | 19 ++++++ module/zanode/lang/de.php | 4 ++ module/zanode/lang/en.php | 4 ++ module/zanode/lang/fr.php | 4 ++ module/zanode/lang/zh-cn.php | 4 ++ module/zanode/model.php | 93 +++++++++++++++++------------- module/zanode/view/browse.html.php | 14 +++-- module/zanode/view/create.html.php | 14 ++++- module/zanode/view/edit.html.php | 9 +++ module/zanode/view/view.html.php | 16 +++-- 19 files changed, 150 insertions(+), 70 deletions(-) create mode 100644 module/zanode/css/browse.zh-cn.css create mode 100644 module/zanode/js/create.js diff --git a/module/zahost/lang/de.php b/module/zahost/lang/de.php index eb6f4b21e3..c20cbcb3b4 100644 --- a/module/zahost/lang/de.php +++ b/module/zahost/lang/de.php @@ -16,6 +16,7 @@ $lang->zahost->browseNode = 'ZAnode Browse'; $lang->zahost->deleted = "Deleted"; $lang->zahost->copy = 'Click to copy'; $lang->zahost->copied = 'Copy successful'; +$lang->zahost->baseInfo = 'Basic information'; $lang->zahost->name = 'Name'; $lang->zahost->IP = 'Extranet Address'; diff --git a/module/zahost/lang/en.php b/module/zahost/lang/en.php index eb6f4b21e3..c20cbcb3b4 100644 --- a/module/zahost/lang/en.php +++ b/module/zahost/lang/en.php @@ -16,6 +16,7 @@ $lang->zahost->browseNode = 'ZAnode Browse'; $lang->zahost->deleted = "Deleted"; $lang->zahost->copy = 'Click to copy'; $lang->zahost->copied = 'Copy successful'; +$lang->zahost->baseInfo = 'Basic information'; $lang->zahost->name = 'Name'; $lang->zahost->IP = 'Extranet Address'; diff --git a/module/zahost/lang/fr.php b/module/zahost/lang/fr.php index eb6f4b21e3..c20cbcb3b4 100644 --- a/module/zahost/lang/fr.php +++ b/module/zahost/lang/fr.php @@ -16,6 +16,7 @@ $lang->zahost->browseNode = 'ZAnode Browse'; $lang->zahost->deleted = "Deleted"; $lang->zahost->copy = 'Click to copy'; $lang->zahost->copied = 'Copy successful'; +$lang->zahost->baseInfo = 'Basic information'; $lang->zahost->name = 'Name'; $lang->zahost->IP = 'Extranet Address'; diff --git a/module/zahost/lang/zh-cn.php b/module/zahost/lang/zh-cn.php index b62373eece..746a55c035 100644 --- a/module/zahost/lang/zh-cn.php +++ b/module/zahost/lang/zh-cn.php @@ -16,6 +16,7 @@ $lang->zahost->browseNode = '执行节点列表'; $lang->zahost->deleted = "已删除"; $lang->zahost->copy = '复制'; $lang->zahost->copied = '复制成功'; +$lang->zahost->baseInfo = '基础信息'; $lang->zahost->name = '名称'; $lang->zahost->IP = 'IP/域名'; diff --git a/module/zahost/view/view.html.php b/module/zahost/view/view.html.php index 06e5396b7d..d5502a1ec8 100644 --- a/module/zahost/view/view.html.php +++ b/module/zahost/view/view.html.php @@ -33,7 +33,7 @@
-
zahost->view;?>
+
zahost->baseInfo;?>
@@ -95,6 +95,10 @@
+
+
zahost->desc;?>
+
desc) ? htmlspecialchars_decode($zahost->desc) : $lang->noData;?>
+
@@ -123,12 +127,6 @@
-
-
-
zahost->desc;?>
-
desc) ? htmlspecialchars_decode($zahost->desc) : $lang->noData;?>
-
-
diff --git a/module/zanode/config.php b/module/zanode/config.php index 1096e4e057..c8a81099d6 100644 --- a/module/zanode/config.php +++ b/module/zanode/config.php @@ -2,9 +2,10 @@ $config->zanode->create = new stdClass(); $config->zanode->edit = new stdClass(); $config->zanode->createimage = new stdClass(); -$config->zanode->create->requiredFields = 'name,host,image,cpu,memory,disk,osName'; -$config->zanode->edit->requiredFields = ''; -$config->zanode->createimage->requiredFields = 'name'; +$config->zanode->create->requiredFields = 'name,host,image,cpu,memory,disk,osName'; +$config->zanode->create->physicsRequiredFields = 'name,extranet,cpu,memory,osName'; +$config->zanode->edit->requiredFields = ''; +$config->zanode->createimage->requiredFields = 'name'; $config->zanode->defaultPort = '55001'; $config->zanode->defaultAccount = 'z'; diff --git a/module/zanode/control.php b/module/zanode/control.php index 45c7c37102..7360defed1 100644 --- a/module/zanode/control.php +++ b/module/zanode/control.php @@ -137,10 +137,15 @@ class zanode extends control return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browse'))); } - $this->view->title = $this->lang->zanode->editAction; - $this->view->zanode = $this->zanode->getNodeByID($id); - $this->view->host = $this->zanode->getHostByID($this->view->zanode->parent); - $this->view->image = $this->zanode->getImageByID($this->view->zanode->image); + $zanode = $this->zanode->getNodeByID($id); + + $this->view->title = $this->lang->zanode->editAction; + $this->view->zanode = $zanode; + if($zanode->type == 'node') + { + $this->view->host = $this->zanode->getHostByID($this->view->zanode->parent); + $this->view->image = $this->zanode->getImageByID($this->view->zanode->image); + } $this->display(); } diff --git a/module/zanode/css/browse.css b/module/zanode/css/browse.css index e30b3b4232..648be7123d 100644 --- a/module/zanode/css/browse.css +++ b/module/zanode/css/browse.css @@ -3,7 +3,7 @@ .c-status {width: 70px;} .c-cpu, .c-host {width: 100px;} .c-ip{width: 150px;} -.c-os {width: 120px;} +.c-os, .c-type {width: 120px;} .desktop, .createImage{margin-right: 4px;} #helpTab .icon-help {line-height: unset;} #bysearchTab {margin-right: 0px;} diff --git a/module/zanode/css/browse.zh-cn.css b/module/zanode/css/browse.zh-cn.css new file mode 100644 index 0000000000..d0bb3e1789 --- /dev/null +++ b/module/zanode/css/browse.zh-cn.css @@ -0,0 +1 @@ +.c-type {width: 80px;} diff --git a/module/zanode/js/create.js b/module/zanode/js/create.js new file mode 100644 index 0000000000..bd96c2ca22 --- /dev/null +++ b/module/zanode/js/create.js @@ -0,0 +1,19 @@ +function zahostType() +{ + if($('#type').val() == 'physics') + { + $('#parent').closest('tr').hide(); + $('#image').closest('tr').hide(); + $('#extranet').closest('tr').removeClass('hidden'); + $('#osName').addClass('hidden'); + $('#osNamePhysics').removeClass('hidden'); + } + else + { + $('#parent').closest('tr').show(); + $('#image').closest('tr').show(); + $('#extranet').closest('tr').addClass('hidden'); + $('#osName').removeClass('hidden'); + $('#osNamePhysics').addClass('hidden'); + } +} diff --git a/module/zanode/lang/de.php b/module/zanode/lang/de.php index 0845327c96..8b27396080 100644 --- a/module/zanode/lang/de.php +++ b/module/zanode/lang/de.php @@ -63,6 +63,9 @@ $lang->zanode->initializing = 'Initializing'; $lang->zanode->showPwd = 'Show Password'; $lang->zanode->hidePwd = 'Hide Password'; +$lang->zanode->typeList['node'] = 'Virtual machine'; +$lang->zanode->typeList['physics'] = 'Physical machine'; + $lang->automation = new stdClass(); $lang->automation->scriptPath = $lang->zanode->scriptPath; $lang->automation->node = $lang->zanode->common; @@ -73,6 +76,7 @@ $lang->zanode->noVncPort = 'Failed to get vnc port'; $lang->zanode->nameValid = "The name can only be letters, numbers, '-', '_', '.', and cannot start with a symbol"; $lang->zanode->empty = 'No zanode is found'; $lang->zanode->runCaseConfirm = 'The system detects the presence of an automation script. Whether to execute?'; +$lang->zanode->netError = 'Unable to connect to the physical machine, please check the network and try again.'; $lang->zanode->createImage = 'Create Image'; $lang->zanode->createImaging = 'Creating'; diff --git a/module/zanode/lang/en.php b/module/zanode/lang/en.php index 2a661659a6..3a2f5b10bd 100644 --- a/module/zanode/lang/en.php +++ b/module/zanode/lang/en.php @@ -63,6 +63,9 @@ $lang->zanode->initializing = 'Initializing'; $lang->zanode->showPwd = 'Show Password'; $lang->zanode->hidePwd = 'Hide Password'; +$lang->zanode->typeList['node'] = 'Virtual machine'; +$lang->zanode->typeList['physics'] = 'Physical machine'; + $lang->automation = new stdClass(); $lang->automation->scriptPath = $lang->zanode->scriptPath; $lang->automation->node = $lang->zanode->common; @@ -73,6 +76,7 @@ $lang->zanode->noVncPort = 'Failed to get vnc port'; $lang->zanode->nameValid = "The name can only be letters, numbers, '-', '_', '.', and cannot start with a symbol"; $lang->zanode->empty = 'No zanode is found'; $lang->zanode->runCaseConfirm = 'The system detects the presence of an automation script. Whether to execute?'; +$lang->zanode->netError = 'Unable to connect to the physical machine, please check the network and try again.'; $lang->zanode->createImage = 'Create Image'; $lang->zanode->createImaging = 'Creating'; diff --git a/module/zanode/lang/fr.php b/module/zanode/lang/fr.php index 0845327c96..8b27396080 100644 --- a/module/zanode/lang/fr.php +++ b/module/zanode/lang/fr.php @@ -63,6 +63,9 @@ $lang->zanode->initializing = 'Initializing'; $lang->zanode->showPwd = 'Show Password'; $lang->zanode->hidePwd = 'Hide Password'; +$lang->zanode->typeList['node'] = 'Virtual machine'; +$lang->zanode->typeList['physics'] = 'Physical machine'; + $lang->automation = new stdClass(); $lang->automation->scriptPath = $lang->zanode->scriptPath; $lang->automation->node = $lang->zanode->common; @@ -73,6 +76,7 @@ $lang->zanode->noVncPort = 'Failed to get vnc port'; $lang->zanode->nameValid = "The name can only be letters, numbers, '-', '_', '.', and cannot start with a symbol"; $lang->zanode->empty = 'No zanode is found'; $lang->zanode->runCaseConfirm = 'The system detects the presence of an automation script. Whether to execute?'; +$lang->zanode->netError = 'Unable to connect to the physical machine, please check the network and try again.'; $lang->zanode->createImage = 'Create Image'; $lang->zanode->createImaging = 'Creating'; diff --git a/module/zanode/lang/zh-cn.php b/module/zanode/lang/zh-cn.php index 3ecd38629b..dcd471c766 100644 --- a/module/zanode/lang/zh-cn.php +++ b/module/zanode/lang/zh-cn.php @@ -63,6 +63,9 @@ $lang->zanode->initializing = '初始化中'; $lang->zanode->showPwd = '显示密码'; $lang->zanode->hidePwd = '隐藏密码'; +$lang->zanode->typeList['node'] = '虚拟机'; +$lang->zanode->typeList['physics'] = '物理机'; + $lang->automation = new stdClass(); $lang->automation->scriptPath = $lang->zanode->scriptPath; $lang->automation->node = $lang->zanode->common; @@ -73,6 +76,7 @@ $lang->zanode->noVncPort = '无法获取执行节点端口'; $lang->zanode->nameValid = "名称只能是字母、数字,'-','_','.',且不能以符号开头"; $lang->zanode->empty = '暂时没有执行节点'; $lang->zanode->runCaseConfirm = '系统检测到选择的用例存在自动化测试脚本,是否自动执行用例?'; +$lang->zanode->netError = '无法连接到物理机,请检查网络后重试。'; $lang->zanode->createImage = '导出镜像'; $lang->zanode->createImaging = '正在导出镜像'; diff --git a/module/zanode/model.php b/module/zanode/model.php index ed5e7c5c43..313eb4d24b 100644 --- a/module/zanode/model.php +++ b/module/zanode/model.php @@ -53,12 +53,15 @@ class zanodemodel extends model */ public function create() { - $data = fixer::input('post')->get(); + $data = fixer::input('post') + ->setIF($this->post->type == 'physics', 'parent', 0) + ->setIF($this->post->type == 'physics', 'osName', $this->post->osNamePhysics) + ->remove('osNamePhysics') + ->get(); /* Batch check fields. */ - $data->type = 'node'; $this->dao->update(TABLE_ZAHOST)->data($data) - ->batchCheck($this->config->zanode->create->requiredFields, 'notempty'); + ->batchCheck($data->type == 'node' ? $this->config->zanode->create->requiredFields : $this->config->zanode->create->physicsRequiredFields, 'notempty'); if(dao::isError()) return false; @@ -69,47 +72,60 @@ class zanodemodel extends model } /* If name already exists return error. */ - $node = $this->dao->select('*')->from(TABLE_ZAHOST)->where('name')->eq($data->name)->andWhere('type')->eq('node')->fetch(); + $node = $this->dao->select('*')->from(TABLE_ZAHOST)->where('name')->eq($data->name)->andWhere('type')->in('node,physics')->fetch(); if($node) return dao::$errors[] = $this->lang->zanode->nameUnique; - /* Get image. */ - $image = $this->getImageByID($data->image); - - /* Get host info. */ - $host = $this->getHostByID($data->parent); - - /* Prepare create params. */ - $agnetUrl = 'http://' . $host->extranet . ':' . $host->zap; - $param = array( - 'os' => $image->osName, - 'path' => $image->path, - 'name' => $data->name, - 'cpu' => (int)$data->cpuCores, - 'disk' => (int)$data->diskSize, - 'memory' => (int)$data->memory, - ); - - $result = json_decode(commonModel::http($agnetUrl . static::KVM_CREATE_PATH, json_encode($param), null, array("Authorization:$host->tokenSN"))); - - if(empty($result)) + if($data->type == 'physics') { - dao::$errors[] = $this->lang->zanode->notFoundAgent; - return false; + $ping = $this->loadModel('zahost')->checkAddress($data->extranet); + if(!$ping) + { + dao::$errors[] = $this->lang->zanode->netError; + return false; + } } - if($result->code != 'success') + else { - dao::$errors[] = $this->lang->zanode->createVmFail; - return false; + /* Get image. */ + $image = $this->getImageByID($data->image); + + /* Get host info. */ + $host = $this->getHostByID($data->parent); + + /* Prepare create params. */ + $agnetUrl = 'http://' . $host->extranet . ':' . $host->zap; + $param = array( + 'os' => $image->osName, + 'path' => $image->path, + 'name' => $data->name, + 'cpu' => (int)$data->cpuCores, + 'disk' => (int)$data->diskSize, + 'memory' => (int)$data->memory, + ); + + $result = json_decode(commonModel::http($agnetUrl . static::KVM_CREATE_PATH, json_encode($param), null, array("Authorization:$host->tokenSN"))); + + if(empty($result)) + { + dao::$errors[] = $this->lang->zanode->notFoundAgent; + return false; + } + if($result->code != 'success') + { + dao::$errors[] = $this->lang->zanode->createVmFail; + return false; + } + + /* Prepare create ZenAgent Node data. */ + $data->image = $data->image; + $data->parent = $host->id; + $data->mac = $result->data->mac; + $data->vnc = (int)$result->data->vnc; } - /* Prepare create ZenAgent Node data. */ - $data->image = $data->image; - $data->parent = $host->id; - $data->mac = $result->data->mac; $data->status = static::STATUS_RUNNING; $data->createdBy = $this->app->user->account; $data->createdDate = helper::now(); - $data->vnc = (int)$result->data->vnc; /* Save ZenAgent Node. */ $this->dao->insert(TABLE_ZAHOST)->data($data)->autoCheck()->exec(); @@ -554,12 +570,11 @@ class zanodemodel extends model $query = str_replace('`hostID`', 't2.`id`', $query); } - $list = $this->dao->select('t1.*, t2.name as hostName, t2.extranet,t3.osName')->from(TABLE_ZAHOST)->alias('t1') + $list = $this->dao->select("t1.*, t2.name as hostName, if(t1.type='node', t2.extranet, t1.extranet) extranet,if(t1.type='node', t3.osName, t1.osName) osName")->from(TABLE_ZAHOST)->alias('t1') ->leftJoin(TABLE_ZAHOST)->alias('t2')->on('t1.parent = t2.id') ->leftJoin(TABLE_IMAGE)->alias('t3')->on('t3.id = t1.image') ->where('t1.deleted')->eq(0) - ->andWhere("t1.type")->eq("node") - ->andWhere("t2.type")->eq("zahost") + ->andWhere("((t1.type = 'node' and t2.type = 'zahost') or t1.type = 'physics')") ->beginIF($query)->andWhere($query)->fi() ->orderBy($orderBy) ->page($pager) @@ -771,14 +786,14 @@ class zanodemodel extends model */ public function getNodeByID($id) { - $node = $this->dao->select('t1.*, t2.name as hostName, t2.extranet as ip,t2.zap as hzap,t3.osName, t2.tokenSN as tokenSN, t2.secret as secret')->from(TABLE_ZAHOST) + $node = $this->dao->select("t1.*, t2.name as hostName, t2.extranet as ip,t2.zap as hzap,if(t1.type='node', t3.osName, t1.osName) osName, t2.tokenSN as tokenSN, t2.secret as secret")->from(TABLE_ZAHOST) ->alias('t1') ->leftJoin(TABLE_ZAHOST)->alias('t2')->on('t1.parent = t2.id') ->leftJoin(TABLE_IMAGE)->alias('t3')->on('t3.id = t1.image') ->where('t1.id')->eq($id) ->fetch(); - $host = $this->loadModel("zahost")->getByID($node->parent); + $host = $this->loadModel("zahost")->getByID($node->type == 'node' ? $node->parent : $node->id); if($node->status == 'running' || $node->status == 'ready') { if(empty($host) || $host->status != 'online') diff --git a/module/zanode/view/browse.html.php b/module/zanode/view/browse.html.php index c47fff9a11..5e236b48da 100644 --- a/module/zanode/view/browse.html.php +++ b/module/zanode/view/browse.html.php @@ -53,6 +53,7 @@ idAB); ?> zanode->name); ?> + zahost->type); ?> zanode->extranet); ?> zanode->cpuCores); ?> zanode->memory); ?> @@ -68,6 +69,7 @@ id; ?> inlink('view', "id=$node->id"), $node->name, '', ""); ?> + lang->zanode->typeList, $node->type); ?> extranet; ?> zanode->os->cpuCores, $node->cpuCores); ?> memory . $this->lang->zahost->unitList['GB']; ?> @@ -78,22 +80,22 @@ zanode->suspend}' target='hiddenwin'"; - $suspendAttr .= $node->status != 'running' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmSuspend}\")==false) return false;'"; + $suspendAttr .= $node->type == 'physics' || $node->status != 'running' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmSuspend}\")==false) return false;'"; $resumeAttr = "title='{$lang->zanode->resume}' target='hiddenwin'"; - $resumeAttr .= $node->status == 'running' || $node->status == 'wait' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmResume}\")==false) return false;'"; + $resumeAttr .= $node->type == 'physics' || $node->status == 'running' || $node->status == 'wait' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmResume}\")==false) return false;'"; $rebootAttr = "title='{$lang->zanode->reboot}' target='hiddenwin'"; - $rebootAttr .= $node->status == 'shutoff' || $node->status == 'wait' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmReboot}\")==false) return false;'"; + $rebootAttr .= $node->type == 'physics' || $node->status == 'shutoff' || $node->status == 'wait' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmReboot}\")==false) return false;'"; $closeAttr = "title='{$lang->zanode->shutdown}'"; - $closeAttr .= $node->status == 'wait' ? ' class="btn disabled"' : ' class="btn iframe"'; + $closeAttr .= $node->type == 'physics' || $node->status == 'wait' ? ' class="btn disabled"' : ' class="btn iframe"'; $startAttr = "title='{$lang->zanode->boot}'"; - $startAttr .= $node->status == 'wait' ? ' class="btn disabled"' : ' class="btn iframe"'; + $startAttr .= $node->type == 'physics' || $node->status == 'wait' ? ' class="btn disabled"' : ' class="btn iframe"'; $snapshotAttr = "title='{$lang->zanode->createSnapshot}'"; - $snapshotAttr .= $node->status != 'running' ? ' class="btn disabled"' : ' class="btn iframe"'; + $snapshotAttr .= $node->type == 'physics' || $node->status != 'running' ? ' class="btn disabled"' : ' class="btn iframe"'; $imageAttr = $node->status != 'running' ? ' class="btn btn-action iframe createImage disabled"' : ' class="btn btn-action iframe createImage"'; diff --git a/module/zanode/view/create.html.php b/module/zanode/view/create.html.php index 46cd460261..b704f2d16e 100644 --- a/module/zanode/view/create.html.php +++ b/module/zanode/view/create.html.php @@ -22,6 +22,11 @@
+ + + + + @@ -31,6 +36,10 @@ + + + + @@ -61,7 +70,10 @@ - + diff --git a/module/zanode/view/edit.html.php b/module/zanode/view/edit.html.php index dfba0f6f04..e733b205a0 100644 --- a/module/zanode/view/edit.html.php +++ b/module/zanode/view/edit.html.php @@ -21,19 +21,28 @@
zahost->type;?>zanode->typeList, 'virtual', "class='form-control chosen' onchange='zahostType()'")?>
zanode->hostName;?> zanode->name;?> zanode->nameValid}\"");?>
zanode->image;?>
zanode->osName;?> + + +
zanode->desc ?>
+ type == 'node'):?> + + type == 'node'):?> + + + + + + diff --git a/module/zanode/view/view.html.php b/module/zanode/view/view.html.php index 55683559cd..9a9c9ad15c 100644 --- a/module/zanode/view/view.html.php +++ b/module/zanode/view/view.html.php @@ -44,7 +44,7 @@ $account = strpos($zanode->osName, "windows") ? $config->zanode->defaultWinAccou
-
zanode->view; ?>
+
zahost->baseInfo; ?>
@@ -97,11 +97,11 @@ $account = strpos($zanode->osName, "windows") ? $config->zanode->defaultWinAccou
zanode->defaultPwd; ?>:
-
' . str_repeat('*', strlen($config->zanode->defaultPwd)) . '' . ' ' . "" - . ""; + . ""; ?>
@@ -116,6 +116,10 @@ $account = strpos($zanode->osName, "windows") ? $config->zanode->defaultWinAccou
+
+
zanode->desc; ?>
+
desc) ? htmlspecialchars_decode($zanode->desc) : $lang->noData; ?>
+
osName, "windows") ? $config->zanode->defaultWinAccou
-
-
-
zanode->desc; ?>
-
desc) ? htmlspecialchars_decode($zanode->desc) : $lang->noData; ?>
-
-
From 1c5578745bd6b58fa15746f988f381735bc1b8c3 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Tue, 28 Feb 2023 07:56:21 +0000 Subject: [PATCH 05/18] * Fix bug #32493. --- module/execution/lang/de.php | 1 + module/execution/lang/en.php | 1 + module/execution/lang/fr.php | 1 + module/execution/lang/zh-cn.php | 11 ++++++----- module/execution/view/batchedit.html.php | 5 ++++- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/module/execution/lang/de.php b/module/execution/lang/de.php index 8520946546..eec5fc176e 100644 --- a/module/execution/lang/de.php +++ b/module/execution/lang/de.php @@ -153,6 +153,7 @@ $lang->execution->daysGreaterProject = 'Days cannot be greater than days of exec $lang->execution->errorHours = 'Hours/Day cannot be greater than『24』'; $lang->execution->agileplusMethodTip = 'When creating executions in an Agile Plus project, both Iteration and Kanban management methods are supported.'; $lang->execution->typeTip = "The sub-stages of other types can be created under the parent stage of the 'mix' type, while the type of other parent-child levels is consistent."; +$lang->execution->waterfallTip = 'In the Waterfall project or in the Waterfall + project,'; $lang->execution->start = 'Start'; $lang->execution->activate = 'Aktivieren'; diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index 9a149bbee8..f3e870debd 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -153,6 +153,7 @@ $lang->execution->daysGreaterProject = 'Days cannot be greater than days of exec $lang->execution->errorHours = 'Hours/Day cannot be greater than『24』'; $lang->execution->agileplusMethodTip = 'When creating executions in an Agile Plus project, both Iteration and Kanban management methods are supported.'; $lang->execution->typeTip = "The sub-stages of other types can be created under the parent stage of the 'mix' type, while the type of other parent-child levels is consistent."; +$lang->execution->waterfallTip = 'In the Waterfall project or in the Waterfall + project,'; $lang->execution->start = 'Start'; $lang->execution->activate = 'Activate'; diff --git a/module/execution/lang/fr.php b/module/execution/lang/fr.php index 60dbcc0fff..f7f699c520 100644 --- a/module/execution/lang/fr.php +++ b/module/execution/lang/fr.php @@ -153,6 +153,7 @@ $lang->execution->daysGreaterProject = 'Days cannot be greater than days of exec $lang->execution->errorHours = 'Hours/Day cannot be greater than『24』'; $lang->execution->agileplusMethodTip = 'When creating executions in an Agile Plus project, both Iteration and Kanban management methods are supported.'; $lang->execution->typeTip = "The sub-stages of other types can be created under the parent stage of the 'mix' type, while the type of other parent-child levels is consistent."; +$lang->execution->waterfallTip = 'In the Waterfall project or in the Waterfall + project,'; $lang->execution->start = 'Démarrer'; $lang->execution->activate = 'Activer'; diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index e668861463..a746b5ece4 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -148,11 +148,12 @@ $lang->execution->estimate = '预计'; $lang->execution->consumed = '消耗'; $lang->execution->left = '剩余'; -$lang->execution->copyTeamTip = "可以选择复制项目或{$lang->execution->common}团队的成员"; -$lang->execution->daysGreaterProject = '可用工日不能大于执行的可用工日『%s』'; -$lang->execution->errorHours = '可用工时/天不能大于『24』'; -$lang->execution->agileplusMethodTip = '融合敏捷项目创建执行时,支持迭代和看板两种管理方法。'; -$lang->execution->typeTip = '“综合”类型的父阶段可以创建其它类型的子级,其它父子层级的类型均一致。'; +$lang->execution->copyTeamTip = "可以选择复制项目或{$lang->execution->common}团队的成员"; +$lang->execution->daysGreaterProject = '可用工日不能大于执行的可用工日『%s』'; +$lang->execution->errorHours = '可用工时/天不能大于『24』'; +$lang->execution->agileplusMethodTip = '融合敏捷项目创建执行时,支持迭代和看板两种管理方法。'; +$lang->execution->typeTip = '“综合”类型的父阶段可以创建其它类型的子级,其它父子层级的类型均一致。'; +$lang->execution->waterfallTip = '瀑布项目和融合瀑布项目中,'; $lang->execution->start = "开始"; $lang->execution->activate = "激活"; diff --git a/module/execution/view/batchedit.html.php b/module/execution/view/batchedit.html.php index 7f75310b9d..e17011af51 100755 --- a/module/execution/view/batchedit.html.php +++ b/module/execution/view/batchedit.html.php @@ -64,7 +64,10 @@
From adba207640cc9f25d79082a52639e43a03487d7f Mon Sep 17 00:00:00 2001 From: liumengyi Date: Tue, 28 Feb 2023 08:07:03 +0000 Subject: [PATCH 06/18] * Fix bug #32502. --- module/execution/control.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/execution/control.php b/module/execution/control.php index 641849b530..649664c636 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2102,6 +2102,7 @@ class execution extends control { $productID = $this->product->getProductIDByProject($executionID); $parentStageList = $this->loadModel('programplan')->getParentStageList($execution->project, $executionID, $productID); + unset($parentStageList[0]); } $this->view->title = $title; From 2fd93bcb089ad7ef3c6f98eff8567b100d4551e8 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Tue, 28 Feb 2023 08:14:08 +0000 Subject: [PATCH 07/18] * Fix bug #32495. --- module/block/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/block/control.php b/module/block/control.php index d2c0f8ff7f..3a56edbc6f 100755 --- a/module/block/control.php +++ b/module/block/control.php @@ -1504,7 +1504,7 @@ class block extends control $sprints = $this->dao->select('status, count(*) as sprints')->from(TABLE_EXECUTION) ->where('deleted')->eq(0) ->beginIF($this->config->vision == 'lite')->andWhere('type')->eq('kanban')->fi() - ->beginIF($this->config->vision == 'rnd')->andWhere('type')->eq('sprint')->fi() + ->beginIF($this->config->vision == 'rnd')->andWhere('type')->in('sprint,kanban')->fi() ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->sprints)->fi() ->andWhere('project')->eq($this->session->project) ->groupBy('status') From 569efba6e012ea64704485638d0df7cf78632ac9 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Tue, 28 Feb 2023 16:14:58 +0800 Subject: [PATCH 08/18] * Optimize page style for guide block. --- module/block/view/guide.html.php | 1 - 1 file changed, 1 deletion(-) diff --git a/module/block/view/guide.html.php b/module/block/view/guide.html.php index a3d4bdf354..0d2070bce1 100644 --- a/module/block/view/guide.html.php +++ b/module/block/view/guide.html.php @@ -28,7 +28,6 @@ .block-guide .tab-pane .app-client .tree-menu li .avatar img {padding: 6px;} .block-guide .tab-pane .app-client .client-desc {padding-top: 12px;} .block-guide .tab-pane .app-client .client-desc img {height: 195px;} -.block-guide .tab-pane .app-qrcode {padding: 10px 20px;} .block-guide .tab-pane .app-qrcode .col-md-12 {padding-left: 0; padding-top: 10px;} .block-guide .tab-pane .app-qrcode .qrcode-down img {padding-top: 16px;} .block-guide .tab-pane .app-qrcode .qrcode-down .text-primary {padding-top: 10px;} From 2271e5bd7049d471fcf491e34dc7dc6bed556717 Mon Sep 17 00:00:00 2001 From: daitingting Date: Tue, 28 Feb 2023 08:38:00 +0000 Subject: [PATCH 09/18] * Fix bug #32503. --- module/project/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/project/model.php b/module/project/model.php index 56a105da22..6c55309710 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1520,7 +1520,7 @@ class projectModel extends model ->setDefault('team', $this->post->name) ->setDefault('lastEditedBy', $this->app->user->account) ->setDefault('lastEditedDate', helper::now()) - ->setDefault('parent', 0) + ->setDefault('parent', $oldProject->parent) ->setIF($this->post->delta == 999, 'end', LONG_TIME) ->setIF($this->post->delta == 999, 'days', 0) ->setIF($this->post->begin == '0000-00-00', 'begin', '') From 1c3131e402bc76c22c65b5abedee31df898d6214 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Tue, 28 Feb 2023 08:41:30 +0000 Subject: [PATCH 10/18] * Fix bug #32494. --- module/build/model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/build/model.php b/module/build/model.php index 13e6563603..7dae5e405b 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -112,6 +112,7 @@ class buildModel extends model $buildQuery = str_replace($field, "t1." . $field, $buildQuery); } } + if(strpos($this->session->projectBuildQuery, 'execution') !== false) $buildQuery = str_replace('`execution`', 't2.`id`', $buildQuery); return $this->getProjectBuilds($projectID, 'bysearch', $buildQuery); } From 87b8f8f9b7a8f9cadc8645ef64acdfab7b65266c Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 28 Feb 2023 16:53:39 +0800 Subject: [PATCH 11/18] * Code for fix bug #32506. --- module/task/js/create.js | 35 ++++++++++++++++++++++++++++++++ module/task/view/create.html.php | 4 ++-- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/module/task/js/create.js b/module/task/js/create.js index 10c979ad08..f5dc19c504 100644 --- a/module/task/js/create.js +++ b/module/task/js/create.js @@ -1,5 +1,40 @@ $(function() { + if(attribute == 'request' || attribute == 'review') + { + $('#story').closest('tr').hide(); + $("input[name='after'][value='toStoryList']").parent().hide(); + $("input[name='after'][value='continueAdding']").parent().hide(); + $("input[name='after'][value='toTaskList']").prop('checked', true); + $("input[name='after'][value='toTaskList']").parent().css('margin-left', '0px'); + } + + execAttribute = attribute; + $('#execution').change(function() + { + link = createLink('execution', 'ajaxGetAttribute', "executionID=" + $('#execution').val()); + $.get(link, function(attribute) + { + execAttribute = attribute; + if(attribute == 'request' || attribute == 'review') + { + $('#story').closest('tr').hide(); + $("input[name='after'][value='toStoryList']").parent().hide(); + $("input[name='after'][value='continueAdding']").parent().hide(); + $("input[name='after'][value='toTaskList']").prop('checked', true); + $("input[name='after'][value='toTaskList']").parent().css('margin-left', '0px'); + } + else + { + $('#story').closest('tr').show(); + $("input[name='after'][value='toStoryList']").parent().show(); + $("input[name='after'][value='continueAdding']").parent().show(); + $("input[name='after'][value='continueAdding']").prop('checked', true); + $("input[name='after'][value='toTaskList']").parent().css('margin-left', '10px'); + } + }); + }) + $('#customField').click(function() { hiddenRequireFields(); diff --git a/module/task/view/create.html.php b/module/task/view/create.html.php index 3a132b9d2f..758b981809 100644 --- a/module/task/view/create.html.php +++ b/module/task/view/create.html.php @@ -110,7 +110,7 @@ foreach(explode(',', $config->task->create->requiredFields) as $field) printExtendFields('', 'table', 'columns=3');?> - lifetime != 'ops') ? '' : 'hidden'?> + lifetime != 'ops' and !in_array($execution->attribute, array('request', 'review'))) ? '' : 'hidden'?> - lifetime != 'ops'):?> + lifetime != 'ops' and !in_array($execution->attribute, array('request', 'review'))):?> + lifetime != 'ops' and !in_array($execution->attribute, array('request', 'review'))):?> + @@ -65,6 +67,7 @@ + lifetime != 'ops' and !in_array($execution->attribute, array('request', 'review'))):?> + From d2a75a9cdf681f82b215f84eef34c7018e9fd5ea Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 28 Feb 2023 17:08:19 +0800 Subject: [PATCH 15/18] * Code for fix bug #32508. --- module/task/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/task/control.php b/module/task/control.php index 141f00a025..f24ce816de 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -2088,7 +2088,7 @@ class task extends control { $execution = $this->execution->getById($executionID); $allExportFields = $this->config->task->exportFields; - if($execution->lifetime == 'ops') $allExportFields = str_replace(' story,', '', $allExportFields); + if($execution->lifetime == 'ops' or in_array($execution->attribute, array('request', 'review'))) $allExportFields = str_replace(' story,', '', $allExportFields); if($_POST) { From 1efa2457249e606acdc2dab8b5eeafe8df640db6 Mon Sep 17 00:00:00 2001 From: Yagami Date: Tue, 28 Feb 2023 17:10:36 +0800 Subject: [PATCH 16/18] * Code for program progress bug. --- module/project/model.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/module/project/model.php b/module/project/model.php index 56a105da22..e098848781 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -438,6 +438,8 @@ class projectModel extends model foreach($projectList as $projectID => $stageList) { $progress = 0; + $projectConsumed = 0; + $projectLeft = 0; foreach($stageList as $stageID => $stage) { if($stage->project != $projectID) continue; @@ -445,10 +447,13 @@ class projectModel extends model $stageTotalConsumed = isset($totalHour[$projectID][$stageID]) ? $totalHour[$projectID][$stageID]->totalConsumed : 0; $stageTotalLeft = isset($totalHour[$projectID][$stageID]) ? round($totalHour[$projectID][$stageID]->totalLeft, 1) : 0; - $stageProgress = ($stageTotalConsumed + $stageTotalLeft) ? floor($stageTotalConsumed / ($stageTotalConsumed + $stageTotalLeft) * 1000) / 1000 * 100 : 0; + $projectConsumed += $stageTotalConsumed; + $projectLeft += $stageTotalLeft; - $progress += $stageProgress * ($stage->percent / 100); } + + $progress += ($projectConsumed + $projectLeft) == 0 ? 0 : floor($projectConsumed / ($projectConsumed + $projectLeft) * 1000) / 1000 * 100; + $progressList[$projectID] = $progress; } From b10b4de7cbb5d79bbad089a88c274cfac0321bf6 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Tue, 28 Feb 2023 17:15:40 +0800 Subject: [PATCH 17/18] * Modify tutorial checked. --- module/tutorial/js/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/tutorial/js/index.js b/module/tutorial/js/index.js index 0a3c34e855..5e19f00ecb 100644 --- a/module/tutorial/js/index.js +++ b/module/tutorial/js/index.js @@ -414,7 +414,7 @@ $(function() else { var $modulemenu = $$('#subNavbar'); - if(adminMenu) $modulemenu = $$('#navbar'); + if(task.nav.app == 'admin') $modulemenu = $$('#navbar'); var $modulemenuItem = $modulemenu.find('[data-id="' + task.nav.menu + '"]'); if($modulemenuItem.length && !$modulemenuItem.hasClass('active')) { From 677a918199d3b0acc30a7138a8c69fb86cd118b9 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 28 Feb 2023 17:29:42 +0800 Subject: [PATCH 18/18] * Code for fix bug #32508. --- module/transfer/control.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module/transfer/control.php b/module/transfer/control.php index a12979c8bd..264fad2164 100755 --- a/module/transfer/control.php +++ b/module/transfer/control.php @@ -67,6 +67,11 @@ class transfer extends control $this->config->transfer->sysDataList = $this->transfer->initSysDataFields(); $fields = $this->config->$model->templateFields; + if($model == 'task') + { + $execution = $this->loadModel('execution')->getByID($executionID); + if(isset($execution) and $execution->type == 'ops' or in_array($execution->attribute, array('request', 'review'))) $fields = str_replace('story,', '', $fields); + } /* Init config fieldList. */ $fieldList = $this->transfer->initFieldList($model, $fields);
zanode->hostName;?> name, "class='form-control' readonly='readonly'");?>
zanode->name;?> name, "class='form-control' placeholder=\"{$lang->zanode->nameValid}\" readonly='readonly'");?>
zanode->image;?> name, "class='form-control' readonly='readonly'");?>
zahost->IP;?>extranet, "class='form-control' readonly='readonly'");?>
zanode->cpuCores;?> zanode->os->cpuCores, $zanode->cpuCores), "class='form-control' readonly='readonly'");?>'>execution->RD;?> '> execution->$type;?> - + app->tab == 'execution' or (isset($project) and ($project->model == 'waterfall' or $project->model == 'waterfallplus'))):?> + app->tab == 'execution' ? $lang->execution->waterfallTip . lcfirst($lang->execution->typeTip) : $lang->execution->typeTip;?> + + execution->begin;?> execution->end;?>
task->story;?> @@ -129,7 +129,7 @@ foreach(explode(',', $config->task->create->requiredFields) as $field)
left . ' ' . $lang->execution->workHourUnit;?> deadline, 0, 4) > 0) echo '' . $task->deadline . '';?> processStatus('task', $task);?> storyID) @@ -80,6 +83,7 @@ } ?>