From d2f84bb3f67007699b83cab391e0921bad88cabf Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 16 May 2022 13:37:06 +0800 Subject: [PATCH 01/92] * code for task #54037. --- db/update16.5.sql | 141 ++++++++++++++++++++++------------------------ 1 file changed, 68 insertions(+), 73 deletions(-) diff --git a/db/update16.5.sql b/db/update16.5.sql index 6fdbf9c7ed..f8ba90a0e8 100644 --- a/db/update16.5.sql +++ b/db/update16.5.sql @@ -90,6 +90,20 @@ DELETE FROM `zt_config` WHERE `section` = 'customMenu'; UPDATE `zt_story` SET `plan` = '' WHERE `plan` = 0; +REPLACE INTO `zt_workflowdatasource` (`type`, `name`, `code`, `buildin`, `datasource`, `view`, `keyField`, `valueField`) VALUES +('lang', '项目模型', 'projectModel', '1', 'projectModel', '', '', ''), +('lang', '反馈类型', 'feedbackType', '1', 'feedbackType', '', '', ''), +('lang', '反馈处理方案', 'feedbackSolution', '1', 'feedbackSolution', '', '', ''), +('lang', '反馈关闭原因', 'feedbackclosedReason', '1', 'feedbackclosedReason', '', '', ''), +('lang', '任务关闭原因', 'taskReason', '1', 'taskReason', '', '', ''), +('system', '项目集', 'programs', '1', '{\"app\":\"system\",\"module\":\"program\",\"method\":\"getPairs\",\"methodDesc\":\"Get program pairs.\",\"params\":[{\"name\":\"isQueryAll\",\"type\":\"bool\",\"desc\":\"\",\"value\":\"\"},{\"name\":\"orderBy\",\"type\":\"string\",\"desc\":\"\",\"value\":\"id_desc\"}]}', '', '', ''); + +INSERT INTO `zt_workflowdatasource` (`type`, `name`, `code`, `buildin`, `vision`, `datasource`, `view`, `keyField`, `valueField`) VALUES +('lang', '反馈类型', 'litefeedbackType', '1', 'lite', 'feedbackType', '', '', ''), +('lang', '反馈处理方案', 'litefeedbackSolution', '1', 'lite', 'feedbackSolution', '', '', ''), +('lang', '反馈关闭原因', 'litefeedbackclosedReason', '1', 'lite', 'feedbackclosedReason', '', '', ''), +('lang', '任务关闭原因', 'litetaskReason', '1', 'lite', 'taskReason', '', '', ''); + UPDATE `zt_workflowfield` set `type` = 'datetime', `control` = 'datetime' WHERE `module` = 'testcase' and `field` IN ('openedDate','reviewedDate','lastEditedDate','lastRunDate'); UPDATE `zt_workflowfield` set `control` = 'date' WHERE `module` = 'testtask' and `field` IN ('begin','end'); @@ -116,44 +130,6 @@ UPDATE `zt_workflowfield` SET `type` = 'datetime', `control` = 'datetime' WHERE UPDATE `zt_workflowfield` SET `control` = 'datetime' WHERE `module` = 'story' and `field` = 'closedDate'; UPDATE `zt_workflowfield` SET `control` = 'radio' WHERE `module` = 'story' and `field` = 'deleted'; -UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'product' and `action` = 'all' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `type` = 'batch', `position` = 'browse' WHERE `module` = 'product' and `action` = 'batchedit' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'product' and `action` = 'browse' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `show` = 'direct' WHERE `module` = 'product' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `type` = 'batch', `position` = 'browse' WHERE `module` = 'productplan' and `action` = 'batchedit' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'productplan' and `action` = 'browse' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `show` = 'direct' WHERE `module` = 'productplan' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'release' and `action` = 'browse' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `show` = 'direct' WHERE `module` = 'release' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `type` = 'batch' WHERE `module` = 'story' and `action` = 'batchcreate' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `type` = 'batch' WHERE `module` = 'story' and `action` = 'batchedit' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'story' and `action` = 'browse' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'story' and `action` = 'exporttemplate' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'story' and `action` = 'import' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'story' and `action` = 'view' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `show` = 'direct' WHERE `module` = 'story' and `vision` = 'rnd' and action NOT IN ('exporttemplate', 'import'); -UPDATE `zt_workflowaction` SET `show` = 'direct' WHERE `module` = 'program' and `vision` = 'rnd'; - -DELETE FROM `zt_workflowfield` WHERE `module`='execution' AND `field`='stage'; -DELETE FROM `zt_workflowfield` WHERE `module`='program' AND `field`='stage'; -DELETE FROM `zt_workflowfield` WHERE `module`='project' AND `field`='stage'; -DELETE FROM `zt_workflowfield` WHERE `module`='bug' AND `field`='feedback'; -DELETE FROM `zt_workflowfield` WHERE `module`='task' AND `field`='feedback'; - -REPLACE INTO `zt_workflowdatasource` (`type`, `name`, `code`, `buildin`, `datasource`, `view`, `keyField`, `valueField`) VALUES -('lang', '项目模型', 'projectModel', '1', 'projectModel', '', '', ''), -('lang', '反馈类型', 'feedbackType', '1', 'feedbackType', '', '', ''), -('lang', '反馈处理方案', 'feedbackSolution', '1', 'feedbackSolution', '', '', ''), -('lang', '反馈关闭原因', 'feedbackclosedReason', '1', 'feedbackclosedReason', '', '', ''), -('lang', '任务关闭原因', 'taskReason', '1', 'taskReason', '', '', ''), -('system', '项目集', 'programs', '1', '{\"app\":\"system\",\"module\":\"program\",\"method\":\"getPairs\",\"methodDesc\":\"Get program pairs.\",\"params\":[{\"name\":\"isQueryAll\",\"type\":\"bool\",\"desc\":\"\",\"value\":\"\"},{\"name\":\"orderBy\",\"type\":\"string\",\"desc\":\"\",\"value\":\"id_desc\"}]}', '', '', ''); - -INSERT INTO `zt_workflowdatasource` (`type`, `name`, `code`, `buildin`, `vision`, `datasource`, `view`, `keyField`, `valueField`) VALUES -('lang', '反馈类型', 'litefeedbackType', '1', 'lite', 'feedbackType', '', '', ''), -('lang', '反馈处理方案', 'litefeedbackSolution', '1', 'lite', 'feedbackSolution', '', '', ''), -('lang', '反馈关闭原因', 'litefeedbackclosedReason', '1', 'lite', 'feedbackclosedReason', '', '', ''), -('lang', '任务关闭原因', 'litetaskReason', '1', 'lite', 'taskReason', '', '', ''); - REPLACE INTO `zt_workflowfield` (`module`, `field`, `type`, `length`, `name`, `control`, `expression`, `options`, `default`, `rules`, `placeholder`, `order`, `searchOrder`, `exportOrder`, `canExport`, `canSearch`, `isValue`, `readonly`, `buildin`, `desc`, `createdBy`, `createdDate`, `editedBy`, `editedDate`) VALUES ('execution', 'type', 'char', '30', '迭代类型', 'select', '', '16', 'sprint', '', '', 3, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('execution', 'begin', 'date', '', '计划开始', 'date', '', '', '', '', '', 14, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), @@ -333,6 +309,41 @@ REPLACE INTO `zt_workflowfield` (`module`, `field`, `type`, `length`, `name`, `c ('testcase', 'precondition', 'text', '', '前置条件', 'textarea', '', '', '', '', '', 5, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('testcase', 'subStatus', 'varchar', '30', '子状态', 'select', '', '', '', '', '', 17, 0, 0, '0', '0', '0', '0', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('testsuite', 'type', 'text', '', '类型', 'redio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '', '', '', 17, 0, 0, '0', '0', '0', '0', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'); + +UPDATE `zt_workflowfield` SET `control` = 'radio' WHERE `module` = 'program' and `field` = 'deleted'; +UPDATE `zt_workflowfield` SET `type` = 'char', `length` = '30', `control` = 'radio' WHERE `module` = 'program' and `field` = 'type'; +UPDATE `zt_workflowfield` SET `control` = 'date' WHERE `module` = 'program' and `field` = 'begin'; +UPDATE `zt_workflowfield` SET `control` = 'date' WHERE `module` = 'program' and `field` = 'end'; +UPDATE `zt_workflowfield` SET `control` = 'integer' WHERE `module` = 'program' and `field` = 'days'; +UPDATE `zt_workflowfield` SET `control` = 'select', `options` = '[1,2,3,4]' WHERE `module` = 'program' and `field` = 'pri'; +UPDATE `zt_workflowfield` SET `control` = 'richtext' WHERE `module` = 'program' and `field` = 'desc'; +UPDATE `zt_workflowfield` SET `control` = 'datetime' WHERE `module` = 'program' and `field` = 'openedDate'; +UPDATE `zt_workflowfield` SET `control` = 'datetime' WHERE `module` = 'program' and `field` = 'closedDate'; +UPDATE `zt_workflowfield` SET `control` = 'datetime' WHERE `module` = 'program' and `field` = 'canceledDate'; +UPDATE `zt_workflowfield` SET `type` = 'char', `length` = '30', `control`='radio' WHERE `module` = 'program' and `field` = 'acl'; +UPDATE `zt_workflowfield` SET `control`='radio' WHERE `module` = 'product' and `field` = 'acl'; +UPDATE `zt_workflowfield` SET `control` = 'multi-select', `options` = 'user' WHERE `module` = 'program' and `field` = 'whitelist'; + +REPLACE INTO `zt_workflowfield` (`module`, `field`, `type`, `length`, `name`, `control`, `expression`, `options`, `default`, `rules`, `placeholder`, `order`, `searchOrder`, `exportOrder`, `canExport`, `canSearch`, `isValue`, `readonly`, `buildin`, `desc`, `createdBy`, `createdDate`, `editedBy`, `editedDate`) VALUES +('program', 'lifetime', 'char', '30', '项目周期', 'input', '', '', '', '', '', 29, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), +('program', 'output', 'text', '', '输出', 'textarea', '', '', '', '', '', 30, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), +('program', 'auth', 'char', '30', '权限控制', 'input', '', '', '', '', '', 31, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), +('program', 'path', 'varchar', '255', '路径', 'input', '', '', '', '', '', 32, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), +('program', 'grade', 'tinyint', '3', '层级', 'integer', '', '', '', '', '', 33, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), +('program', 'realBegan', 'date', '', '实际开始日期', 'date', '', '', '', '', '', 34, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), +('program', 'realEnd', 'date', '', '实际完成日期', 'date', '', '', '', '', '', 35, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), +('program', 'version', 'smallint', '6', '版本', 'integer', '', '', '', '', '', 36, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), +('program', 'parentVersion', 'smallint', '6', '父版本', 'integer', '', '', '', '', '', 37, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), +('program', 'planDuration', 'smallint', '6', '计划周期天数', 'integer', '', '', '', '', '', 38, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), +('program', 'realDuration', 'smallint', '6', '实际周期天数', 'integer', '', '', '', '', '', 39, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), +('program', 'openedVersion', 'smallint', '6', '创建版本', 'integer', '', '', '', '', '', 40, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), +('program', 'lastEditedBy', 'varchar', '30', '最后编辑人', 'select', '', 'user', '', '', '', 41, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), +('program', 'lastEditedDate', 'datetime', '', '最后编辑日期', 'datetime', '', '', '', '', '', 42, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), +('program', 'suspendedDate', 'date', '', 'suspendedDate', 'date', '', '', '', '', '', 43, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), +('program', 'vision', 'varchar', '10', 'vision', 'input', '', '', 'rnd', '', '', 44, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), +('program', 'displayCards', 'enum', '', 'displayCards', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 45, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), +('program', 'fluidBoard', 'enum', '', 'fluidBoard', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 46, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'); + UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='projectModel' LIMIT 1) WHERE `module`='project' AND `field`='model'; UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='feedbackType' LIMIT 1) WHERE `module`='feedback' AND `field`='type'; UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='feedbackSolution' LIMIT 1) WHERE `module`='feedback' AND `field`='solution'; @@ -342,6 +353,24 @@ UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='projects' LIMIT 1), `control`='select' WHERE `module`='execution' AND `field`='parent'; UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='feedbackclosedReason' LIMIT 1), `control`='select' WHERE `module`='feedback' AND `field`='closedReason'; +UPDATE `zt_workflowaction` SET `show`='direct' WHERE `buildin`=1; +UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'product' and `action` = 'all' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `type` = 'batch', `position` = 'browse' WHERE `module` = 'product' and `action` = 'batchedit' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'product' and `action` = 'browse' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `show` = 'direct' WHERE `module` = 'product' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `type` = 'batch', `position` = 'browse' WHERE `module` = 'productplan' and `action` = 'batchedit' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'productplan' and `action` = 'browse' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `show` = 'direct' WHERE `module` = 'productplan' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'release' and `action` = 'browse' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `show` = 'direct' WHERE `module` = 'release' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `type` = 'batch' WHERE `module` = 'story' and `action` = 'batchcreate' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `type` = 'batch' WHERE `module` = 'story' and `action` = 'batchedit' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'story' and `action` = 'browse' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'story' and `action` = 'exporttemplate' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'story' and `action` = 'import' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'story' and `action` = 'view' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `show` = 'direct' WHERE `module` = 'story' and `vision` = 'rnd' and action NOT IN ('exporttemplate', 'import'); +UPDATE `zt_workflowaction` SET `show` = 'direct' WHERE `module` = 'program' and `vision` = 'rnd'; UPDATE `zt_workflowaction` SET `type`='single', `position`='browseandview', `show`='direct', `open`='normal', `layout`='normal' WHERE `module`='project' AND `action`='browse'; UPDATE `zt_workflowaction` SET `type`='single', `position`='browse', `show`='direct', `open`='normal', `layout`='normal' WHERE `module`='project' AND `action`='create'; UPDATE `zt_workflowaction` SET `type`='batch', `position`='browse', `show`='direct', `open`='normal', `layout`='normal' WHERE `module`='project' AND `action`='batchedit'; @@ -408,40 +437,6 @@ UPDATE `zt_workflowaction` SET `type`='batch', `position`='browse', `show`='dire UPDATE `zt_workflowaction` SET `type`='batch' WHERE `module`IN ('feedback','caselib','testsuite','testtask','testcase') AND `action` IN ('admin','browse','batchedit','batchcreate','import','showimport'); UPDATE `zt_workflowaction` SET `position`='browse' WHERE `module`IN ('feedback','caselib','testsuite','testtask','testcase') AND `action` IN ('batchedit','batchcreate','import','showimport'); -UPDATE `zt_workflowfield` SET `control` = 'radio' WHERE `module` = 'program' and `field` = 'deleted'; -UPDATE `zt_workflowfield` SET `type` = 'char', `length` = '30', `control` = 'radio' WHERE `module` = 'program' and `field` = 'type'; -UPDATE `zt_workflowfield` SET `control` = 'date' WHERE `module` = 'program' and `field` = 'begin'; -UPDATE `zt_workflowfield` SET `control` = 'date' WHERE `module` = 'program' and `field` = 'end'; -UPDATE `zt_workflowfield` SET `control` = 'integer' WHERE `module` = 'program' and `field` = 'days'; -UPDATE `zt_workflowfield` SET `control` = 'select', `options` = '[1,2,3,4]' WHERE `module` = 'program' and `field` = 'pri'; -UPDATE `zt_workflowfield` SET `control` = 'richtext' WHERE `module` = 'program' and `field` = 'desc'; -UPDATE `zt_workflowfield` SET `control` = 'datetime' WHERE `module` = 'program' and `field` = 'openedDate'; -UPDATE `zt_workflowfield` SET `control` = 'datetime' WHERE `module` = 'program' and `field` = 'closedDate'; -UPDATE `zt_workflowfield` SET `control` = 'datetime' WHERE `module` = 'program' and `field` = 'canceledDate'; -UPDATE `zt_workflowfield` SET `type` = 'char', `length` = '30', `control`='radio' WHERE `module` = 'program' and `field` = 'acl'; -UPDATE `zt_workflowfield` SET `control`='radio' WHERE `module` = 'product' and `field` = 'acl'; -UPDATE `zt_workflowfield` SET `control` = 'multi-select', `options` = 'user' WHERE `module` = 'program' and `field` = 'whitelist'; - -REPLACE INTO `zt_workflowfield` (`module`, `field`, `type`, `length`, `name`, `control`, `expression`, `options`, `default`, `rules`, `placeholder`, `order`, `searchOrder`, `exportOrder`, `canExport`, `canSearch`, `isValue`, `readonly`, `buildin`, `desc`, `createdBy`, `createdDate`, `editedBy`, `editedDate`) VALUES -('program', 'lifetime', 'char', '30', '项目周期', 'input', '', '', '', '', '', 29, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'output', 'text', '', '输出', 'textarea', '', '', '', '', '', 30, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'auth', 'char', '30', '权限控制', 'input', '', '', '', '', '', 31, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'path', 'varchar', '255', '路径', 'input', '', '', '', '', '', 32, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'grade', 'tinyint', '3', '层级', 'integer', '', '', '', '', '', 33, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'realBegan', 'date', '', '实际开始日期', 'date', '', '', '', '', '', 34, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'realEnd', 'date', '', '实际完成日期', 'date', '', '', '', '', '', 35, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'version', 'smallint', '6', '版本', 'integer', '', '', '', '', '', 36, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'parentVersion', 'smallint', '6', '父版本', 'integer', '', '', '', '', '', 37, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'planDuration', 'smallint', '6', '计划周期天数', 'integer', '', '', '', '', '', 38, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'realDuration', 'smallint', '6', '实际周期天数', 'integer', '', '', '', '', '', 39, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'openedVersion', 'smallint', '6', '创建版本', 'integer', '', '', '', '', '', 40, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'lastEditedBy', 'varchar', '30', '最后编辑人', 'select', '', 'user', '', '', '', 41, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'lastEditedDate', 'datetime', '', '最后编辑日期', 'datetime', '', '', '', '', '', 42, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'suspendedDate', 'date', '', 'suspendedDate', 'date', '', '', '', '', '', 43, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'vision', 'varchar', '10', 'vision', 'input', '', '', 'rnd', '', '', 44, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'displayCards', 'enum', '', 'displayCards', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 45, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'fluidBoard', 'enum', '', 'fluidBoard', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 46, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'); - UPDATE `zt_workflowaction` SET `position`='browse' WHERE `action` IN ('view','exporttemplate'); UPDATE `zt_workflowaction` SET `position`='browse' WHERE `action`='create' AND `module` IN ('testtask','feedback'); @@ -455,4 +450,4 @@ UPDATE `zt_workflowaction` SET `type` ='single' WHERE `action`='browse' AND mod UPDATE `zt_workflowaction` SET `method`='browse' WHERE module='product' and `action` = 'all'; UPDATE `zt_workflowaction` SET `type` ='single' WHERE `action`='browse' AND `type`='batch' AND `buildin`=1; -UPDATE `zt_workflowaction` SET `show`='direct' WHERE `buildin`=1; +UPDATE `zt_workflowlayout` SET `mobileShow`='0' WHERE `mobileShow`='1' AND `module` IN('product', 'story', 'productplan', 'release', 'project', 'task', 'build', 'bug', 'testcase', 'testtask', 'testsuite', 'caselib', 'feedback'); From e51b5309d1dd90c322cf6828cf04e894026d028c Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 16 May 2022 14:17:36 +0800 Subject: [PATCH 02/92] * fix bug for api. --- module/product/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/product/model.php b/module/product/model.php index d7cc4528a7..399ba598c7 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -646,7 +646,7 @@ class productModel extends model ->get(); $product = $this->loadModel('file')->processImgURL($product, $this->config->product->editor->create['id'], $this->post->uid); - $programID = isset($product->program) ? $product->program : ''; + $programID = isset($product->program) ? $product->program : 0; $this->dao->insert(TABLE_PRODUCT)->data($product)->autoCheck() ->batchCheck($this->config->product->create->requiredFields, 'notempty') ->checkIF((!empty($product->name) and $this->config->systemMode == 'new'), 'name', 'unique', "`program` = $programID") From f1702375c166645a0cd9d93133912e3c586b6504 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 16 May 2022 15:29:25 +0800 Subject: [PATCH 03/92] * adjust for action position field. --- db/update16.5.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/db/update16.5.sql b/db/update16.5.sql index aead3797a6..3d4d477d62 100644 --- a/db/update16.5.sql +++ b/db/update16.5.sql @@ -364,7 +364,7 @@ UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'productpl UPDATE `zt_workflowaction` SET `show` = 'direct' WHERE `module` = 'productplan' and `vision` = 'rnd'; UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'release' and `action` = 'browse' and `vision` = 'rnd'; UPDATE `zt_workflowaction` SET `show` = 'direct' WHERE `module` = 'release' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `type` = 'batch' WHERE `module` = 'story' and `action` = 'batchcreate' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `type` = 'batch', `position` = 'browseandview' WHERE `module` = 'story' and `action` = 'batchcreate' and `vision` = 'rnd'; UPDATE `zt_workflowaction` SET `type` = 'batch' WHERE `module` = 'story' and `action` = 'batchedit' and `vision` = 'rnd'; UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'story' and `action` = 'browse' and `vision` = 'rnd'; UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'story' and `action` = 'exporttemplate' and `vision` = 'rnd'; @@ -396,7 +396,7 @@ UPDATE `zt_workflowaction` SET `type`='single', `position`='browseandview', `sho UPDATE `zt_workflowaction` SET `type`='single', `position`='browseandview', `show`='direct', `open`='normal', `layout`='normal' WHERE `module`='execution' AND `action`='all'; UPDATE `zt_workflowaction` SET `type`='single', `position`='browseandview', `show`='direct', `open`='normal', `layout`='normal' WHERE `module`='task' AND `action`='browse'; UPDATE `zt_workflowaction` SET `type`='single', `position`='browseandview', `show`='direct', `open`='normal', `layout`='normal' WHERE `module`='task' AND `action`='create'; -UPDATE `zt_workflowaction` SET `type`='batch', `position`='browse', `show`='direct', `open`='normal', `layout`='normal' WHERE `module`='task' AND `action`='batchcreate'; +UPDATE `zt_workflowaction` SET `type`='batch', `position`='browseandview', `show`='direct', `open`='normal', `layout`='normal' WHERE `module`='task' AND `action`='batchcreate'; UPDATE `zt_workflowaction` SET `type`='batch', `position`='browse', `show`='direct', `open`='normal', `layout`='normal' WHERE `module`='task' AND `action`='batchedit'; UPDATE `zt_workflowaction` SET `type`='single', `position`='browse', `show`='direct', `open`='modal', `layout`='normal' WHERE `module`='task' AND `action`='exporttemplate'; UPDATE `zt_workflowaction` SET `type`='single', `position`='browse', `show`='direct', `open`='modal', `layout`='normal' WHERE `module`='task' AND `action`='import'; @@ -435,7 +435,7 @@ UPDATE `zt_workflowaction` SET `type`='single', `position`='browseandview', `sho UPDATE `zt_workflowaction` SET `type`='single', `position`='browseandview', `show`='direct', `open`='modal', `layout`='normal' WHERE `module`='bug' AND `action`='resolve'; UPDATE `zt_workflowaction` SET `type`='batch', `position`='browse', `show`='direct', `open`='none', `layout`='normal' WHERE `module`='bug' AND `action`='batchconfirm'; UPDATE `zt_workflowaction` SET `type`='batch', `position`='browse', `show`='direct', `open`='none', `layout`='normal' WHERE `module`='bug' AND `action`='batchresolve'; -UPDATE `zt_workflowaction` SET `type`='batch' WHERE `module`IN ('feedback','caselib','testsuite','testtask','testcase') AND `action` IN ('admin','browse','batchedit','batchcreate','import','showimport'); +UPDATE `zt_workflowaction` SET `type`='batch' WHERE `module`IN ('feedback','caselib','testsuite','testtask','testcase') AND `action` IN ('batchedit','batchcreate'); UPDATE `zt_workflowaction` SET `position`='browse' WHERE `module`IN ('feedback','caselib','testsuite','testtask','testcase') AND `action` IN ('batchedit','batchcreate','import','showimport'); UPDATE `zt_workflowaction` SET `position`='browse' WHERE `action` IN ('view','exporttemplate'); From 759ace37009b6f75b485c00fdc2e9d79c9e722e6 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 16 May 2022 16:36:04 +0800 Subject: [PATCH 04/92] * code for task #54026. --- module/bug/lang/en.php | 3 +++ module/bug/lang/zh-cn.php | 3 +++ module/execution/lang/en.php | 20 ++++++++++++++++++++ module/execution/lang/zh-cn.php | 20 ++++++++++++++++++++ module/program/lang/en.php | 2 ++ module/program/lang/zh-cn.php | 2 ++ module/project/lang/en.php | 4 ++++ module/project/lang/zh-cn.php | 4 ++++ module/task/lang/en.php | 7 +++++++ module/task/lang/zh-cn.php | 7 +++++++ 10 files changed, 72 insertions(+) diff --git a/module/bug/lang/en.php b/module/bug/lang/en.php index 08873aab3c..e12a4b45ee 100644 --- a/module/bug/lang/en.php +++ b/module/bug/lang/en.php @@ -34,9 +34,12 @@ $lang->bug->browser = 'Browser'; $lang->bug->hardware = 'Hardware'; $lang->bug->result = 'Result'; $lang->bug->repo = 'Repo'; +$lang->bug->mr = 'Merge Request'; +$lang->bug->entry = 'Code Path'; $lang->bug->lines = 'Lines'; $lang->bug->v1 = 'Version A'; $lang->bug->v2 = 'Version B'; +$lang->bug->issueKey = 'Sonarqube Issue Key'; $lang->bug->repoType = 'Repo Type'; $lang->bug->steps = 'Repro Steps'; $lang->bug->status = 'Status'; diff --git a/module/bug/lang/zh-cn.php b/module/bug/lang/zh-cn.php index aab1cf518a..1549c5b6fb 100644 --- a/module/bug/lang/zh-cn.php +++ b/module/bug/lang/zh-cn.php @@ -34,9 +34,12 @@ $lang->bug->browser = '浏览器'; $lang->bug->hardware = '硬件'; $lang->bug->result = '结果'; $lang->bug->repo = '所属版本库'; +$lang->bug->mr = '合并请求'; +$lang->bug->entry = '代码路径'; $lang->bug->lines = '代码行'; $lang->bug->v1 = '版本1'; $lang->bug->v2 = '版本2'; +$lang->bug->issueKey = 'Sonarqube问题键值'; $lang->bug->repoType = '版本库类型'; $lang->bug->steps = '重现步骤'; $lang->bug->status = 'Bug状态'; diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index a653f8e02b..f3d04c398b 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -17,9 +17,29 @@ $lang->execution->type = $lang->executionCommon . 'Type'; $lang->execution->name = "{$lang->executionCommon} Name"; $lang->execution->code = "{$lang->executionCommon} Code"; $lang->execution->projectName = 'Project'; +$lang->execution->project = 'Project'; $lang->execution->execName = "{$lang->execution->common} Name"; $lang->execution->execCode = "{$lang->execution->common} Code"; $lang->execution->execType = 'Execution Type'; +$lang->execution->lifetime = 'Project Cycle'; +$lang->execution->attribute = 'Stage Type'; +$lang->execution->percent = 'Workload %'; +$lang->execution->milestone = 'Milestone'; +$lang->execution->parent = 'Project'; +$lang->execution->path = 'Path'; +$lang->execution->grade = 'Grade'; +$lang->execution->output = 'Output'; +$lang->execution->version = 'Version'; +$lang->execution->parentVersion = 'Parent Version'; +$lang->execution->planDuration = 'Plan Duration'; +$lang->execution->realDuration = 'Real Duration'; +$lang->execution->openedVersion = 'Opened Version'; +$lang->execution->lastEditedBy = 'Last EditedBy'; +$lang->execution->lastEditedDate = 'Last EditedDate'; +$lang->execution->suspendedDate = 'Suspended Date'; +$lang->execution->vision = 'Vision'; +$lang->execution->displayCards = 'Max cards per column'; +$lang->execution->fluidBoard = 'Column Width'; $lang->execution->stage = 'Stage'; $lang->execution->pri = 'Priority'; $lang->execution->openedBy = 'OpenedBy'; diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index 060c63b27f..94038c5060 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -17,9 +17,29 @@ $lang->execution->type = $lang->executionCommon . '类型'; $lang->execution->name = $lang->executionCommon . '名称'; $lang->execution->code = $lang->executionCommon . '代号'; $lang->execution->projectName = '所属项目'; +$lang->execution->project = '所属项目'; $lang->execution->execName = "{$lang->execution->common}名称"; $lang->execution->execCode = "{$lang->execution->common}代号"; $lang->execution->execType = "{$lang->execution->common}类型"; +$lang->execution->lifetime = '项目周期'; +$lang->execution->attribute = '阶段类型'; +$lang->execution->percent = '工作量占比'; +$lang->execution->milestone = '里程碑'; +$lang->execution->parent = '所属项目'; +$lang->execution->path = '路径'; +$lang->execution->grade = '层级'; +$lang->execution->output = '输出'; +$lang->execution->version = '版本'; +$lang->execution->parentVersion = '父版本'; +$lang->execution->planDuration = '计划周期天数'; +$lang->execution->realDuration = '实际周期天数'; +$lang->execution->openedVersion = '创建版本'; +$lang->execution->lastEditedBy = '最后编辑人'; +$lang->execution->lastEditedDate = '最后编辑日期'; +$lang->execution->suspendedDate = '暂停日期'; +$lang->execution->vision = '界面'; +$lang->execution->displayCards = '每列最大卡片数'; +$lang->execution->fluidBoard = '列宽度'; $lang->execution->stage = '阶段'; $lang->execution->pri = '优先级'; $lang->execution->openedBy = '由谁创建'; diff --git a/module/program/lang/en.php b/module/program/lang/en.php index 7f3cb0dc2d..e83f1a699d 100644 --- a/module/program/lang/en.php +++ b/module/program/lang/en.php @@ -25,6 +25,8 @@ $lang->program->closedDate = 'ClosedDate'; $lang->program->canceledBy = 'CanceledBy'; $lang->program->canceledDate = 'CanceledDate'; $lang->program->lastEditedDate = 'LastEditedDate'; +$lang->program->suspendedDate = 'SuspendedDate'; +$lang->program->vision = 'Vision'; $lang->program->team = 'Team'; $lang->program->order = 'Rank'; $lang->program->days = 'Days'; diff --git a/module/program/lang/zh-cn.php b/module/program/lang/zh-cn.php index a2666d36e9..33d837edfa 100644 --- a/module/program/lang/zh-cn.php +++ b/module/program/lang/zh-cn.php @@ -25,6 +25,8 @@ $lang->program->closedDate = '关闭日期'; $lang->program->canceledBy = '由谁取消'; $lang->program->canceledDate = '取消日期'; $lang->program->lastEditedDate = '最后编辑'; +$lang->program->suspendedDate = '暂停日期'; +$lang->program->vision = '界面'; $lang->program->team = '团队'; $lang->program->order = '排序'; $lang->program->days = '可用工作日'; diff --git a/module/project/lang/en.php b/module/project/lang/en.php index 3a38a1bb2c..03a53d14b6 100644 --- a/module/project/lang/en.php +++ b/module/project/lang/en.php @@ -106,6 +106,10 @@ $lang->project->teamAction = 'Team List'; $lang->project->order = 'Rank'; $lang->project->budget = 'Budget'; $lang->project->budgetUnit = 'Budget Unit'; +$lang->project->suspendedDate = 'SuspendedDate'; +$lang->project->vision = 'Vision'; +$lang->project->displayCards = 'Max cards per column'; +$lang->project->fluidBoard = 'Column Width'; $lang->project->template = 'Template'; $lang->project->estimate = 'Estimates'; $lang->project->consume = 'Cost'; diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php index 453120a75f..7980bf8d64 100644 --- a/module/project/lang/zh-cn.php +++ b/module/project/lang/zh-cn.php @@ -106,6 +106,10 @@ $lang->project->teamAction = '团队列表'; $lang->project->order = '排序'; $lang->project->budget = '预算'; $lang->project->budgetUnit = '预算单位'; +$lang->project->suspendedDate = '暂停日期'; +$lang->project->vision = '界面'; +$lang->project->displayCards = '每列最大卡片数'; +$lang->project->fluidBoard = '列宽度'; $lang->project->template = '项目模板'; $lang->project->estimate = '预计'; $lang->project->consume = '消耗'; diff --git a/module/task/lang/en.php b/module/task/lang/en.php index 0d8f215eac..fd136094ec 100644 --- a/module/task/lang/en.php +++ b/module/task/lang/en.php @@ -127,6 +127,13 @@ $lang->task->lastEdited = 'EditedBy'; $lang->task->recordEstimate = 'Effort'; $lang->task->editEstimate = 'Edit Estimates'; $lang->task->deleteEstimate = 'Delete Estimates'; +$lang->task->repo = 'Repo'; +$lang->task->mr = 'Merge Request'; +$lang->task->entry = 'Code Path'; +$lang->task->lines = 'Lines'; +$lang->task->v1 = 'Version A'; +$lang->task->v2 = 'Version B'; +$lang->task->vision = 'Vision'; $lang->task->colorTag = 'Color'; $lang->task->files = 'Files'; $lang->task->hasConsumed = 'Already Cost'; diff --git a/module/task/lang/zh-cn.php b/module/task/lang/zh-cn.php index 200f48a58e..a2470ff572 100644 --- a/module/task/lang/zh-cn.php +++ b/module/task/lang/zh-cn.php @@ -127,6 +127,13 @@ $lang->task->lastEdited = '最后编辑'; $lang->task->recordEstimate = '工时'; $lang->task->editEstimate = '编辑工时'; $lang->task->deleteEstimate = '删除工时'; +$lang->task->repo = '所属版本库'; +$lang->task->mr = '合并请求'; +$lang->task->entry = '代码路径'; +$lang->task->lines = '代码行'; +$lang->task->v1 = '版本1'; +$lang->task->v2 = '版本2'; +$lang->task->vision = '所属界面'; $lang->task->colorTag = '颜色标签'; $lang->task->files = '附件'; $lang->task->hasConsumed = '之前消耗'; From 12844f3dc863be233db931b6bcf9fa528f221e09 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Mon, 16 May 2022 16:39:10 +0800 Subject: [PATCH 05/92] * Fix bug#22496. --- module/group/lang/resource.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index 9e7c18a9bd..953c7b9aed 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -470,9 +470,7 @@ $lang->resource->branch->edit = 'editAction'; $lang->resource->branch->close = 'closeAction'; $lang->resource->branch->activate = 'activateAction'; $lang->resource->branch->sort = 'sort'; -$lang->resource->branch->delete = 'delete'; $lang->resource->branch->batchEdit = 'batchEdit'; -$lang->resource->branch->setDefault = 'setDefaultAction'; $lang->resource->branch->mergeBranch = 'mergeBranchAction'; $lang->branch->methodOrder[0] = 'manage'; @@ -481,10 +479,8 @@ $lang->branch->methodOrder[10] = 'edit'; $lang->branch->methodOrder[15] = 'close'; $lang->branch->methodOrder[20] = 'activate'; $lang->branch->methodOrder[25] = 'sort'; -$lang->branch->methodOrder[30] = 'delete'; -$lang->branch->methodOrder[35] = 'batchEdit'; -$lang->branch->methodOrder[40] = 'setDefault'; -$lang->branch->methodOrder[45] = 'mergeBranch'; +$lang->branch->methodOrder[30] = 'batchEdit'; +$lang->branch->methodOrder[35] = 'mergeBranch'; /* Story. */ $lang->resource->story = new stdclass(); From b86fb916041a6edb0c7b0d2df5ef2126d677a23d Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 17 May 2022 10:53:15 +0800 Subject: [PATCH 06/92] * adjust for storyClosedReason field. --- db/update16.5.sql | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/db/update16.5.sql b/db/update16.5.sql index 3d4d477d62..e1a6a9cefd 100644 --- a/db/update16.5.sql +++ b/db/update16.5.sql @@ -96,7 +96,8 @@ REPLACE INTO `zt_workflowdatasource` (`type`, `name`, `code`, `buildin`, `dataso ('lang', '反馈处理方案', 'feedbackSolution', '1', 'feedbackSolution', '', '', ''), ('lang', '反馈关闭原因', 'feedbackclosedReason', '1', 'feedbackclosedReason', '', '', ''), ('lang', '任务关闭原因', 'taskReason', '1', 'taskReason', '', '', ''), -('system', '项目集', 'programs', '1', '{\"app\":\"system\",\"module\":\"program\",\"method\":\"getPairs\",\"methodDesc\":\"Get program pairs.\",\"params\":[{\"name\":\"isQueryAll\",\"type\":\"bool\",\"desc\":\"\",\"value\":\"\"},{\"name\":\"orderBy\",\"type\":\"string\",\"desc\":\"\",\"value\":\"id_desc\"}]}', '', '', ''); +('system', '项目集', 'programs', '1', '{\"app\":\"system\",\"module\":\"program\",\"method\":\"getPairs\",\"methodDesc\":\"Get program pairs.\",\"params\":[{\"name\":\"isQueryAll\",\"type\":\"bool\",\"desc\":\"\",\"value\":\"\"},{\"name\":\"orderBy\",\"type\":\"string\",\"desc\":\"\",\"value\":\"id_desc\"}]}', '', '', ''), +('lang', '需求关闭原因', 'storyClosedReason', '1', 'storyClosedReason', '', '', ''); INSERT INTO `zt_workflowdatasource` (`type`, `name`, `code`, `buildin`, `vision`, `datasource`, `view`, `keyField`, `valueField`) VALUES ('lang', '反馈类型', 'litefeedbackType', '1', 'lite', 'feedbackType', '', '', ''), @@ -349,6 +350,7 @@ UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='feedbackType' LIMIT 1) WHERE `module`='feedback' AND `field`='type'; UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='feedbackSolution' LIMIT 1) WHERE `module`='feedback' AND `field`='solution'; UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='taskReason' LIMIT 1) WHERE `module`='task' AND `field`='closedReason'; +UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='storyClosedReason' LIMIT 1) WHERE `module`='story' AND `field`='closedReason'; UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='programs' LIMIT 1), `control`='select' WHERE `module`='program' AND `field`='parent'; UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='programs' LIMIT 1), `control`='select' WHERE `module`='project' AND `field`='parent'; UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='projects' LIMIT 1), `control`='select' WHERE `module`='execution' AND `field`='parent'; From f9b06ea3f95da1dfda373a62942dc218cbbc86f5 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 17 May 2022 13:50:20 +0800 Subject: [PATCH 07/92] * adjust for workflow field name. --- db/update16.5.sql | 230 +++++++++++++++----------------- module/execution/lang/en.php | 1 + module/execution/lang/zh-cn.php | 1 + 3 files changed, 106 insertions(+), 126 deletions(-) diff --git a/db/update16.5.sql b/db/update16.5.sql index e1a6a9cefd..6367b93871 100644 --- a/db/update16.5.sql +++ b/db/update16.5.sql @@ -133,6 +133,67 @@ UPDATE `zt_workflowfield` SET `control` = 'datetime' WHERE `module` = 'story' an UPDATE `zt_workflowfield` SET `control` = 'radio' WHERE `module` = 'story' and `field` = 'deleted'; REPLACE INTO `zt_workflowfield` (`module`, `field`, `type`, `length`, `name`, `control`, `expression`, `options`, `default`, `rules`, `placeholder`, `order`, `searchOrder`, `exportOrder`, `canExport`, `canSearch`, `isValue`, `readonly`, `buildin`, `desc`, `createdBy`, `createdDate`, `editedBy`, `editedDate`) VALUES +('program', 'type', 'char', '30', '类型', 'select', '', '16', 'sprint', '', '', 2, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'begin', 'date', '', '计划开始', 'date', '', '', '', '', '', 15, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'end', 'date', '', '计划完成', 'date', '', '', '', '', '', 16, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'days', 'smallint', '5', '可用工作日', 'integer', '', '', '', '', '', 19, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'pri', 'enum', '', '优先级', 'select', '', '[1,2,3,4]', '1', '', '', 21, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'desc', 'text', '', '项目集描述', 'richtext', '', '', '', '', '', 22, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'openedDate', 'datetime', '', '创建日期', 'datetime', '', '', '', '', '', 28, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'closedDate', 'datetime', '', '关闭日期', 'datetime', '', '', '', '', '', 33, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'canceledDate', 'datetime', '', '取消日期', 'datetime', '', '', '', '', '', 35, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'whitelist', 'text', '', '白名单', 'multi-select', '', 'user', '', '', '', 43, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'deleted', 'enum', '', '已删除', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 48, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'lifetime', 'char', '30', '项目周期', 'input', '', '', '', '', '', 3, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'output', 'text', '', '输出', 'textarea', '', '', '', '', '', 9, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'auth', 'char', '30', '权限控制', 'input', '', '', '', '', '', 10, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'path', 'varchar', '255', '路径', 'input', '', '', '0', '', '', 12, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'grade', 'tinyint', '3', '层级', 'integer', '', '', '0', '', '', 13, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'realBegan', 'date', '', '实际开始日期', 'date', '', '', '', '', '', 17, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'realEnd', 'date', '', '实际完成日期', 'date', '', '', '', '', '', 18, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'version', 'smallint', '6', '版本', 'integer', '', '', '', '', '', 23, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'parentVersion', 'smallint', '6', '父版本', 'integer', '', '', '', '', '', 24, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'planDuration', 'int', '11', '计划周期天数', 'integer', '', '', '', '', '', 25, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'realDuration', 'int', '11', '实际周期天数', 'integer', '', '', '', '', '', 26, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'openedVersion', 'varchar', '20', '创建版本', 'input', '', '', '', '', '', 29, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'lastEditedBy', 'varchar', '30', '最后编辑人', 'select', '', 'user', '', '', '', 30, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'lastEditedDate', 'datetime', '', '最后编辑日期', 'datetime', '', '', '', '', '', 31, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'suspendedDate', 'date', '', '暂停日期', 'date', '', '', '', '', '', 36, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'vision', 'varchar', '10', '界面', 'input', '', '', 'rnd', '', '', 45, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'project', 'mediumint', '8', '所属项目集', 'input', '', '', '', '', '', 2, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'code', 'varchar', '45', '项目代号', 'input', '', '', '', '', '', 14, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'type', 'char', '30', '项目类型', 'select', '', '16', 'sprint', '', '', 3, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'model', 'char', '30', '项目管理方式', 'input', '', '45', '', '', '', 2, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'name', 'varchar', '90', '项目名称', 'input', '', '', '', '', '', 15, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'begin', 'date', '', '计划开始', 'date', '', '', '', '', '', 16, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'end', 'date', '', '计划完成', 'date', '', '', '', '', '', 17, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'days', 'smallint', '5', '可用工作日', 'integer', '', '', '', '', '', 20, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'pri', 'enum', '', '优先级', 'select', '', '[1,2,3,4]', '1', '', '', 22, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'desc', 'text', '', '项目描述', 'richtext', '', '', '', '', '', 23, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'openedDate', 'datetime', '', '创建日期', 'datetime', '', '', '', '', '', 29, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'closedDate', 'datetime', '', '关闭日期', 'datetime', '', '', '', '', '', 34, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'canceledDate', 'datetime', '', '取消日期', 'datetime', '', '', '', '', '', 36, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'acl', 'char', '30', '访问控制', 'radio', '', '18', 'open', '', '', 43, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'whitelist', 'text', '', '项目白名单', 'multi-select', '', 'user', '', '', '', 44, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'deleted', 'enum', '', '已删除', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 49, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'lifetime', 'char', '30', '项目周期', 'input', '', '', '', '', '', 4, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'output', 'text', '', '输出', 'textarea', '', '', '', '', '', 10, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'auth', 'char', '30', '权限控制', 'input', '', '', '', '', '', 11, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'path', 'varchar', '255', '路径', 'input', '', '', '0', '', '', 13, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'grade', 'tinyint', '3', '层级', 'integer', '', '', '0', '', '', 14, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'realBegan', 'date', '', '实际开始日期', 'date', '', '', '', '', '', 18, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'realEnd', 'date', '', '实际完成日期', 'date', '', '', '', '', '', 19, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'version', 'smallint', '6', '版本', 'integer', '', '', '', '', '', 24, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'parentVersion', 'smallint', '6', '父版本', 'integer', '', '', '', '', '', 25, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'planDuration', 'int', '11', '计划周期天数', 'integer', '', '', '', '', '', 26, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'realDuration', 'int', '11', '实际周期天数', 'integer', '', '', '', '', '', 27, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'openedVersion', 'varchar', '20', '创建版本', 'input', '', '', '', '', '', 30, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'lastEditedBy', 'varchar', '30', '最后编辑人', 'select', '', 'user', '', '', '', 31, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'lastEditedDate', 'datetime', '', '最后编辑日期', 'datetime', '', '', '', '', '', 32, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'suspendedDate', 'date', '', '暂停日期', 'date', '', '', '', '', '', 37, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'vision', 'varchar', '10', '界面', 'input', '', '', 'rnd', '', '', 46, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'displayCards', 'smallint', '6', '每列最大卡片数', 'input', '', '', '0', '', '', 44, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'fluidBoard', 'enum', '', '列宽度', 'radio', '', '[\"\\u56fa\\u5b9a\\u5217\\u5bbd\",\"\\u81ea\\u9002\\u5e94\\u5217\\u5bbd\"]', '0', '', '', 45, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('execution', 'type', 'char', '30', '迭代类型', 'select', '', '16', 'sprint', '', '', 3, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('execution', 'begin', 'date', '', '计划开始', 'date', '', '', '', '', '', 14, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('execution', 'end', 'date', '', '计划完成', 'date', '', '', '', '', '', 15, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), @@ -145,31 +206,27 @@ REPLACE INTO `zt_workflowfield` (`module`, `field`, `type`, `length`, `name`, `c ('execution', 'acl', 'char', '30', '访问控制', 'radio', '', '18', 'open', '', '', 41, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('execution', 'whitelist', 'text', '', '白名单', 'multi-select', '', 'user', '', '', '', 42, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('execution', 'deleted', 'enum', '', '已删除', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 47, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'type', 'char', '30', '类型', 'select', '', '16', 'sprint', '', '', 2, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'begin', 'date', '', '计划开始', 'date', '', '', '', '', '', 15, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'end', 'date', '', '计划完成', 'date', '', '', '', '', '', 16, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'days', 'smallint', '5', '可用工作日', 'integer', '', '', '', '', '', 19, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'pri', 'enum', '', '优先级', 'select', '', '[1,2,3,4]', '1', '', '', 21, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'desc', 'text', '', '项目集描述', 'richtext', '', '', '', '', '', 22, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'openedDate', 'datetime', '', '创建日期', 'datetime', '', '', '', '', '', 28, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'closedDate', 'datetime', '', '关闭日期', 'datetime', '', '', '', '', '', 33, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'canceledDate', 'datetime', '', '取消日期', 'datetime', '', '', '', '', '', 35, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'whitelist', 'text', '', '白名单', 'multi-select', '', 'user', '', '', '', 43, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'deleted', 'enum', '', '已删除', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 48, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'type', 'char', '30', '项目类型', 'select', '', '16', 'sprint', '', '', 3, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'model', 'char', '30', '项目管理方式', 'input', '', '45', '', '', '', 2, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'name', 'varchar', '90', '项目名称', 'input', '', '', '', '', '', 15, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'begin', 'date', '', '计划开始', 'date', '', '', '', '', '', 16, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'end', 'date', '', '计划完成', 'date', '', '', '', '', '', 17, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'days', 'smallint', '5', '可用工作日', 'integer', '', '', '', '', '', 20, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'pri', 'enum', '', '优先级', 'select', '', '[1,2,3,4]', '1', '', '', 22, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'desc', 'text', '', '项目描述', 'richtext', '', '', '', '', '', 23, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'openedDate', 'datetime', '', '创建日期', 'datetime', '', '', '', '', '', 29, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'closedDate', 'datetime', '', '关闭日期', 'datetime', '', '', '', '', '', 34, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'canceledDate', 'datetime', '', '取消日期', 'datetime', '', '', '', '', '', 36, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'acl', 'char', '30', '访问控制', 'radio', '', '18', 'open', '', '', 43, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'whitelist', 'text', '', '项目白名单', 'multi-select', '', 'user', '', '', '', 44, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'deleted', 'enum', '', '已删除', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 49, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'lifetime', 'char', '30', '项目周期', 'input', '', '', '', '', '', 4, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'attribute', 'varchar', '30', '阶段类型', 'input', '', '', '0', '', '', 5, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'percent', 'float', '', '工作量占比', 'input', '', '', '0', '', '', 6, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'milestone', 'enum', '', '里程碑', 'radio', '', '[\"\\u662f\",\"\\u5426\"]', '0', '', '', 7, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'output', 'text', '', '输出', 'textarea', '', '', '', '', '', 8, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'auth', 'char', '30', '权限控制', 'input', '', '', '', '', '', 9, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'path', 'varchar', '255', '路径', 'input', '', '', '0', '', '', 10, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'grade', 'tinyint', '3', '层级', 'integer', '', '', '0', '', '', 11, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'realBegan', 'date', '', '实际开始日期', 'date', '', '', '', '', '', 16, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'realEnd', 'date', '', '实际完成日期', 'date', '', '', '', '', '', 17, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'version', 'smallint', '6', '版本', 'integer', '', '', '', '', '', 22, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'parentVersion', 'smallint', '6', '父版本', 'integer', '', '', '', '', '', 23, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'planDuration', 'int', '11', '计划周期天数', 'integer', '', '', '', '', '', 24, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'realDuration', 'int', '11', '实际周期天数', 'integer', '', '', '', '', '', 25, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'openedVersion', 'varchar', '20', '创建版本', 'input', '', '', '', '', '', 28, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'lastEditedBy', 'varchar', '30', '最后编辑人', 'select', '', 'user', '', '', '', 29, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'lastEditedDate', 'datetime', '', '最后编辑日期', 'datetime', '', '', '', '', '', 30, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'suspendedDate', 'date', '', '暂停日期', 'date', '', '', '', '', '', 35, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'vision', 'varchar', '10', '界面', 'input', '', '', 'rnd', '', '', 44, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'displayCards', 'smallint', '6', '每列最大卡片数', 'input', '', '', '0', '', '', 46, 0, 0, '0', '0', '0', '1', 1, '', 'wangyidong', '2022-05-17 11:05:43', '', '0000-00-00 00:00:00'), +('execution', 'fluidBoard', 'enum', '', '列宽度', 'radio', '', '[\"\\u56fa\\u5b9a\\u5217\\u5bbd\",\"\\u81ea\\u9002\\u5e94\\u5217\\u5bbd\"]', '0', '', '', 47, 0, 0, '0', '0', '0', '1', 1, '', 'wangyidong', '2022-05-17 11:05:43', '', '0000-00-00 00:00:00'), ('build', 'project', 'mediumint', '8', '所属项目', 'select', '', '2', '0', '', '', 4, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('build', 'date', 'date', '', '打包日期', 'date', '', '', '', '', '', 9, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('build', 'desc', 'text', '', '描述', 'richtext', '', '', '', '', '', 13, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), @@ -190,6 +247,19 @@ REPLACE INTO `zt_workflowfield` (`module`, `field`, `type`, `length`, `name`, `c ('bug', 'caseVersion', 'smallint', '6', '用例版本', 'integer', '', '', '', '', '', 46, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('bug', 'lastEditedDate', 'datetime', '30', '修改日期', 'datetime', '', '', '', '', '', 58, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('bug', 'deleted', 'enum', '', '已删除', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 59, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('bug', 'confirmed', 'tinyint', '1', '是否确认', 'select', '', '[\"\\u662f\",\"\\u5426\"]', '0', '', '', 25, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('bug', 'hardware', 'varchar', '30', '硬件', 'input', '', '', '', '', '', 20, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('bug', 'feedbackBy', 'varchar', '100', '反馈者', 'input', '', '', '', '', '', 28, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('bug', 'notifyEmail', 'varchar', '100', '通知邮箱', 'input', '', '', '', '', '', 29, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('bug', 'result', 'mediumint', '8', '结果', 'input', '', '', '', '', '', 47, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('bug', 'repo', 'mediumint', '8', '所属版本库', 'input', '', '', '', '', '', 48, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('bug', 'mr', 'mediumint', '8', '合并请求', 'input', '', '', '', '', '', 49, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('bug', 'entry', 'text', '', '代码路径', 'input', '', '', '', '', '', 50, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('bug', 'lines', 'varchar', '10', '代码行', 'input', '', '', '', '', '', 51, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('bug', 'v1', 'varchar', '40', '版本1', 'input', '', '', '', '', '', 52, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('bug', 'v2', 'varchar', '40', '版本2', 'input', '', '', '', '', '', 53, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('bug', 'repoType', 'varchar', '30', '版本库类型', 'input', '', '', '', '', '', 54, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('bug', 'issueKey', 'varchar', '50', 'Sonarqube问题键值', 'input', '', '', '', '', '', 55, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'project', 'mediumint', '8', '所属项目', 'select', '', '2', '0', '', '', 2, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'parent', 'mediumint', '8', '父任务', 'select', '', '9', '0', '', '', 3, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'storyVersion', 'smallint', '6', '研发需求版本', 'integer', '', '', '1', '', '', 7, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), @@ -207,92 +277,19 @@ REPLACE INTO `zt_workflowfield` (`module`, `field`, `type`, `length`, `name`, `c ('task', 'closedDate', 'datetime', '', '关闭时间', 'datetime', '', '', '', '', '', 34, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'lastEditedDate', 'datetime', '', '最后修改日期', 'datetime', '', '', '', '', '', 39, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'deleted', 'enum', '', '已删除', 'select', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 48, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('bug', 'confirmed', 'tinyint', '1', '是否确认', 'select', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 25, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'lifetime', 'char', '30', 'lifetime', 'input', '', '', '', '', '', 4, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'lifetime', 'char', '30', 'lifetime', 'input', '', '', '', '', '', 3, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'designVersion', 'smallint', '6', '设计版本', 'integer', '', '', '', '', '', 8, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'attribute', 'varchar', '30', 'attribute', 'input', '', '', '0', '', '', 5, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'percent', 'float', '', 'percent', 'input', '', '', '0', '', '', 6, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'milestone', 'enum', '', 'milestone', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 7, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'output', 'text', '', 'output', 'textarea', '', '', '', '', '', 8, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'auth', 'char', '30', 'auth', 'input', '', '', '', '', '', 9, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'path', 'varchar', '255', 'path', 'input', '', '', '0', '', '', 10, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'grade', 'tinyint', '3', 'grade', 'integer', '', '', '0', '', '', 11, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'realBegan', 'date', '', '实际开始日期', 'date', '', '', '', '', '', 16, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'realEnd', 'date', '', '实际完成日期', 'date', '', '', '', '', '', 17, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'version', 'smallint', '6', 'version', 'integer', '', '', '', '', '', 22, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'parentVersion', 'smallint', '6', 'parentVersion', 'integer', '', '', '', '', '', 23, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'planDuration', 'int', '11', 'planDuration', 'integer', '', '', '', '', '', 24, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'realDuration', 'int', '11', 'realDuration', 'integer', '', '', '', '', '', 25, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'openedVersion', 'varchar', '20', 'openedVersion', 'input', '', '', '', '', '', 28, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'lastEditedBy', 'varchar', '30', 'lastEditedBy', 'select', '', 'user', '', '', '', 29, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'lastEditedDate', 'datetime', '', 'lastEditedDate', 'datetime', '', '', '', '', '', 30, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'suspendedDate', 'date', '', 'suspendedDate', 'date', '', '', '', '', '', 35, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'vision', 'varchar', '10', 'vision', 'input', '', '', 'rnd', '', '', 44, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'displayCards', 'enum', '', 'displayCards', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 45, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'fluidBoard', 'enum', '', 'fluidBoard', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 46, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'output', 'text', '', 'output', 'textarea', '', '', '', '', '', 9, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'auth', 'char', '30', 'auth', 'input', '', '', '', '', '', 10, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'path', 'varchar', '255', 'path', 'input', '', '', '0', '', '', 12, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'grade', 'tinyint', '3', 'grade', 'integer', '', '', '0', '', '', 13, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'realBegan', 'date', '', 'realBegan', 'date', '', '', '', '', '', 17, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'realEnd', 'date', '', 'realEnd', 'date', '', '', '', '', '', 18, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'version', 'smallint', '6', 'version', 'integer', '', '', '', '', '', 23, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'parentVersion', 'smallint', '6', 'parentVersion', 'integer', '', '', '', '', '', 24, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'planDuration', 'int', '11', 'planDuration', 'integer', '', '', '', '', '', 25, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'realDuration', 'int', '11', 'realDuration', 'integer', '', '', '', '', '', 26, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'openedVersion', 'varchar', '20', 'openedVersion', 'input', '', '', '', '', '', 29, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'lastEditedBy', 'varchar', '30', 'lastEditedBy', 'select', '', 'user', '', '', '', 30, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'lastEditedDate', 'datetime', '', 'lastEditedDate', 'datetime', '', '', '', '', '', 31, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'suspendedDate', 'date', '', 'suspendedDate', 'date', '', '', '', '', '', 36, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'vision', 'varchar', '10', 'vision', 'input', '', '', 'rnd', '', '', 45, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'displayCards', 'enum', '', 'displayCards', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 46, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'fluidBoard', 'enum', '', 'fluidBoard', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 47, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'lifetime', 'char', '30', '项目周期', 'input', '', '', '', '', '', 4, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'attribute', 'varchar', '30', '阶段类型', 'input', '', '', '0', '', '', 7, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'percent', 'float', '', '工作量占比', 'input', '', '', '0', '', '', 8, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'milestone', 'enum', '', '里程碑', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 9, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'output', 'text', '', '输出', 'textarea', '', '', '', '', '', 10, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'auth', 'char', '30', '权限控制', 'input', '', '', '', '', '', 11, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'path', 'varchar', '255', '路径', 'input', '', '', '0', '', '', 13, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'grade', 'tinyint', '3', '层级', 'integer', '', '', '0', '', '', 14, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'realBegan', 'date', '', '实际开始日期', 'date', '', '', '', '', '', 18, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'realEnd', 'date', '', '实际完成日期', 'date', '', '', '', '', '', 19, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'version', 'smallint', '6', '版本', 'integer', '', '', '', '', '', 24, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'parentVersion', 'smallint', '6', '父版本', 'integer', '', '', '', '', '', 25, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'planDuration', 'int', '11', '计划周期天数', 'integer', '', '', '', '', '', 26, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'realDuration', 'int', '11', '实际周期天数', 'integer', '', '', '', '', '', 27, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'openedVersion', 'varchar', '20', '创建版本', 'input', '', '', '', '', '', 30, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'lastEditedBy', 'varchar', '30', '最后编辑人', 'select', '', 'user', '', '', '', 31, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'lastEditedDate', 'datetime', '', '最后编辑日期', 'datetime', '', '', '', '', '', 32, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'suspendedDate', 'date', '', 'suspendedDate', 'date', '', '', '', '', '', 37, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'vision', 'varchar', '10', 'vision', 'input', '', '', 'rnd', '', '', 46, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'displayCards', 'enum', '', 'displayCards', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 47, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'fluidBoard', 'enum', '', 'fluidBoard', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 48, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('bug', 'hardware', 'varchar', '30', '硬件', 'input', '', '', '', '', '', 20, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('bug', 'feedbackBy', 'varchar', '100', '反馈者', 'input', '', '', '', '', '', 28, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('bug', 'notifyEmail', 'varchar', '100', '通知邮箱', 'input', '', '', '', '', '', 29, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('bug', 'result', 'mediumint', '8', '结果', 'input', '', '', '', '', '', 47, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('bug', 'repo', 'mediumint', '8', '所属版本库', 'input', '', '', '', '', '', 48, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('bug', 'mr', 'mediumint', '8', 'mr', 'input', '', '', '', '', '', 49, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('bug', 'entry', 'text', '', 'entry', 'input', '', '', '', '', '', 50, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('bug', 'lines', 'varchar', '10', '代码行', 'input', '', '', '', '', '', 51, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('bug', 'v1', 'varchar', '40', '版本1', 'input', '', '', '', '', '', 52, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('bug', 'v2', 'varchar', '40', '版本2', 'input', '', '', '', '', '', 53, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('bug', 'repoType', 'varchar', '30', '版本库类型', 'input', '', '', '', '', '', 54, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('bug', 'issueKey', 'varchar', '50', 'issueKey', 'input', '', '', '', '', '', 55, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'version', 'smallint', '6', '版本', 'integer', '', '', '', '', '', 21, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'planDuration', 'int', '11', '计划持续天数', 'integer', '', '', '', '', '', 35, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'realDuration', 'int', '11', '实际持续天数', 'integer', '', '', '', '', '', 36, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'activatedDate', 'datetime', '', '激活日期', 'datetime', '', '', '', '', '', 40, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('task', 'repo', 'mediumint', '8', 'repo', 'input', '', '', '', '', '', 41, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('task', 'mr', 'mediumint', '8', 'mr', 'input', '', '', '', '', '', 42, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('task', 'entry', 'text', '', 'entry', 'input', '', '', '', '', '', 43, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('task', 'lines', 'varchar', '10', 'lines', 'input', '', '', '', '', '', 44, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('task', 'v1', 'varchar', '40', 'v1', 'input', '', '', '', '', '', 45, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('task', 'v2', 'varchar', '40', 'v2', 'input', '', '', '', '', '', 46, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('task', 'repo', 'mediumint', '8', '所属版本库', 'input', '', '', '', '', '', 41, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('task', 'mr', 'mediumint', '8', '合并请求', 'input', '', '', '', '', '', 42, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('task', 'entry', 'text', '', '代码路径', 'input', '', '', '', '', '', 43, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('task', 'lines', 'varchar', '10', '代码行', 'input', '', '', '', '', '', 44, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('task', 'v1', 'varchar', '40', '版本1', 'input', '', '', '', '', '', 45, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('task', 'v2', 'varchar', '40', '版本2', 'input', '', '', '', '', '', 46, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'closedReason', 'varchar', '30', '关闭原因', 'select', '', 49, '', '', '', 37, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('task', 'vision', 'varchar', '10', 'vision', 'input', '', '', '', '', '', 47, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('task', 'vision', 'varchar', '10', '界面', 'input', '', '', '', '', '', 47, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('feedback', 'type', 'char', '30', '反馈类型', 'select', '', '', '', '', '', 4, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('feedback', 'notifyEmail', 'varchar', '100', '通知邮箱', 'input', '', '', '', '', '', 9, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('feedback', 'faq', 'mediumint', '8', 'FAQ', 'input', '', '', '', '', '', 11, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), @@ -310,7 +307,7 @@ REPLACE INTO `zt_workflowfield` (`module`, `field`, `type`, `length`, `name`, `c ('testcase', 'fromCaseVersion', 'char', '30', '用例来源版本', 'input', '', '', '', '', '', 5, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('testcase', 'precondition', 'text', '', '前置条件', 'textarea', '', '', '', '', '', 5, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('testcase', 'subStatus', 'varchar', '30', '子状态', 'select', '', '', '', '', '', 17, 0, 0, '0', '0', '0', '0', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('testsuite', 'type', 'text', '', '类型', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '', '', '', 17, 0, 0, '0', '0', '0', '0', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'); +('testsuite', 'type', 'text', '', '类型', 'radio', '', '50', '', '', '', 5, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'); UPDATE `zt_workflowfield` SET `control` = 'radio' WHERE `module` = 'program' and `field` = 'deleted'; UPDATE `zt_workflowfield` SET `type` = 'char', `length` = '30', `control` = 'radio' WHERE `module` = 'program' and `field` = 'type'; @@ -326,26 +323,6 @@ UPDATE `zt_workflowfield` SET `type` = 'char', `length` = '30', `control`='radio UPDATE `zt_workflowfield` SET `control`='radio' WHERE `module` = 'product' and `field` = 'acl'; UPDATE `zt_workflowfield` SET `control` = 'multi-select', `options` = 'user' WHERE `module` = 'program' and `field` = 'whitelist'; -REPLACE INTO `zt_workflowfield` (`module`, `field`, `type`, `length`, `name`, `control`, `expression`, `options`, `default`, `rules`, `placeholder`, `order`, `searchOrder`, `exportOrder`, `canExport`, `canSearch`, `isValue`, `readonly`, `buildin`, `desc`, `createdBy`, `createdDate`, `editedBy`, `editedDate`) VALUES -('program', 'lifetime', 'char', '30', '项目周期', 'input', '', '', '', '', '', 29, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'output', 'text', '', '输出', 'textarea', '', '', '', '', '', 30, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'auth', 'char', '30', '权限控制', 'input', '', '', '', '', '', 31, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'path', 'varchar', '255', '路径', 'input', '', '', '', '', '', 32, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'grade', 'tinyint', '3', '层级', 'integer', '', '', '', '', '', 33, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'realBegan', 'date', '', '实际开始日期', 'date', '', '', '', '', '', 34, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'realEnd', 'date', '', '实际完成日期', 'date', '', '', '', '', '', 35, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'version', 'smallint', '6', '版本', 'integer', '', '', '', '', '', 36, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'parentVersion', 'smallint', '6', '父版本', 'integer', '', '', '', '', '', 37, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'planDuration', 'smallint', '6', '计划周期天数', 'integer', '', '', '', '', '', 38, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'realDuration', 'smallint', '6', '实际周期天数', 'integer', '', '', '', '', '', 39, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'openedVersion', 'smallint', '6', '创建版本', 'integer', '', '', '', '', '', 40, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'lastEditedBy', 'varchar', '30', '最后编辑人', 'select', '', 'user', '', '', '', 41, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'lastEditedDate', 'datetime', '', '最后编辑日期', 'datetime', '', '', '', '', '', 42, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'suspendedDate', 'date', '', 'suspendedDate', 'date', '', '', '', '', '', 43, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'vision', 'varchar', '10', 'vision', 'input', '', '', 'rnd', '', '', 44, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'displayCards', 'enum', '', 'displayCards', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 45, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'fluidBoard', 'enum', '', 'fluidBoard', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 46, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'); - UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='projectModel' LIMIT 1) WHERE `module`='project' AND `field`='model'; UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='feedbackType' LIMIT 1) WHERE `module`='feedback' AND `field`='type'; UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='feedbackSolution' LIMIT 1) WHERE `module`='feedback' AND `field`='solution'; @@ -355,6 +332,7 @@ UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='programs' LIMIT 1), `control`='select' WHERE `module`='project' AND `field`='parent'; UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='projects' LIMIT 1), `control`='select' WHERE `module`='execution' AND `field`='parent'; UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='feedbackclosedReason' LIMIT 1), `control`='select' WHERE `module`='feedback' AND `field`='closedReason'; +UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='testsuiteAuth' LIMIT 1) WHERE `module`='testsuite' AND `field`='type'; UPDATE `zt_workflowaction` SET `show`='direct' WHERE `buildin`=1; UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'product' and `action` = 'all' and `vision` = 'rnd'; diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index f3d04c398b..6771dcc9c6 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -75,6 +75,7 @@ $lang->execution->QD = 'Test Manager'; $lang->execution->RD = 'Release Manager'; $lang->execution->release = 'Release'; $lang->execution->acl = 'Access Control'; +$lang->execution->auth = 'Privileges'; $lang->execution->teamname = 'Team Name'; $lang->execution->updateOrder = 'Rank'; $lang->execution->order = "Rank {$lang->executionCommon}"; diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index 94038c5060..f4e1e98691 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -75,6 +75,7 @@ $lang->execution->QD = '测试负责人'; $lang->execution->RD = '发布负责人'; $lang->execution->release = '发布'; $lang->execution->acl = '访问控制'; +$lang->execution->auth = '权限控制'; $lang->execution->teamname = '团队名称'; $lang->execution->updateOrder = '排序'; $lang->execution->order = $lang->executionCommon . '排序'; From d3dc4ebe430c97912c53a97afd0893ba7489e1c6 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Tue, 17 May 2022 06:00:26 +0000 Subject: [PATCH 08/92] * Fix bug. --- framework/model.class.php | 2 +- module/bug/control.php | 3 ++- module/build/control.php | 9 ++++++--- module/caselib/control.php | 6 ++++-- module/execution/control.php | 10 +++++++--- module/product/control.php | 9 ++++++--- module/productplan/control.php | 10 +++++++--- module/project/control.php | 12 +++++++++--- module/projectrelease/control.php | 12 +++++++++--- module/release/control.php | 11 ++++++++--- module/story/control.php | 3 ++- module/task/control.php | 3 ++- module/testcase/control.php | 6 ++++-- module/testsuite/control.php | 9 ++++++--- module/testtask/control.php | 22 +++++++++++++++------- 15 files changed, 88 insertions(+), 39 deletions(-) diff --git a/framework/model.class.php b/framework/model.class.php index 71eddbd925..c62d23a153 100644 --- a/framework/model.class.php +++ b/framework/model.class.php @@ -293,6 +293,6 @@ class model extends baseModel } $flow = $this->loadModel('workflow')->getByModule($moduleName); - if($flow && $action) $this->loadModel('workflowhook')->execute($flow, $action, $objectID); + if($flow && $action) return $this->loadModel('workflowhook')->execute($flow, $action, $objectID); } } diff --git a/module/bug/control.php b/module/bug/control.php index 673201721f..d02f8cc38d 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -397,7 +397,8 @@ class bug extends control $this->action->create('todo', $output['todoID'], 'finished', '', "BUG:$bugID"); } - $this->executeHooks($bugID); + $message = $this->executeHooks($bugID); + if($message) $this->lang->saveSuccess = $message; /* Return bug id when call the API. */ if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $bugID)); diff --git a/module/build/control.php b/module/build/control.php index b918fdf58e..1105dc34a3 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -38,7 +38,8 @@ class build extends control if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); $this->loadModel('action')->create('build', $buildID, 'opened'); - $this->executeHooks($buildID); + $message = $this->executeHooks($buildID); + if($message) $this->lang->saveSuccess = $message; if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $buildID)); if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => "parent.loadExecutionBuilds($executionID, $buildID)")); // Code for task #5126. @@ -130,7 +131,8 @@ class build extends control if(!empty($changes)) $this->action->logHistory($actionID, $changes); } - $this->executeHooks($buildID); + $message = $this->executeHooks($buildID); + if($message) $this->lang->saveSuccess = $message; return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "buildID=$buildID"))); } @@ -316,7 +318,8 @@ class build extends control $build = $this->build->getById($buildID); $this->build->delete(TABLE_BUILD, $buildID); - $this->executeHooks($buildID); + $message = $this->executeHooks($buildID); + if($message) $response['message'] = $message; /* if ajax request, send result. */ if($this->server->ajax) diff --git a/module/caselib/control.php b/module/caselib/control.php index 586b756ccb..dc8d4b19cc 100644 --- a/module/caselib/control.php +++ b/module/caselib/control.php @@ -92,7 +92,8 @@ class caselib extends control $this->action->logHistory($actionID, $changes); } - $this->executeHooks($libID); + $message = $this->executeHooks($libID); + if($message) $response['message'] = $message; $response['locate'] = inlink('view', "libID=$libID"); return $this->send($response); @@ -130,7 +131,8 @@ class caselib extends control { $this->caselib->delete($libID); - $this->executeHooks($libID); + $message = $this->executeHooks($libID); + if($message) $response['message'] = $message; /* if ajax request, send result. */ if($this->server->ajax) diff --git a/module/execution/control.php b/module/execution/control.php index d7811ba665..931dae318e 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1379,7 +1379,8 @@ class execution extends control $this->loadModel('action')->create($this->objectType, $executionID, 'opened', '', join(',', $_POST['products'])); - $this->executeHooks($executionID); + $message = $this->executeHooks($executionID); + if($message) $this->lang->saveSuccess = $message; if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $executionID)); @@ -1553,7 +1554,9 @@ class execution extends control $this->productplan->linkProject($projectID, $newPlans); } - $this->executeHooks($executionID); + $message = $this->executeHooks($executionID); + if($message) $this->lang->saveSuccess = $message; + if($_POST['status'] == 'doing') $this->loadModel('common')->syncPPEStatus($executionID); if($execution->type == 'kanban') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent')); return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "executionID=$executionID"))); @@ -2549,7 +2552,8 @@ class execution extends control $this->execution->updateUserView($executionID); $this->session->set('execution', ''); - $this->executeHooks($executionID); + $message = $this->executeHooks($executionID); + if($message) $this->lang->saveSuccess = $message; if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess)); return print(js::reload('parent')); diff --git a/module/product/control.php b/module/product/control.php index 401edefb9b..bd126a5de8 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -364,7 +364,8 @@ class product extends control if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); $this->loadModel('action')->create('product', $productID, 'opened'); - $this->executeHooks($productID); + $message = $this->executeHooks($productID); + if($message) $this->lang->saveSuccess = $message; if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $productID)); $tab = $this->app->tab; @@ -518,7 +519,8 @@ class product extends control $this->action->logHistory($actionID, $changes); } - $this->executeHooks($productID); + $message = $this->executeHooks($productID); + if($message) $this->lang->saveSuccess = $message; $moduleName = $programID ? 'program' : 'product'; $methodName = $programID ? 'product' : 'view'; @@ -778,7 +780,8 @@ class product extends control $this->product->delete(TABLE_PRODUCT, $productID); $this->dao->update(TABLE_DOCLIB)->set('deleted')->eq(1)->where('product')->eq($productID)->exec(); $this->session->set('product', ''); - $this->executeHooks($productID); + $message = $this->executeHooks($productID); + if($message) $this->lang->saveSuccess = $message; if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess)); return print(js::locate($this->createLink('product', 'all'), 'parent')); diff --git a/module/productplan/control.php b/module/productplan/control.php index aaa4f4238b..41654bb9a1 100644 --- a/module/productplan/control.php +++ b/module/productplan/control.php @@ -64,7 +64,8 @@ class productplan extends control if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); $this->loadModel('action')->create('productplan', $planID, 'opened'); - $this->executeHooks($planID); + $message = $this->executeHooks($planID); + if($message) $this->lang->saveSuccess = $message; if($parent > 0) $this->productplan->updateParentStatus($parent); if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); @@ -132,7 +133,8 @@ class productplan extends control $actionID = $this->loadModel('action')->create('productplan', $planID, 'edited'); $this->action->logHistory($actionID, $changes); } - $this->executeHooks($planID); + $message = $this->executeHooks($planID); + if($message) $this->lang->saveSuccess = $message; return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "planID=$planID"))); } @@ -246,7 +248,8 @@ class productplan extends control { $this->productplan->delete(TABLE_PRODUCTPLAN, $planID); if($plan->parent > 0) $this->productplan->changeParentField($planID); - $this->executeHooks($planID); + $message = $this->executeHooks($planID); + if($message) $this->lang->saveSuccess = $message; /* if ajax request, send result. */ if($this->server->ajax) @@ -401,6 +404,7 @@ class productplan extends control $planStories = $this->story->getPlanStories($planID, 'all', $type == 'story' ? $sort : 'id_desc', $storyPager); $this->executeHooks($planID); + if($plan->parent > 0) $this->view->parentPlan = $this->productplan->getById($plan->parent); if($plan->parent == '-1') $this->view->childrenPlans = $this->productplan->getChildren($plan->id); diff --git a/module/project/control.php b/module/project/control.php index bb048bcf56..192d536883 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -429,7 +429,9 @@ class project extends control } } - $this->executeHooks($projectID); + $message = $this->executeHooks($projectID); + if($message) $this->lang->saveSuccess = $message; + if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $projectID)); if($this->app->tab == 'program') @@ -588,7 +590,9 @@ class project extends control $this->loadModel('productplan')->linkProject($projectID, $newPlans); } - $this->executeHooks($projectID); + $message = $this->executeHooks($projectID); + if($message) $this->lang->saveSuccess = $message; + if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent')); $locateLink = ($this->session->projectList and $from != 'view') ? $this->session->projectList : inLink('view', "projectID=$projectID"); @@ -1726,7 +1730,9 @@ class project extends control $url = $this->createLink('project', 'browse'); if($this->app->tab == 'program') $url = $this->createLink('program', 'browse'); - $this->executeHooks($projectID); + $message = $this->executeHooks($projectID); + if($message) $this->lang->saveSuccess = $message; + if(empty($executionIdList)) { if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess)); diff --git a/module/projectrelease/control.php b/module/projectrelease/control.php index 63eefdf16a..eb2ffe6ede 100644 --- a/module/projectrelease/control.php +++ b/module/projectrelease/control.php @@ -109,7 +109,9 @@ class projectrelease extends control if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); $this->loadModel('action')->create('release', $releaseID, 'opened'); - $this->executeHooks($releaseID); + $message = $this->executeHooks($releaseID); + if($message) $this->lang->saveSuccess = $message; + if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $releaseID)); return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "releaseID=$releaseID"))); @@ -161,7 +163,10 @@ class projectrelease extends control $actionID = $this->loadModel('action')->create('release', $releaseID, 'Edited', $fileAction); if(!empty($changes)) $this->action->logHistory($actionID, $changes); } - $this->executeHooks($releaseID); + + $message = $this->executeHooks($releaseID); + if($message) $this->lang->saveSuccess = $message; + return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "releaseID=$releaseID"))); } @@ -328,7 +333,8 @@ class projectrelease extends control $build = $this->dao->select('*')->from(TABLE_BUILD)->where('id')->eq((int)$release->build)->fetch(); if(empty($build->execution)) $this->loadModel('build')->delete(TABLE_BUILD, $build->id); - $this->executeHooks($releaseID); + $message = $this->executeHooks($releaseID); + if($message) $response['message'] = $message; /* if ajax request, send result. */ if($this->server->ajax) diff --git a/module/release/control.php b/module/release/control.php index 4f167c7fa7..105f01bf84 100644 --- a/module/release/control.php +++ b/module/release/control.php @@ -72,7 +72,8 @@ class release extends control if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); $this->loadModel('action')->create('release', $releaseID, 'opened'); - $this->executeHooks($releaseID); + $message = $this->executeHooks($releaseID); + if($message) $this->lang->saveSuccess = $message; if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $releaseID)); if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => "parent.loadProductBuilds($productID)")); @@ -126,7 +127,10 @@ class release extends control $actionID = $this->loadModel('action')->create('release', $releaseID, 'Edited', $fileAction); if(!empty($changes)) $this->action->logHistory($actionID, $changes); } - $this->executeHooks($releaseID); + + $message = $this->executeHooks($releaseID); + if($message) $this->lang->saveSuccess = $message; + return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "releaseID=$releaseID"))); } $this->loadModel('story'); @@ -285,7 +289,8 @@ class release extends control $build = $this->dao->select('*')->from(TABLE_BUILD)->where('id')->eq((int)$release->build)->fetch(); if(empty($build->execution)) $this->loadModel('build')->delete(TABLE_BUILD, $build->id); - $this->executeHooks($releaseID); + $message = $this->executeHooks($releaseID); + if($message) $response['message'] = $message; /* if ajax request, send result. */ if($this->server->ajax) diff --git a/module/story/control.php b/module/story/control.php index 1fb8b8e976..f5fa0cdcf3 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -178,7 +178,8 @@ class story extends control $this->action->create('todo', $todoID, 'finished', '', "STORY:$storyID"); } - $this->executeHooks($storyID); + $message = $this->executeHooks($storyID); + if($message) $this->lang->saveSuccess = $message; if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $storyID)); diff --git a/module/task/control.php b/module/task/control.php index d9d0637b80..8043ecc732 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -162,7 +162,8 @@ class task extends control $this->action->create('todo', $todoID, 'finished', '', "TASK:$taskID"); } - $this->executeHooks($taskID); + $message = $this->executeHooks($taskID); + if($message) $this->lang->saveSuccess = $message; /* Return task id when call the API. */ if($this->viewType == 'json' or (defined('RUN_MODE') && RUN_MODE == 'api')) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $taskID)); diff --git a/module/testcase/control.php b/module/testcase/control.php index 2071f20d2e..98d478bc86 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -343,7 +343,8 @@ class testcase extends control /* If the story is linked project, make the case link the project. */ $this->testcase->syncCase2Project($caseResult['caseInfo'], $caseID); - $this->executeHooks($caseID); + $message = $this->executeHooks($caseID); + if($message) $this->lang->saveSuccess = $message; if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $caseID)); /* If link from no head then reload. */ @@ -1173,7 +1174,8 @@ class testcase extends control $case = $this->testcase->getById($caseID); $this->testcase->delete(TABLE_CASE, $caseID); - $this->executeHooks($caseID); + $message = $this->executeHooks($caseID); + if($message) $response['message'] = $message; /* if ajax request, send result. */ if($this->server->ajax) diff --git a/module/testsuite/control.php b/module/testsuite/control.php index 037d25161c..d27e771410 100644 --- a/module/testsuite/control.php +++ b/module/testsuite/control.php @@ -118,7 +118,8 @@ class testsuite extends control } $actionID = $this->loadModel('action')->create('testsuite', $suiteID, 'opened'); - $this->executeHooks($suiteID); + $message = $this->executeHooks($suiteID); + if($message) $response['message'] = $message; if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $suiteID)); @@ -221,7 +222,8 @@ class testsuite extends control $this->action->logHistory($actionID, $changes); } - $this->executeHooks($suiteID); + $messgae = $this->executeHooks($suiteID); + if($message) $response['message'] = $message; $response['locate'] = inlink('view', "suiteID=$suiteID"); return $this->send($response); @@ -263,7 +265,8 @@ class testsuite extends control $this->testsuite->delete($suiteID); - $this->executeHooks($suiteID); + $message = $this->executeHooks($suiteID); + if($message) $response['message'] = $message; /* if ajax request, send result. */ if($this->server->ajax) diff --git a/module/testtask/control.php b/module/testtask/control.php index 13b8418a7e..d295f3639d 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -217,7 +217,9 @@ class testtask extends control if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); $this->loadModel('action')->create('testtask', $taskID, 'opened'); - $this->executeHooks($taskID); + $message = $this->executeHooks($taskID); + if($message) $this->lang->saveSuccess = $message; + if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $taskID)); $task = $this->dao->findById($taskID)->from(TABLE_TESTTASK)->fetch(); @@ -726,7 +728,8 @@ class testtask extends control $this->action->logHistory($actionID, $changes); } - $this->executeHooks($taskID); + $message = $this->executeHooks($taskID); + if($message) $this->lang->saveSuccess = $message; $link = isonlybody() ? 'parent' : $this->session->testtaskList; return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $link)); @@ -788,7 +791,8 @@ class testtask extends control $this->action->logHistory($actionID, $changes); } - $this->executeHooks($taskID); + $message = $this->executeHooks($taskID); + if($message) $this->lang->saveSuccess = $message; if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent')); return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('testtask', 'view', "taskID=$taskID"))); @@ -830,7 +834,8 @@ class testtask extends control $this->action->logHistory($actionID, $changes); } - $this->executeHooks($taskID); + $message = $this->executeHooks($taskID); + if($message) $this->lang->saveSuccess = $message; if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent')); return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('testtask', 'view', "taskID=$taskID"))); @@ -872,7 +877,8 @@ class testtask extends control $this->action->logHistory($actionID, $changes); } - $this->executeHooks($taskID); + $message = $this->executeHooks($taskID); + if($message) $this->lang->saveSuccess = $message; if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent.parent')); return $this->send(array('result' => 'success', 'message' => $this->lang->success, 'locate' => $this->createLink('testtask', 'view', "taskID=$taskID"))); @@ -915,7 +921,8 @@ class testtask extends control $this->action->logHistory($actionID, $changes); } - $this->executeHooks($taskID); + $message = $this->executeHooks($taskID); + if($message) $this->lang->saveSuccess = $message; if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent')); return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('testtask', 'view', "taskID=$taskID"))); @@ -956,7 +963,8 @@ class testtask extends control $task = $this->testtask->getByID($taskID); $this->testtask->delete(TABLE_TESTTASK, $taskID); - $this->executeHooks($taskID); + $message = $this->executeHooks($taskID); + if($message) $response['message'] = $message; /* if ajax request, send result. */ if($this->server->ajax) From ebd8840dbbe80518ace378cd870ca9c8ce96535c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A1=E6=A0=8B?= Date: Tue, 17 May 2022 03:03:53 +0000 Subject: [PATCH 09/92] Merge branch 'sprint/wangyuting_fixbug_22520' into 'master' * Fix bug #22520 See merge request easycorp/zentaopms!3435 (cherry picked from commit 670520548f27f180a47fb5a81a1e137c5f52aadb) faf8ee28 * Fix bug #22520 --- lib/dao/dao.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/dao/dao.class.php b/lib/dao/dao.class.php index 82d2c0f4fc..585a299654 100644 --- a/lib/dao/dao.class.php +++ b/lib/dao/dao.class.php @@ -187,7 +187,7 @@ class dao extends baseDAO */ public function checkflow() { - global $app, $config; + global $app, $config, $lang; if(!isset($config->bizVersion)) return $this; @@ -204,6 +204,9 @@ class dao extends baseDAO $rawrules = $this->dbh->query("select * from " . TABLE_WORKFLOWRULE)->fetchall(); foreach($rawrules as $rule) $rules[$rule->id] = $rule; + $table = strtolower(str_replace(array($config->db->prefix, '`'), '', $this->table)); + if(!isset($lang->$table)) $lang->$table = new stdclass(); + foreach($flowfields as $key => $field) { if(!$field) @@ -212,6 +215,8 @@ class dao extends baseDAO continue; } + $lang->$table->{$field->field} = $field->name; + $ruleids = explode(',', trim($field->rules, ',') . ',' . trim($field->layoutrules, ',')); $ruleids = array_unique($ruleids); From f5638d648118b2c38f42ec63925bd45653d16225 Mon Sep 17 00:00:00 2001 From: wangyuting2 <851424971@qq.com> Date: Tue, 17 May 2022 16:56:25 +0800 Subject: [PATCH 10/92] * Fix buildOperateMenu bug. --- module/productplan/model.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/productplan/model.php b/module/productplan/model.php index ea4fac5627..4b1a5c18c7 100644 --- a/module/productplan/model.php +++ b/module/productplan/model.php @@ -1120,6 +1120,8 @@ class productplanModel extends model if($type == 'view') { + $menu .= $this->buildFlowMenu('productplan', $plan, $type, 'direct'); + if(common::hasPriv('productplan', 'edit', $plan)) $menu .= html::a(helper::createLink('productplan', 'edit', $params), " " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->edit}'"); if($plan->parent >= 0 && common::hasPriv('productplan', 'delete', $plan)) $menu .= html::a(helper::createLink('productplan', 'delete', $params), " " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->delete}' target='hiddenwin'"); } From 415d9ed538c10281a95d6efa18afda6a245f6c87 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 17 May 2022 17:12:12 +0800 Subject: [PATCH 11/92] * adjust for merge master code. --- db/update16.5.sql | 24 ++++++++++++------------ module/bug/model.php | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/db/update16.5.sql b/db/update16.5.sql index 6367b93871..153995e284 100644 --- a/db/update16.5.sql +++ b/db/update16.5.sql @@ -96,6 +96,7 @@ REPLACE INTO `zt_workflowdatasource` (`type`, `name`, `code`, `buildin`, `dataso ('lang', '反馈处理方案', 'feedbackSolution', '1', 'feedbackSolution', '', '', ''), ('lang', '反馈关闭原因', 'feedbackclosedReason', '1', 'feedbackclosedReason', '', '', ''), ('lang', '任务关闭原因', 'taskReason', '1', 'taskReason', '', '', ''), +('lang', '套件类型', 'testsuiteAuth', '1', 'testsuiteAuth', '', '', ''), ('system', '项目集', 'programs', '1', '{\"app\":\"system\",\"module\":\"program\",\"method\":\"getPairs\",\"methodDesc\":\"Get program pairs.\",\"params\":[{\"name\":\"isQueryAll\",\"type\":\"bool\",\"desc\":\"\",\"value\":\"\"},{\"name\":\"orderBy\",\"type\":\"string\",\"desc\":\"\",\"value\":\"id_desc\"}]}', '', '', ''), ('lang', '需求关闭原因', 'storyClosedReason', '1', 'storyClosedReason', '', '', ''); @@ -306,8 +307,7 @@ REPLACE INTO `zt_workflowfield` (`module`, `field`, `type`, `length`, `name`, `c ('testcase', 'fromCaseID', 'char', '30', '用例来源ID', 'input', '', '', '', '', '', 28, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('testcase', 'fromCaseVersion', 'char', '30', '用例来源版本', 'input', '', '', '', '', '', 5, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('testcase', 'precondition', 'text', '', '前置条件', 'textarea', '', '', '', '', '', 5, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('testcase', 'subStatus', 'varchar', '30', '子状态', 'select', '', '', '', '', '', 17, 0, 0, '0', '0', '0', '0', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('testsuite', 'type', 'text', '', '类型', 'radio', '', '50', '', '', '', 5, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'); +('testcase', 'subStatus', 'varchar', '30', '子状态', 'select', '', '', '', '', '', 17, 0, 0, '0', '0', '0', '0', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'); UPDATE `zt_workflowfield` SET `control` = 'radio' WHERE `module` = 'program' and `field` = 'deleted'; UPDATE `zt_workflowfield` SET `type` = 'char', `length` = '30', `control` = 'radio' WHERE `module` = 'program' and `field` = 'type'; @@ -323,16 +323,16 @@ UPDATE `zt_workflowfield` SET `type` = 'char', `length` = '30', `control`='radio UPDATE `zt_workflowfield` SET `control`='radio' WHERE `module` = 'product' and `field` = 'acl'; UPDATE `zt_workflowfield` SET `control` = 'multi-select', `options` = 'user' WHERE `module` = 'program' and `field` = 'whitelist'; -UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='projectModel' LIMIT 1) WHERE `module`='project' AND `field`='model'; -UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='feedbackType' LIMIT 1) WHERE `module`='feedback' AND `field`='type'; -UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='feedbackSolution' LIMIT 1) WHERE `module`='feedback' AND `field`='solution'; -UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='taskReason' LIMIT 1) WHERE `module`='task' AND `field`='closedReason'; -UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='storyClosedReason' LIMIT 1) WHERE `module`='story' AND `field`='closedReason'; -UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='programs' LIMIT 1), `control`='select' WHERE `module`='program' AND `field`='parent'; -UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='programs' LIMIT 1), `control`='select' WHERE `module`='project' AND `field`='parent'; -UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='projects' LIMIT 1), `control`='select' WHERE `module`='execution' AND `field`='parent'; -UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='feedbackclosedReason' LIMIT 1), `control`='select' WHERE `module`='feedback' AND `field`='closedReason'; -UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='testsuiteAuth' LIMIT 1) WHERE `module`='testsuite' AND `field`='type'; +UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='projectModel' ORDER BY `id` DESC LIMIT 1) WHERE `module`='project' AND `field`='model'; +UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='feedbackType' ORDER BY `id` DESC LIMIT 1) WHERE `module`='feedback' AND `field`='type'; +UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='feedbackSolution' ORDER BY `id` DESC LIMIT 1) WHERE `module`='feedback' AND `field`='solution'; +UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='taskReason' ORDER BY `id` DESC LIMIT 1) WHERE `module`='task' AND `field`='closedReason'; +UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='storyClosedReason' ORDER BY `id` DESC LIMIT 1) WHERE `module`='story' AND `field`='closedReason'; +UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='programs' ORDER BY `id` DESC LIMIT 1), `control`='select' WHERE `module`='program' AND `field`='parent'; +UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='programs' ORDER BY `id` DESC LIMIT 1), `control`='select' WHERE `module`='project' AND `field`='parent'; +UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='projects' ORDER BY `id` DESC LIMIT 1), `control`='select' WHERE `module`='execution' AND `field`='parent'; +UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='feedbackclosedReason' ORDER BY `id` DESC LIMIT 1), `control`='select' WHERE `module`='feedback' AND `field`='closedReason'; +UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='testsuiteAuth' ORDER BY `id` DESC LIMIT 1), `control`='radio' WHERE `module`='testsuite' AND `field`='type'; UPDATE `zt_workflowaction` SET `show`='direct' WHERE `buildin`=1; UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'product' and `action` = 'all' and `vision` = 'rnd'; diff --git a/module/bug/model.php b/module/bug/model.php index 9ff6b81d69..0c2536da59 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -3276,7 +3276,7 @@ class bugModel extends model $menu .= $this->buildMenu('bug', 'confirmBug', $params, $bug, $type, 'ok', '', "iframe", true); if($type == 'view') $menu .= $this->buildMenu('bug', 'assignTo', $params, $bug, $type, '', '', "iframe", true); - $menu .= $this->buildMenu('bug', 'resolve', $params, $bug, $type, 'checked', '', "iframe", true); + $menu .= $this->buildMenu('bug', 'resolve', $params, $bug, $type, 'checked', '', "iframe showinonlybody", true); $menu .= $this->buildMenu('bug', 'close', $params, $bug, $type, '', '', "text-danger iframe showinonlybody", true); if($type == 'view') $menu .= $this->buildMenu('bug', 'activate', $params, $bug, $type, '', '', "text-success iframe showinonlybody", true); if($type == 'view' && $this->app->tab != 'product') From 10eebbd1365a834a3d406f8c2475cae79fc5bac2 Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Tue, 17 May 2022 17:13:17 +0800 Subject: [PATCH 12/92] * fix bug #22570 --- framework/model.class.php | 5 ++++- module/caselib/model.php | 23 ++++++++++++----------- module/release/model.php | 3 ++- module/testtask/model.php | 23 ++++++++++++----------- 4 files changed, 30 insertions(+), 24 deletions(-) diff --git a/framework/model.class.php b/framework/model.class.php index c62d23a153..4ad058725c 100644 --- a/framework/model.class.php +++ b/framework/model.class.php @@ -65,11 +65,12 @@ class model extends baseModel * @param string $target * @param string $misc * @param bool $onlyBody + * @param bool $returnHtml * @access public * @return string */ - public function buildMenu($moduleName, $methodName, $params, $data, $type = 'view', $icon = '', $target = '', $class = '', $onlyBody = false, $misc = '' , $title = '') + public function buildMenu($moduleName, $methodName, $params, $data, $type = 'view', $icon = '', $target = '', $class = '', $onlyBody = false, $misc = '' , $title = '', $returnHtml = true) { if(strpos($moduleName, '.') !== false) list($appName, $moduleName) = explode('.', $moduleName); @@ -115,6 +116,8 @@ class model extends baseModel if(method_exists($this, 'isClickable')) $enabled = $this->isClickable($data, $method, $module); } + if(!$returnHtml) return $enabled; + $html = ''; $type = $type == 'browse' ? 'list' : 'button'; $html = common::buildIconButton($module, $method, $params, $data, $type, $icon, $target, $class, $onlyBody, $misc, $title, '', $enabled); diff --git a/module/caselib/model.php b/module/caselib/model.php index bbdd5e2ee2..bbcec964b7 100644 --- a/module/caselib/model.php +++ b/module/caselib/model.php @@ -597,10 +597,10 @@ class caselibModel extends model } /** - * Build case lib menu. - * - * @param object $object - * @param string $type + * Build case lib menu. + * + * @param object $object + * @param string $type * @access public * @return string */ @@ -611,9 +611,9 @@ class caselibModel extends model } /** - * Build case lib view menu. - * - * @param object $lib + * Build case lib view menu. + * + * @param object $lib * @access public * @return string */ @@ -632,9 +632,9 @@ class caselibModel extends model } /** - * Build case lib browse menu. - * - * @param object $case + * Build case lib browse menu. + * + * @param object $case * @access public * @return string */ @@ -648,7 +648,8 @@ class caselibModel extends model $menu .= $this->buildMenu('testcase', 'review', $params, $case, 'browse', 'glasses', '', 'iframe'); } $menu .= $this->buildMenu('testcase', 'edit', $params, $case, 'browse'); - if(common::hasPriv('testcase', 'delete')) + $deleteIconEnabled = $this->buildMenu('testcase', 'delete', $params, $case, 'browse', '', '', '', '', '', '', false); + if(common::hasPriv('testcase', 'delete') && $deleteIconEnabled) { $deleteURL = helper::createLink('testcase', 'delete', "$params&confirm=yes"); $menu .= html::a("javascript:ajaxDelete(\"$deleteURL\", \"caseList\", confirmDelete)", '', '', "title='{$this->lang->testcase->delete}' class='btn'"); diff --git a/module/release/model.php b/module/release/model.php index 1253044b8d..dec9366568 100644 --- a/module/release/model.php +++ b/module/release/model.php @@ -737,8 +737,9 @@ class releaseModel extends model $menu .= $this->buildMenu('release', 'changeStatus', "$params&status=$changedStatus", $release, 'browse', $release->status == 'normal' ? 'pause' : 'play', 'hiddenwin', '', '', '',$this->lang->release->changeStatusList[$changedStatus]); $menu .= $this->buildMenu('release', 'edit', "release=$release->id", $release, 'browse'); $menu .= $this->buildMenu('release', 'notify', "release=$release->id", $release, 'browse', 'bullhorn', '', 'iframe', true); + $deleteIconEnabled = $this->buildMenu('release', 'delete', "release=$release->id", $release, 'browse', '', '', '', '', '', '', false); - if(common::hasPriv('release', 'delete', $release)) + if(common::hasPriv('release', 'delete', $release) && $deleteIconEnabled) { $deleteURL = helper::createLink('release', 'delete', "releaseID=$release->id&confirm=yes"); $menu .= html::a("javascript:ajaxDelete(\"$deleteURL\", \"releaseList\", confirmDelete)", '', '', "class='btn' title='{$this->lang->release->delete}'"); diff --git a/module/testtask/model.php b/module/testtask/model.php index a216209699..bb54839c55 100644 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -2168,10 +2168,10 @@ class testtaskModel extends model } /** - * Build test task menu. - * - * @param object $task - * @param string $type + * Build test task menu. + * + * @param object $task + * @param string $type * @access public * @return string */ @@ -2182,9 +2182,9 @@ class testtaskModel extends model } /** - * Build test task view menu. - * - * @param object $task + * Build test task view menu. + * + * @param object $task * @access public * @return string */ @@ -2208,14 +2208,14 @@ class testtaskModel extends model $menu .= $this->buildMenu('testtask', 'edit', $params, $task, 'view'); $menu .= $this->buildMenu('testtask', 'delete', $params, $task, 'view', 'trash', 'hiddenwin'); - + return $menu; } /** * Build test task browse menu. - * - * @param object $task + * + * @param object $task * @access public * @return string */ @@ -2231,7 +2231,8 @@ class testtaskModel extends model $menu .= ''; $menu .= $this->buildMenu('testtask', 'view', $params, $task, 'browse', 'list-alt', '', 'iframe', true, "data-width='90%'"); $menu .= $this->buildMenu('testtask', 'edit', $params, $task, 'browse'); - if(common::hasPriv('testtask', 'delete', $task)) + $deleteIconEnabled = $this->buildMenu('testtask', 'delete', $params, $task, 'browse', '', '', '', '', '', '', false); + if(common::hasPriv('testtask', 'delete', $task) && $deleteIconEnabled) { $deleteURL = helper::createLink('testtask', 'delete', "taskID=$task->id&confirm=yes"); $menu .= html::a("javascript:ajaxDelete(\"$deleteURL\",\"taskList\",confirmDelete)", '', '', "title='{$this->lang->testtask->delete}' class='btn'"); From 244f06170054475f718f610212ac860fe36fa906 Mon Sep 17 00:00:00 2001 From: daitingting Date: Tue, 17 May 2022 09:14:29 +0000 Subject: [PATCH 13/92] * Build flow menu. --- module/productplan/model.php | 2 ++ module/story/model.php | 3 +++ 2 files changed, 5 insertions(+) diff --git a/module/productplan/model.php b/module/productplan/model.php index 4b1a5c18c7..f515ca5fce 100644 --- a/module/productplan/model.php +++ b/module/productplan/model.php @@ -1120,7 +1120,9 @@ class productplanModel extends model if($type == 'view') { + $menu .= "
"; $menu .= $this->buildFlowMenu('productplan', $plan, $type, 'direct'); + $menu .= "
"; if(common::hasPriv('productplan', 'edit', $plan)) $menu .= html::a(helper::createLink('productplan', 'edit', $params), " " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->edit}'"); if($plan->parent >= 0 && common::hasPriv('productplan', 'delete', $plan)) $menu .= html::a(helper::createLink('productplan', 'delete', $params), " " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->delete}' target='hiddenwin'"); diff --git a/module/story/model.php b/module/story/model.php index 40de139460..15f0bcb5f0 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -3843,6 +3843,9 @@ class storyModel extends model if($this->app->tab == 'execution' and strpos('draft,closed', $story->status) === false) $menu .= $this->buildMenu('task', 'create', "execution={$this->session->project}&{$params}&moduleID=$story->module", $story, $type, 'plus', '', 'showinonly body'); $menu .= "
"; + $menu .= $this->buildFlowMenu('story', $story, $type, 'direct'); + $menu .= "
"; + $menu .= $this->buildMenu('story', 'edit', $params, $story, $type); $menu .= $this->buildMenu('story', 'create', "productID=$story->product&branch=$story->branch&moduleID=$story->module&{$params}&executionID=0&bugID=0&planID=0&todoID=0&extra=&type=$story->type", $story, $type, 'copy', '', '', ' ', "data-width='1050'"); $menu .= $this->buildMenu('story', 'delete', $params, $story, 'button', 'trash', 'hiddenwin', 'showinonlybody', true); From 6e0e9d23484f7f8d9d756b84aa014acc85abef25 Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Wed, 18 May 2022 08:43:08 +0800 Subject: [PATCH 14/92] * fix bug #22570 --- framework/model.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/model.class.php b/framework/model.class.php index 4ad058725c..c1960e4f7c 100644 --- a/framework/model.class.php +++ b/framework/model.class.php @@ -63,8 +63,10 @@ class model extends baseModel * @param string $type * @param string $icon * @param string $target - * @param string $misc + * @param string $class * @param bool $onlyBody + * @param string $misc + * @param string $title * @param bool $returnHtml * @access public * @return string From af47d169380e17bed8aee486da83c8ee88391fef Mon Sep 17 00:00:00 2001 From: wangyuting2 <851424971@qq.com> Date: Wed, 18 May 2022 09:27:14 +0800 Subject: [PATCH 15/92] * Fix bug #22573. --- module/program/model.php | 87 +++++++++++++++++++++++ module/program/view/browsebylist.html.php | 49 +------------ 2 files changed, 88 insertions(+), 48 deletions(-) diff --git a/module/program/model.php b/module/program/model.php index 8978cae49f..bf6eae3ee9 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -1498,4 +1498,91 @@ class programModel extends model $this->lang->switcherMenu = $this->getSwitcher($programID); common::setMenuVars('program', $programID); } + + /** + * Build program action menu. + * + * @param object $program + * @param string $type + * @access public + * @return string + */ + public function buildOperateMenu($program, $type = 'view') + { + $menu = ''; + $params = "programID=$program->id"; + if($program->type == 'program' && strpos(",{$this->app->user->view->programs},", ",$program->id,") !== false) + { + if($program->status == 'wait' || $program->status == 'suspended') + { + $menu .= $this->buildMenu('program', 'start', $params, $program, $type, 'play', '', 'iframe', true, '', $this->lang->program->start); + } + if($program->status == 'doing') + { + $menu .= $this->buildMenu('program', 'close', $params, $program, $type, 'off', '', 'iframe', true); + } + if($program->status == 'closed') + { + $menu .= $this->buildMenu('program', 'activate', $params, $program, $type, 'magic', '', 'iframe', true); + } + if(common::hasPriv('program', 'suspend') || (common::hasPriv('program', 'close') && $program->status != 'doing') || (common::hasPriv('program', 'activate') && $program->status != 'closed')) + { + $menu .= "
"; + $menu .= ""; + $menu .= ""; + $menu .= "
"; + } + + $disabled = $program->status == 'closed' ? 'disabled' : ''; + $menu .= $this->buildMenu('program', 'edit', $params, $program, $type, 'edit'); + $menu .= $this->buildMenu('program', 'create', $params, $program, $type, 'split', '', '', '', $disabled, $this->lang->program->children); + if(common::hasPriv('program', 'delete')) + { + $menu .= $this->buildMenu('program', 'delete', $params, $program, $type, 'trash', 'hiddenwin', '', '', '', $this->lang->program->delete); + } + } + else if($program->type == 'project') + { + if($program->status == 'wait' || $program->status == 'suspended') + { + $menu .= $this->buildMenu('project', 'start', $params, $program, $type, 'play', '', 'iframe', true); + } + if($program->status == 'doing') $menu .= $this->buildMenu('project', 'close', $params, $program, $type, 'off', '', 'iframe', true); + if($program->status == 'closed') $menu .= $this->buildMenu('project', 'activate', $params, $program, $type, 'magic', '', 'iframe', true); + if(common::hasPriv('project', 'suspend') || (common::hasPriv('project', 'close') && $program->status != 'doing') || (common::hasPriv('project', 'activate') && $program->status != 'closed')) + { + $menu .= "
"; + $menu .= ""; + $menu .= ""; + $menu .= "
"; + } + $class = $program->model == 'kanban' ? 'disabled' : ''; + $menu .= $this->buildMenu('project', 'edit', $params, $program, $type, 'edit', '', 'iframe', true); + $menu .= $this->buildMenu('project', 'team', $params, $program, $type, 'group', '', $class, '', 'data-app="project"'); + $menu .= $this->buildMenu('project', 'group', $params, $program, $type, 'lock', '', $class, '', 'data-app="project"'); + if(common::hasPriv('project', 'manageProducts') || common::hasPriv('project', 'whitelist') || common::hasPriv('project', 'delete')) + { + $menu .= "
"; + $menu .= ""; + $menu .= ""; + $menu .= "
"; + } + } + return $menu; + } } diff --git a/module/program/view/browsebylist.html.php b/module/program/view/browsebylist.html.php index 39511dc8fe..4ecd66b1d6 100644 --- a/module/program/view/browsebylist.html.php +++ b/module/program/view/browsebylist.html.php @@ -85,54 +85,7 @@ " . $this->loadModel('flow')->getFieldValue($extendField, $program) . "";?> - type == 'program' and strpos(",{$app->user->view->programs},", ",$program->id,") !== false):?> - status == 'wait' || $program->status == 'suspended') common::printIcon('program', 'start', "programID=$program->id", $program, 'list', 'play', '', 'iframe', true, '', $this->lang->program->start);?> - status == 'doing') common::printIcon('program', 'close', "programID=$program->id", $program, 'list', 'off', '', 'iframe', true);?> - status == 'closed') common::printIcon('program', 'activate', "programID=$program->id", $program, 'list', 'magic', '', 'iframe', true);?> - - status != 'doing') || (common::hasPriv('program', 'activate') && $program->status != 'closed')):?> -
- - -
- - id", '', 'list', 'edit');?> - id", '', 'list', 'split', '', '', '', $program->status == 'closed' ? 'disabled' : '', $this->lang->program->children);?> - createLink("program", "delete", "programID=$program->id"), "", 'hiddenwin', "class='btn' title='{$this->lang->program->delete}'");?> - - type == 'project'):?> - status == 'wait' || $program->status == 'suspended') common::printIcon('project', 'start', "projectID=$program->id", $program, 'list', 'play', '', 'iframe', true);?> - status == 'doing') common::printIcon('project', 'close', "projectID=$program->id", $program, 'list', 'off', '', 'iframe', true);?> - status == 'closed') common::printIcon('project', 'activate', "projectID=$program->id", $program, 'list', 'magic', '', 'iframe', true);?> - status != 'doing') || (common::hasPriv('project', 'activate') && $program->status != 'closed')):?> -
- - -
- - model == 'kanban' ? 'disabled' : '';?> - id", $program, 'list', 'edit', '', 'iframe', true);?> - id", $program, 'list', 'group', '', "$class", '', 'data-app="project"');?> - id", $program, 'list', 'lock', '', "$class", '', 'data-app="project"');?> - -
- - -
- - + program->buildOperateMenu($program, 'browse');?> From 04041e6fb52285e7cc8143d62c58f169c654897b Mon Sep 17 00:00:00 2001 From: wangyuting2 <851424971@qq.com> Date: Wed, 18 May 2022 09:41:15 +0800 Subject: [PATCH 16/92] * Fix bug #22572. --- module/program/view/edit.html.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/program/view/edit.html.php b/module/program/view/edit.html.php index 190f843ffe..c9427131b6 100644 --- a/module/program/view/edit.html.php +++ b/module/program/view/edit.html.php @@ -87,6 +87,7 @@ project->realBegan;?> realBegan) ? '' : $program->realBegan, "class='form-control form-date'");?> + printExtendFields($program, 'table');?> program->desc;?> From cceff98fd52865b9cefeae09427f740737491698 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 18 May 2022 10:47:23 +0800 Subject: [PATCH 17/92] * Add id for post data. --- module/testtask/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/testtask/model.php b/module/testtask/model.php index bb54839c55..a669c12401 100644 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -735,7 +735,7 @@ class testtaskModel extends model { $oldTask = $this->dao->select("*")->from(TABLE_TESTTASK)->where('id')->eq((int)$taskID)->fetch(); $task = fixer::input('post') - ->add('id') + ->add('id', $taskID) ->stripTags($this->config->testtask->editor->edit['id'], $this->config->allowedTags) ->join('mailto', ',') ->join('type', ',') From ece897647065490df3db0199eaca51c03ef1f632 Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Wed, 18 May 2022 13:20:43 +0800 Subject: [PATCH 18/92] * fix bug #22570 --- module/caselib/model.php | 5 +++-- module/release/model.php | 5 +++-- module/testtask/model.php | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/module/caselib/model.php b/module/caselib/model.php index bbcec964b7..756192f7a4 100644 --- a/module/caselib/model.php +++ b/module/caselib/model.php @@ -649,10 +649,11 @@ class caselibModel extends model } $menu .= $this->buildMenu('testcase', 'edit', $params, $case, 'browse'); $deleteIconEnabled = $this->buildMenu('testcase', 'delete', $params, $case, 'browse', '', '', '', '', '', '', false); - if(common::hasPriv('testcase', 'delete') && $deleteIconEnabled) + if(common::hasPriv('testcase', 'delete')) { $deleteURL = helper::createLink('testcase', 'delete', "$params&confirm=yes"); - $menu .= html::a("javascript:ajaxDelete(\"$deleteURL\", \"caseList\", confirmDelete)", '', '', "title='{$this->lang->testcase->delete}' class='btn'"); + $class = $deleteIconEnabled ? 'btn disabled' : 'btn'; + $menu .= html::a("javascript:ajaxDelete(\"$deleteURL\", \"caseList\", confirmDelete)", '', '', "title='{$this->lang->testcase->delete}' class='{$class}'"); } return $menu; diff --git a/module/release/model.php b/module/release/model.php index dec9366568..5f87032a6b 100644 --- a/module/release/model.php +++ b/module/release/model.php @@ -739,10 +739,11 @@ class releaseModel extends model $menu .= $this->buildMenu('release', 'notify', "release=$release->id", $release, 'browse', 'bullhorn', '', 'iframe', true); $deleteIconEnabled = $this->buildMenu('release', 'delete', "release=$release->id", $release, 'browse', '', '', '', '', '', '', false); - if(common::hasPriv('release', 'delete', $release) && $deleteIconEnabled) + if(common::hasPriv('release', 'delete', $release)) { $deleteURL = helper::createLink('release', 'delete', "releaseID=$release->id&confirm=yes"); - $menu .= html::a("javascript:ajaxDelete(\"$deleteURL\", \"releaseList\", confirmDelete)", '', '', "class='btn' title='{$this->lang->release->delete}'"); + $class = $deleteIconEnabled ? 'btn disabled' : 'btn'; + $menu .= html::a("javascript:ajaxDelete(\"$deleteURL\", \"releaseList\", confirmDelete)", '', '', "class='{$class}' title='{$this->lang->release->delete}'"); } return $menu; diff --git a/module/testtask/model.php b/module/testtask/model.php index bb54839c55..6cc4952168 100644 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -2232,10 +2232,11 @@ class testtaskModel extends model $menu .= $this->buildMenu('testtask', 'view', $params, $task, 'browse', 'list-alt', '', 'iframe', true, "data-width='90%'"); $menu .= $this->buildMenu('testtask', 'edit', $params, $task, 'browse'); $deleteIconEnabled = $this->buildMenu('testtask', 'delete', $params, $task, 'browse', '', '', '', '', '', '', false); - if(common::hasPriv('testtask', 'delete', $task) && $deleteIconEnabled) + if(common::hasPriv('testtask', 'delete', $task)) { $deleteURL = helper::createLink('testtask', 'delete', "taskID=$task->id&confirm=yes"); - $menu .= html::a("javascript:ajaxDelete(\"$deleteURL\",\"taskList\",confirmDelete)", '', '', "title='{$this->lang->testtask->delete}' class='btn'"); + $class = $deleteIconEnabled ? 'btn disabled' : 'btn'; + $menu .= html::a("javascript:ajaxDelete(\"$deleteURL\",\"taskList\",confirmDelete)", '', '', "title='{$this->lang->testtask->delete}' class='{$class}'"); } return $menu; } From 867152e2bcd9cf1c8520349d2c0a0240648951e2 Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Wed, 18 May 2022 13:33:54 +0800 Subject: [PATCH 19/92] * fix bug #22570 --- module/caselib/model.php | 5 +++-- module/release/model.php | 5 +++-- module/testtask/model.php | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/module/caselib/model.php b/module/caselib/model.php index 756192f7a4..fe9fd3c30f 100644 --- a/module/caselib/model.php +++ b/module/caselib/model.php @@ -648,11 +648,12 @@ class caselibModel extends model $menu .= $this->buildMenu('testcase', 'review', $params, $case, 'browse', 'glasses', '', 'iframe'); } $menu .= $this->buildMenu('testcase', 'edit', $params, $case, 'browse'); - $deleteIconEnabled = $this->buildMenu('testcase', 'delete', $params, $case, 'browse', '', '', '', '', '', '', false); + $clickable = $this->buildMenu('testcase', 'delete', $params, $case, 'browse', '', '', '', '', '', '', false); if(common::hasPriv('testcase', 'delete')) { $deleteURL = helper::createLink('testcase', 'delete', "$params&confirm=yes"); - $class = $deleteIconEnabled ? 'btn disabled' : 'btn'; + $class = 'btn'; + if(!$clickable) $class .= ' disabled'; $menu .= html::a("javascript:ajaxDelete(\"$deleteURL\", \"caseList\", confirmDelete)", '', '', "title='{$this->lang->testcase->delete}' class='{$class}'"); } diff --git a/module/release/model.php b/module/release/model.php index 5f87032a6b..bc961e0975 100644 --- a/module/release/model.php +++ b/module/release/model.php @@ -737,12 +737,13 @@ class releaseModel extends model $menu .= $this->buildMenu('release', 'changeStatus', "$params&status=$changedStatus", $release, 'browse', $release->status == 'normal' ? 'pause' : 'play', 'hiddenwin', '', '', '',$this->lang->release->changeStatusList[$changedStatus]); $menu .= $this->buildMenu('release', 'edit', "release=$release->id", $release, 'browse'); $menu .= $this->buildMenu('release', 'notify', "release=$release->id", $release, 'browse', 'bullhorn', '', 'iframe', true); - $deleteIconEnabled = $this->buildMenu('release', 'delete', "release=$release->id", $release, 'browse', '', '', '', '', '', '', false); + $clickable = $this->buildMenu('release', 'delete', "release=$release->id", $release, 'browse', '', '', '', '', '', '', false); if(common::hasPriv('release', 'delete', $release)) { $deleteURL = helper::createLink('release', 'delete', "releaseID=$release->id&confirm=yes"); - $class = $deleteIconEnabled ? 'btn disabled' : 'btn'; + $class = 'btn'; + if(!$clickable) $class .= ' disabled'; $menu .= html::a("javascript:ajaxDelete(\"$deleteURL\", \"releaseList\", confirmDelete)", '', '', "class='{$class}' title='{$this->lang->release->delete}'"); } diff --git a/module/testtask/model.php b/module/testtask/model.php index 6cc4952168..59f9980726 100644 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -2231,11 +2231,12 @@ class testtaskModel extends model $menu .= ''; $menu .= $this->buildMenu('testtask', 'view', $params, $task, 'browse', 'list-alt', '', 'iframe', true, "data-width='90%'"); $menu .= $this->buildMenu('testtask', 'edit', $params, $task, 'browse'); - $deleteIconEnabled = $this->buildMenu('testtask', 'delete', $params, $task, 'browse', '', '', '', '', '', '', false); + $clickable = $this->buildMenu('testtask', 'delete', $params, $task, 'browse', '', '', '', '', '', '', false); if(common::hasPriv('testtask', 'delete', $task)) { $deleteURL = helper::createLink('testtask', 'delete', "taskID=$task->id&confirm=yes"); - $class = $deleteIconEnabled ? 'btn disabled' : 'btn'; + $class = 'btn'; + if(!$clickable) $class .= ' disabled'; $menu .= html::a("javascript:ajaxDelete(\"$deleteURL\",\"taskList\",confirmDelete)", '', '', "title='{$this->lang->testtask->delete}' class='{$class}'"); } return $menu; From bf2756a2e2fd6f03a2e2cc37d30dd1f51f91ff59 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Wed, 18 May 2022 14:18:23 +0800 Subject: [PATCH 20/92] * Add the changelog. --- doc/CHANGELOG | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 81cb0cb7c0..75fa8382c2 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -1,7 +1,52 @@ 2022-05-06 17.0.beta1 修复的bug - +11398 批量移除需求的权限无法单独设置 +17341 经典模式下研发需求分解任务时同上模块之后相关需求联动错误 +14677 产品汇总表不应该统计父需求 +16176 编辑用户密码小于系统设定也可以保存成功 +16424 项目权限控制选择重新定义不生效 +16648 项目列表中项目名称完全折叠隐藏 +17448 草稿状态需求先关闭再激活后无法进行后续操作 +17976 复制bug不能修改【所属项目】和【所属迭代】 +18756 专业研发看板中移除白名单用户后该用户还可以访问看板 +19745 需求接口参数修改 +19841 创建瀑布类型的项目,设置阶段时权限设置没有继承项目权限 +19860 富文本框里面 % 这个符号被过滤了 +20015 维护项目的基础信息字段团队成员会变化 +20043 父需求变更后无法进行评审 +20175 搜索框内输入多个id且结尾为英文逗号时有报错 +20385 提Bug弹窗切换产品或分支时点击创建版本弹窗有报错 +20591 联系人列表删除列表名称点击保存有报错 +20724 升级后执行关联需求报错 +20742 不填写用户名保存后再补充用户名登录用户没有权限 +21006 一个需求拆分为多个研发任务和测试任务且研发任务有执行开始状态后,需求状态被置为了已立项 完成的需求 +32522 回收站增加检索标签 +32387 旗舰版安装向导页面检测到数据库环境变量后跳过数据库配置页面 +32343 产品发布的日期不做限制 +31983 自定义任务必填项时增加所属模块选项 +31603 参与需求评审的每个人都可以在我的地盘待评审列表看到 +31577 专业研发看板中需求泳道需求的拖动规则 +31576 Scrum看板需求泳道的需求卡片可以进行拖动 +31551 更改燃尽图的更新逻辑 +31367 执行切换组件中瀑布项目的子阶段展现方式优化 +31365 执行切换组件中瀑布的阶段按正序排列,敏捷的执行按倒序排列 +30783 通用看板中导入的卡片可以执行更多操作 +30438 关闭执行前更新燃尽图数据 +30104 看板中的横向的滚动条采用执行看板中的全局滚动条 +29788 项目列表增加搜索功能 +29787 产品列表增加搜索功能 +29786 项目集列表增加搜索功能 +29577 产品列表增加分页功能 +29215 文档库的目录中文档和目录支持拖动排序功能 +28961 产品的发布列表增加分页功能 +28564 项目集列表页面增加分页功能 +28363 切换项目后的页面保持和切换前的页面一致 +27850 批量修改执行所属项目时提示用户该操作的影响 +25835 回收站增加搜索功能 +15599 系统登陆逻辑增加referer是否是ajax请求的判断 +15349 产品模块的维护增加历史记录 +15239 Bug搜索条件中增加按关联需求搜索字段 2022-03-24 16.5 修复的bug From 13202156b30402d82dfd16ef7fc1c5190deac04d Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 18 May 2022 15:18:40 +0800 Subject: [PATCH 21/92] * fix bug #22631. --- db/update16.5.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/db/update16.5.sql b/db/update16.5.sql index 153995e284..d5d09c8f50 100644 --- a/db/update16.5.sql +++ b/db/update16.5.sql @@ -195,6 +195,7 @@ REPLACE INTO `zt_workflowfield` (`module`, `field`, `type`, `length`, `name`, `c ('project', 'vision', 'varchar', '10', '界面', 'input', '', '', 'rnd', '', '', 46, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('project', 'displayCards', 'smallint', '6', '每列最大卡片数', 'input', '', '', '0', '', '', 44, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('project', 'fluidBoard', 'enum', '', '列宽度', 'radio', '', '[\"\\u56fa\\u5b9a\\u5217\\u5bbd\",\"\\u81ea\\u9002\\u5e94\\u5217\\u5bbd\"]', '0', '', '', 45, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'project', 'mediumint', '8', '所属项目', 'input', '', '', '', '', '', 2, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('execution', 'type', 'char', '30', '迭代类型', 'select', '', '16', 'sprint', '', '', 3, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('execution', 'begin', 'date', '', '计划开始', 'date', '', '', '', '', '', 14, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('execution', 'end', 'date', '', '计划完成', 'date', '', '', '', '', '', 15, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), From cd6698cc9b2609fc38f9fd28688dada5769613bc Mon Sep 17 00:00:00 2001 From: daitingting Date: Wed, 18 May 2022 07:38:45 +0000 Subject: [PATCH 22/92] * Add relations params for buildActionMenu. --- framework/model.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/framework/model.class.php b/framework/model.class.php index c1960e4f7c..aa59671506 100644 --- a/framework/model.class.php +++ b/framework/model.class.php @@ -144,6 +144,7 @@ class model extends baseModel if(strpos($module, '.') !== false) list($appName, $moduleName) = explode('.', $module); static $actions; + static $relations; if(empty($actions)) { $actions = $this->dao->select('*')->from(TABLE_WORKFLOWACTION) @@ -154,6 +155,7 @@ class model extends baseModel ->orderBy('order_asc') ->fetchAll(); } + if(empty($relations)) $relations = $this->dao->select('next, actions')->from(TABLE_WORKFLOWRELATION)->where('prev')->eq($moduleName)->fetchPairs(); $menu = ''; if($show) @@ -162,7 +164,7 @@ class model extends baseModel { if(strpos($action->position, $type) === false || $action->show != $show) continue; - $menu .= $this->loadModel('flow')->buildActionMenu($moduleName, $action, $data, $type); + $menu .= $this->loadModel('flow')->buildActionMenu($moduleName, $action, $data, $type, $relations); } } else @@ -172,8 +174,8 @@ class model extends baseModel { if(strpos($action->position, $type) === false) continue; - if($type == 'view' || $action->show == 'direct') $menu .= $this->loadModel('flow')->buildActionMenu($moduleName, $action, $data, $type); - if($type == 'browse' && $action->show == 'dropdownlist') $dropdownMenu .= $this->loadModel('flow')->buildActionMenu($moduleName, $action, $data, $type); + if($type == 'view' || $action->show == 'direct') $menu .= $this->loadModel('flow')->buildActionMenu($moduleName, $action, $data, $type, $relations); + if($type == 'browse' && $action->show == 'dropdownlist') $dropdownMenu .= $this->loadModel('flow')->buildActionMenu($moduleName, $action, $data, $type, $relations); } if($type == 'browse' && $dropdownMenu) From 82c4eba324c8c61ee2e73d4a9ea6e5daddda2b03 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Wed, 18 May 2022 16:36:34 +0800 Subject: [PATCH 23/92] * Fix bug #22637. --- doc/CHANGELOG | 3 --- module/doc/control.php | 6 +++++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 75fa8382c2..91a8c8f0c5 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -43,9 +43,6 @@ 28564 项目集列表页面增加分页功能 28363 切换项目后的页面保持和切换前的页面一致 27850 批量修改执行所属项目时提示用户该操作的影响 -25835 回收站增加搜索功能 -15599 系统登陆逻辑增加referer是否是ajax请求的判断 -15349 产品模块的维护增加历史记录 15239 Bug搜索条件中增加按关联需求搜索字段 2022-03-24 16.5 diff --git a/module/doc/control.php b/module/doc/control.php index a8a29389c1..5eca640446 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -154,7 +154,11 @@ class doc extends control $executions = $this->execution->getList(); /* Splice project name. */ - foreach($executions as $executionID => $execution) $executions[$executionID] = $projects[$execution->project] . '/' . $execution->name; + foreach($executions as $executionID => $execution) + { + $executionPrefix = isset($projects[$execution->project]) ? $projects[$execution->project] . '/' : ''; + $executions[$executionID] = $executionPrefix . $execution->name; + } /* Get the project that has permission to view. */ foreach($projects as $projectID => $project) if(!$this->app->user->admin and strpos(',' . $this->app->user->view->projects . ',', ',' . $projectID . ',') === false) unset($projects[$projectID]); From c1186efeda65d9768a776d0514d10ec347e6ab78 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Thu, 19 May 2022 13:07:30 +0800 Subject: [PATCH 24/92] * Add the upgrade program of max. --- module/upgrade/model.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/module/upgrade/model.php b/module/upgrade/model.php index e1017434f4..32822f819b 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -655,6 +655,9 @@ class upgradeModel extends model case 'max2_2': $this->addDefaultKanbanPri(); break; + case 'max3_0': + $this->moveResult2Node(); + break; } } From f289e08b9d07f8374cff9528f8dfd77c27e25db3 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 19 May 2022 13:32:27 +0800 Subject: [PATCH 25/92] * use buildOperateMenu method for build and projectrelease module. --- module/build/model.php | 46 +++++++++++-- module/execution/view/build.html.php | 14 +--- module/project/view/build.html.php | 18 +---- module/projectrelease/model.php | 78 ++++++++++++++++++++++ module/projectrelease/view/browse.html.php | 23 +------ module/projectrelease/view/view.html.php | 20 +----- 6 files changed, 123 insertions(+), 76 deletions(-) diff --git a/module/build/model.php b/module/build/model.php index 06a61c1dc0..e82eb202e7 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -523,20 +523,54 @@ class buildModel extends model * * @param object $build * @param string $type + * @param string $extra * @access public * @return string */ - public function buildOperateMenu($build, $type = 'view') + public function buildOperateMenu($build, $type = 'view', $extra = '') { - $canBeChanged = common::canBeChanged('build', $build); - if($build->deleted || !$canBeChanged) return ''; + $extraParams = array(); + if($extra) parse_str($extra, $extraParams); $menu = ''; $params = "buildID=$build->id"; - $menu .= $this->buildFlowMenu('build', $build, 'view', 'direct'); - $menu .= $this->buildMenu('build', 'edit', $params, $build, $type); - $menu .= $this->buildMenu('build', 'delete', $params, $build, $type, 'trash', 'hiddenwin'); + global $app; + $tab = $app->tab; + + if($type == 'browse') + { + if(common::hasPriv('build', 'linkstory') and common::hasPriv('build', 'view') and common::canBeChanged('build', $build)) + { + echo html::a(helper::createLink('build', 'view', "{$params}&type=story&link=true"), "", '', "class='btn' title='{$this->lang->build->linkStory}' data-app='{$tab}'"); + } + $executionID = $tab == 'execution' ? $extraParams['executionID'] : $build->execution; + $menu .= $this->buildMenu('testtask', 'create', "product=$build->product&execution={$executionID}&build=$build->id", $build, $type, 'bullhorn', '', '', '', "data-app='{$tab}'"); + if($tab == 'execution') + { + $this->lang->execution->bug = $this->lang->execution->viewBug; + $menu .= $this->buildMenu('execution', 'bug', "execution={$extraParams['executionID']}&productID={$extraParams['productID']}&orderBy=status&build=$build->id", $build, $type); + } + if($tab == 'project') + { + $this->lang->build->view = $this->lang->project->bug; + $menu .= $this->buildMenu('build', 'view', "buildID=$build->id&type=generatedBug", $build, $type, 'bug', '', '', '', "data-app='project'"); + } + $menu .= $this->buildMenu('build', 'edit', $params, $build, $type); + $menu .= $this->buildMenu('build', 'delete', $params, $build, $type, 'trash', 'hiddenwin'); + } + else + { + $canBeChanged = common::canBeChanged('build', $build); + if($build->deleted || !$canBeChanged) return ''; + + $menu .= $this->buildFlowMenu('build', $build, 'view', 'direct'); + + $editClickable = $this->buildMenu('build', 'edit', $params, $build, $type, '', '', '', '', '', '', false); + $deleteClickable = $this->buildMenu('build', 'delete', $params, $build, $type, '', '', '', '', '', '', false); + if(common::hasPriv('build', 'edit') and $editClickable) echo html::a(helper::createLink('build', 'edit', $params), " " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->build->edit}' data-app='{$app->tab}'"); + if(common::hasPriv('build', 'delete') and $deleteClickable) echo html::a(helper::createLink('build', 'delete', $params), " " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->build->delete}' target='hiddenwin' data-app='{$app->tab}'"); + } return $menu; } diff --git a/module/execution/view/build.html.php b/module/execution/view/build.html.php index 8f39edef65..b74accd8c1 100644 --- a/module/execution/view/build.html.php +++ b/module/execution/view/build.html.php @@ -72,19 +72,7 @@ filePath, 'http') === 0 ? html::a($build->filePath) : $build->filePath;?> date?> builder);?> - - createLink('build', 'view', "buildID=$build->id&type=story&link=true"), "", '', "class='btn' title='{$lang->build->linkStory}'"); - } - common::printIcon('testtask', 'create', "product=$build->product&execution=$execution->id&build=$build->id", $build, 'list', 'bullhorn'); - $lang->execution->bug = $lang->execution->viewBug; - common::printIcon('execution', 'bug', "execution=$execution->id&productID=$productID&orderBy=status&build=$build->id", $build, 'list'); - common::printIcon('build', 'edit', "buildID=$build->id", $build, 'list'); - common::printIcon('build', 'delete', "buildID=$build->id", $build, 'list', 'trash', 'hiddenwin'); - ?> - + build->buildOperateMenu($build, 'browse', "executionID={$execution->id}&productID={$productID}");?> diff --git a/module/project/view/build.html.php b/module/project/view/build.html.php index 78c38c3cd6..1efdd1c355 100644 --- a/module/project/view/build.html.php +++ b/module/project/view/build.html.php @@ -71,23 +71,7 @@ filePath, 'http') === 0 ? html::a($build->filePath) : $build->filePath;?> date?> builder);?> - - createLink('build', 'view', "buildID=$build->id&type=story&link=true"), "", '', "class='btn' title='{$lang->build->linkStory}' data-app='project'"); - } - common::printIcon('testtask', 'create', "product=$build->product&executionID={$build->execution}&build=$build->id&projectID=$projectID", $build, 'list', 'bullhorn', '', '', '', "data-app='project'"); - $lang->build->view = $lang->project->bug; - common::printIcon('build', 'view', "buildID=$build->id&type=generatedBug", $build, 'list', 'bug', '', '', '', "data-app='project'"); - common::printIcon('build', 'edit', "buildID=$build->id", $build, 'list'); - if(common::hasPriv('build', 'delete', $build)) - { - $deleteURL = $this->createLink('build', 'delete', "buildID=$build->id&confirm=yes"); - echo html::a("###", '', '', "onclick='ajaxDelete(\"$deleteURL\", \"buildList\", confirmDelete)' class='btn' title='{$lang->build->delete}'"); - } - ?> - + build->buildOperateMenu($build, 'browse');?> diff --git a/module/projectrelease/model.php b/module/projectrelease/model.php index c775fe6994..50287537bd 100644 --- a/module/projectrelease/model.php +++ b/module/projectrelease/model.php @@ -226,4 +226,82 @@ class projectreleaseModel extends model if($action == 'notify') return $release->bugs or $release->stories; return true; } + + /** + * Build project release action menu. + * + * @param object $release + * @param string $type + * @access public + * @return string + */ + public function buildOperateMenu($release, $type = 'view') + { + $function = 'buildOperate' . ucfirst($type) . 'Menu'; + return $this->$function($release); + } + + /** + * Build project release view action menu. + * + * @param object $release + * @access public + * @return string + */ + public function buildOperateViewMenu($release) + { + $canBeChanged = common::canBeChanged('projectrelease', $release); + if($release->deleted || !$canBeChanged || isonlybody()) return ''; + + $menu = ''; + $params = "releaseID=$release->id"; + + if(common::hasPriv('projectrelease', 'changeStatus', $release)) + { + $changedStatus = $release->status == 'normal' ? 'terminate' : 'normal'; + $menu .= html::a(inlink('changeStatus', "$params&status=$changedStatus"), ' ' . $this->lang->release->changeStatusList[$changedStatus], 'hiddenwin', "class='btn btn-link' title='{$this->lang->release->changeStatusList[$changedStatus]}'"); + } + + $menu .= "
"; + $menu .= $this->buildFlowMenu('release', $release, 'view', 'direct'); + $menu .= "
"; + + $menu .= $this->buildMenu('projectrelease', 'edit', $params, $release, 'view'); + $menu .= $this->buildMenu('projectrelease', 'delete', $params, $release, 'view', 'trash', 'hiddenwin'); + + return $menu; + } + + /** + * Build project release browse action menu. + * + * @param object $release + * @access public + * @return string + */ + public function buildOperateBrowseMenu($release) + { + $canBeChanged = common::canBeChanged('projectrelease', $release); + if(!$canBeChanged) return ''; + + $menu = ''; + $params = "releaseID=$release->id"; + $changedStatus = $release->status == 'normal' ? 'terminate' : 'normal'; + + if(common::hasPriv('projectrelease', 'linkStory')) $menu .= html::a(inlink('view', "$params&type=story&link=true"), ' ', '', "class='btn' title='{$this->lang->release->linkStory}'"); + if(common::hasPriv('projectrelease', 'linkBug')) $menu .= html::a(inlink('view', "$params&type=bug&link=true"), ' ', '', "class='btn' title='{$this->lang->release->linkBug}'"); + $menu .= $this->buildMenu('projectrelease', 'changeStatus', "$params&status=$changedStatus", $release, 'browse', $release->status == 'normal' ? 'pause' : 'play', 'hiddenwin', '', '', '',$this->lang->release->changeStatusList[$changedStatus]); + $menu .= $this->buildMenu('projectrelease', 'edit', $params, $release, 'browse'); + $menu .= $this->buildMenu('projectrelease', 'notify', $params, $release, 'browse', 'bullhorn', '', 'iframe', true); + $clickable = $this->buildMenu('projectrelease', 'delete', $params, $release, 'browse', '', '', '', '', '', '', false); + if(common::hasPriv('projectrelease', 'delete', $release)) + { + $deleteURL = helper::createLink('projectrelease', 'delete', "$params&confirm=yes"); + $class = 'btn'; + if(!$clickable) $class .= ' disabled'; + $menu .= html::a("javascript:ajaxDelete(\"$deleteURL\", \"releaseList\", confirmDelete)", '', '', "class='{$class}' title='{$this->lang->release->delete}'"); + } + + return $menu; + } } diff --git a/module/projectrelease/view/browse.html.php b/module/projectrelease/view/browse.html.php index c6c01a9eb3..d1cdf912d6 100644 --- a/module/projectrelease/view/browse.html.php +++ b/module/projectrelease/view/browse.html.php @@ -55,7 +55,6 @@ - id"), sprintf('%03d', $release->id));?> @@ -73,27 +72,7 @@ " . $this->loadModel('flow')->getFieldValue($extendField, $release) . "";?> - - id&type=story&link=true"), ' ', '', "class='btn' title='{$lang->release->linkStory}'"); - if(common::hasPriv('projectrelease', 'linkBug')) echo html::a(inlink('view', "releaseID=$release->id&type=bug&link=true"), ' ', '', "class='btn' title='{$lang->release->linkBug}'"); - if(common::hasPriv('projectrelease', 'changeStatus', $release)) - { - $changedStatus = $release->status == 'normal' ? 'terminate' : 'normal'; - echo html::a($this->createLink('projectrelease', 'changeStatus', "releaseID=$release->id&status=$changedStatus"), ' ', 'hiddenwin', "class='btn' title='{$lang->release->changeStatusList[$changedStatus]}'"); - } - common::printIcon('projectrelease', 'edit', "release=$release->id", $release, 'list'); - common::printIcon('projectrelease', 'notify', "release=$release->id", $release, 'list', 'bullhorn', '', 'iframe', true); - if(common::hasPriv('projectrelease', 'delete', $release)) - { - $deleteURL = $this->createLink('projectrelease', 'delete', "releaseID=$release->id&confirm=yes"); - echo html::a("javascript:ajaxDelete(\"$deleteURL\", \"releaseList\", confirmDelete)", '', '', "class='btn' title='{$lang->release->delete}'"); - } - } - ?> - + projectrelease->buildOperateMenu($release, 'browse');?> diff --git a/module/projectrelease/view/view.html.php b/module/projectrelease/view/view.html.php index d131315007..4f6d1ce6e1 100644 --- a/module/projectrelease/view/view.html.php +++ b/module/projectrelease/view/view.html.php @@ -29,24 +29,8 @@ -
- deleted and $canBeChanged) - { - echo $this->buildOperateMenu($release, 'view'); - - if(common::hasPriv('projectrelease', 'changeStatus', $release)) - { - $changedStatus = $release->status == 'normal' ? 'terminate' : 'normal'; - echo html::a(inlink('changeStatus', "releaseID=$release->id&status=$changedStatus"), ' ' . $lang->release->changeStatusList[$changedStatus], 'hiddenwin', "class='btn btn-link' title='{$lang->release->changeStatusList[$changedStatus]}'"); - } - if(common::hasPriv('projectrelease', 'edit')) echo html::a(inlink('edit', "releaseID=$release->id"), " " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->edit}'"); - if(common::hasPriv('projectrelease', 'delete')) echo html::a(inlink('delete', "releaseID=$release->id"), " " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->delete}' target='hiddenwin'"); - } - ?> -
+ +
projectrelease->buildOperateMenu($release, 'view');?>
From 8c4931f28755787ec97e2feff64c06f903ab706a Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 19 May 2022 13:48:08 +0800 Subject: [PATCH 26/92] * hold files. --- module/upgrade/config.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/module/upgrade/config.php b/module/upgrade/config.php index 7dc290e57a..d91d4b3bec 100644 --- a/module/upgrade/config.php +++ b/module/upgrade/config.php @@ -299,8 +299,6 @@ $config->delete['16_5_beta1'][] = 'module/project/ext/css/task/execl.css'; $config->delete['16_5_beta1'][] = 'module/project/ext/js/taskeffort/taskeffort.js'; $config->delete['16_5_beta1'][] = 'module/project/ext/js/effort/effort.js'; -$config->delete['17_0_beta1'][] = 'extension/biz/action/ext/model/class/flow.class.php'; -$config->delete['17_0_beta1'][] = 'extension/biz/action/ext/model/flow.php'; $config->delete['17_0_beta1'][] = 'extension/biz/flow/ext/control/export.php'; $config->delete['17_0_beta1'][] = 'extension/biz/flow/ext/control/exporttemplate.php'; $config->delete['17_0_beta1'][] = 'extension/biz/flow/ext/view/autoimport.html.php'; @@ -310,12 +308,9 @@ $config->delete['17_0_beta1'][] = 'extension/biz/workflowcondition/ext/view/brow $config->delete['17_0_beta1'][] = 'extension/biz/workflowhook/ext/view/browse.html.php'; $config->delete['17_0_beta1'][] = 'extension/biz/group/ext/lang/zh-cn/aflow.php'; $config->delete['17_0_beta1'][] = 'extension/biz/group/ext/lang/zh-cn/zflow.php'; -$config->delete['17_0_beta1'][] = 'extension/biz/group/ext/model/class/flow.class.php'; $config->delete['17_0_beta1'][] = 'extension/biz/group/ext/model/flow.php'; $config->delete['17_0_beta1'][] = 'extension/biz/user/ext/model/bizext.php'; $config->delete['17_0_beta1'][] = 'extension/biz/sso/ext/model/bizext.php'; -$config->delete['17_0_beta1'][] = 'extension/max/action/ext/model/class/flow.class.php'; -$config->delete['17_0_beta1'][] = 'extension/max/action/ext/model/flow.php'; $config->delete['17_0_beta1'][] = 'extension/max/flow/ext/control/export.php'; $config->delete['17_0_beta1'][] = 'extension/max/flow/ext/control/exporttemplate.php'; $config->delete['17_0_beta1'][] = 'extension/max/flow/ext/view/autoimport.html.php'; @@ -325,7 +320,6 @@ $config->delete['17_0_beta1'][] = 'extension/max/workflowcondition/ext/view/brow $config->delete['17_0_beta1'][] = 'extension/max/workflowhook/ext/view/browse.html.php'; $config->delete['17_0_beta1'][] = 'extension/max/group/ext/lang/zh-cn/aflow.php'; $config->delete['17_0_beta1'][] = 'extension/max/group/ext/lang/zh-cn/zflow.php'; -$config->delete['17_0_beta1'][] = 'extension/max/group/ext/model/class/flow.class.php'; $config->delete['17_0_beta1'][] = 'extension/max/group/ext/model/flow.php'; $config->delete['17_0_beta1'][] = 'extension/max/user/ext/model/bizext.php'; $config->delete['17_0_beta1'][] = 'extension/max/sso/ext/model/bizext.php'; From 95aa1fc331eedf4f3ab68b78dbdad20082119321 Mon Sep 17 00:00:00 2001 From: daitingting Date: Thu, 19 May 2022 06:34:06 +0000 Subject: [PATCH 27/92] * Finish task #54801. --- module/build/model.php | 27 +++++++++------------------ module/release/model.php | 4 ++-- 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/module/build/model.php b/module/build/model.php index e82eb202e7..252b711b27 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -540,22 +540,15 @@ class buildModel extends model if($type == 'browse') { - if(common::hasPriv('build', 'linkstory') and common::hasPriv('build', 'view') and common::canBeChanged('build', $build)) - { - echo html::a(helper::createLink('build', 'view', "{$params}&type=story&link=true"), "", '', "class='btn' title='{$this->lang->build->linkStory}' data-app='{$tab}'"); - } $executionID = $tab == 'execution' ? $extraParams['executionID'] : $build->execution; + + if(common::hasPriv('build', 'linkstory') and common::canBeChanged('build', $build)) $menu .= $this->buildMenu('build', 'view', "{$params}&type=story&link=true", $build, $type, 'link', '', '', '', "data-app={$tab}", $this->lang->build->linkStory); + $menu .= $this->buildMenu('testtask', 'create', "product=$build->product&execution={$executionID}&build=$build->id", $build, $type, 'bullhorn', '', '', '', "data-app='{$tab}'"); - if($tab == 'execution') - { - $this->lang->execution->bug = $this->lang->execution->viewBug; - $menu .= $this->buildMenu('execution', 'bug', "execution={$extraParams['executionID']}&productID={$extraParams['productID']}&orderBy=status&build=$build->id", $build, $type); - } - if($tab == 'project') - { - $this->lang->build->view = $this->lang->project->bug; - $menu .= $this->buildMenu('build', 'view', "buildID=$build->id&type=generatedBug", $build, $type, 'bug', '', '', '', "data-app='project'"); - } + + if($tab == 'execution') $menu .= $this->buildMenu('execution', 'bug', "execution={$extraParams['executionID']}&productID={$extraParams['productID']}&orderBy=status&build=$build->id", $build, $type, '', '', '', '', $this->lang->execution->viewBug); + if($tab == 'project') $menu .= $this->buildMenu('build', 'view', "{$params}&type=generatedBug", $build, $type, 'bug', '', '', '', "data-app='project'", $this->lang->project->bug); + $menu .= $this->buildMenu('build', 'edit', $params, $build, $type); $menu .= $this->buildMenu('build', 'delete', $params, $build, $type, 'trash', 'hiddenwin'); } @@ -566,10 +559,8 @@ class buildModel extends model $menu .= $this->buildFlowMenu('build', $build, 'view', 'direct'); - $editClickable = $this->buildMenu('build', 'edit', $params, $build, $type, '', '', '', '', '', '', false); - $deleteClickable = $this->buildMenu('build', 'delete', $params, $build, $type, '', '', '', '', '', '', false); - if(common::hasPriv('build', 'edit') and $editClickable) echo html::a(helper::createLink('build', 'edit', $params), " " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->build->edit}' data-app='{$app->tab}'"); - if(common::hasPriv('build', 'delete') and $deleteClickable) echo html::a(helper::createLink('build', 'delete', $params), " " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->build->delete}' target='hiddenwin' data-app='{$app->tab}'"); + if(common::hasPriv('build', 'edit')) echo html::a(helper::createLink('build', 'edit', $params), " " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->build->edit}' data-app='{$app->tab}'"); + if(common::hasPriv('build', 'delete')) echo html::a(helper::createLink('build', 'delete', $params), " " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->build->delete}' target='hiddenwin' data-app='{$app->tab}'"); } return $menu; diff --git a/module/release/model.php b/module/release/model.php index bc961e0975..ed3b95dcd2 100644 --- a/module/release/model.php +++ b/module/release/model.php @@ -710,8 +710,8 @@ class releaseModel extends model $menu .= $this->buildFlowMenu('release', $release, 'view', 'direct'); $menu .= "
"; - $menu .= $this->buildMenu('release', 'edit', $params, $release, 'view'); - $menu .= $this->buildMenu('release', 'delete', $params, $release, 'view', 'trash', 'hiddenwin'); + if(common::hasPriv('release', 'edit', $release)) $menu .= html::a(helper::createLink('release', 'edit', $params), " " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->edit}'"); + if(common::hasPriv('release', 'delete', $release)) $menu .= html::a(helper::createLink('release', 'delete', $params), " " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->delete}' target='hiddenwin'"); return $menu; } From 47ec417f167a4e138bca3322a42fea3abd40d107 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Thu, 19 May 2022 15:39:10 +0800 Subject: [PATCH 28/92] * Fix bug #22689. --- module/bug/model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/bug/model.php b/module/bug/model.php index 0c2536da59..5976da81ad 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -2761,6 +2761,7 @@ class bugModel extends model ->orWhere('t2.spec')->like("%$searchValue%") ->orWhere('t2.verify')->like("%$searchValue%") ->fetchPairs('id'); + if(empty($story)) $story = array(0); $bugQuery = preg_replace("/`story`[ ]+(NOT[ ]*)?LIKE[ ]+'%$searchValue%'/Ui", '`story` $1 IN (' . implode(',', $story) .')', $bugQuery); } From 331e31c91133b29108c7058018835f4905dd7e27 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Thu, 19 May 2022 15:43:38 +0800 Subject: [PATCH 29/92] * Fix bug #22672. --- module/story/config.php | 2 ++ module/story/model.php | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/module/story/config.php b/module/story/config.php index e5ef2e0ff5..b3a7816cc3 100644 --- a/module/story/config.php +++ b/module/story/config.php @@ -43,6 +43,8 @@ $config->story->list->customCreateFields = 'source,verify,pri,estimate,mail $config->story->list->customBatchCreateFields = 'plan,spec,source,verify,pri,estimate,review,keywords'; $config->story->list->customBatchEditFields = 'branch,plan,estimate,pri,assignedTo,source,stage,closedBy,closedReason,keywords'; +$config->story->list->actionsOpratedParentStory = ',edit,batchcreate,change,review,recall,'; + $config->story->custom = new stdclass(); $config->story->custom->createFields = $config->story->list->customCreateFields; $config->story->custom->batchCreateFields = 'module,plan,spec,pri,estimate,review,%s'; diff --git a/module/story/model.php b/module/story/model.php index 15f0bcb5f0..c1b1b30560 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -3741,10 +3741,11 @@ class storyModel extends model { $action = strtolower($action); - if($story->parent < 0 and $action != 'edit' and $action != 'batchcreate' and $action != 'change' and $action != 'review') return false; - global $app, $config; + if($story->parent < 0 and strpos($config->story->list->actionsOpratedParentStory, ",$action,") === false) return false; + + $story->reviewer = isset($story->reviewer) ? $story->reviewer : array(); $story->notReview = isset($story->notReview) ? $story->notReview : array(); From 4845901d399d67e915f786f7f5008337b1a25cb6 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Thu, 19 May 2022 15:52:16 +0800 Subject: [PATCH 30/92] * Delete the unsed code. --- module/story/model.php | 1 - 1 file changed, 1 deletion(-) diff --git a/module/story/model.php b/module/story/model.php index c1b1b30560..98518ae4f2 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -3745,7 +3745,6 @@ class storyModel extends model if($story->parent < 0 and strpos($config->story->list->actionsOpratedParentStory, ",$action,") === false) return false; - $story->reviewer = isset($story->reviewer) ? $story->reviewer : array(); $story->notReview = isset($story->notReview) ? $story->notReview : array(); From 6f46cbfb0c71b787f04e9b87465ab20508bfeec5 Mon Sep 17 00:00:00 2001 From: zhujinyong Date: Thu, 19 May 2022 15:52:41 +0800 Subject: [PATCH 31/92] * Add approval sql. --- db/zentao.sql | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/db/zentao.sql b/db/zentao.sql index 5125102121..b17bd48b0c 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -120,6 +120,94 @@ CREATE TABLE `zt_apistruct_spec` ( `addedDate` datetime NOT NULL, primary key (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; +-- DROP TABLE IF EXISTS `zt_approval`; +CREATE TABLE `zt_approval` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `flow` mediumint(8) NOT NULL, + `objectType` varchar(30) NOT NULL, + `objectID` mediumint(9) NOT NULL, + `nodes` mediumtext NOT NULL, + `version` mediumint(9) NOT NULL, + `status` varchar(20) NOT NULL DEFAULT 'doing', + `result` varchar(20) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` int(11) NOT NULL, + `deleted` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +-- DROP TABLE IF EXISTS `zt_approvalflow`; +CREATE TABLE `zt_approvalflow` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `code` varchar(100) NOT NULL, + `desc` mediumtext NOT NULL, + `version` mediumint(8) NOT NULL DEFAULT '1', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `type` varchar(30) NOT NULL, + `deleted` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +-- DROP TABLE IF EXISTS `zt_approvalflowobject`; +CREATE TABLE `zt_approvalflowobject` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `root` int(8) NOT NULL, + `flow` int(8) NOT NULL, + `objectType` char(30) NOT NULL, + `objectID` mediumint(9) NOT NULL, + `extra` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +-- DROP TABLE IF EXISTS `zt_approvalflowspec`; +CREATE TABLE `zt_approvalflowspec` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `flow` mediumint(8) NOT NULL, + `version` mediumint(8) NOT NULL, + `nodes` mediumtext NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +-- DROP TABLE IF EXISTS `zt_approvalnode`; +CREATE TABLE `zt_approvalnode` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `approval` mediumint(8) NOT NULL, + `type` enum('review','cc') NOT NULL, + `title` varchar(255) NOT NULL, + `account` char(30) NOT NULL, + `node` varchar(100) NOT NULL, + `reviewType` varchar(100) NOT NULL DEFAULT 'manual', + `multipleType` enum('and','or') NOT NULL DEFAULT 'and', + `prev` mediumtext NOT NULL, + `next` mediumtext NOT NULL, + `status` varchar(20) NOT NULL DEFAULT 'wait', + `result` varchar(10) NOT NULL, + `date` date NOT NULL, + `opinion` mediumtext NOT NULL, + `extra` mediumtext NOT NULL, + `reviewedBy` char(30) NOT NULL, + `reviewedDate` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +-- DROP TABLE IF EXISTS `zt_approvalobject`; +CREATE TABLE `zt_approvalobject` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `approval` int(8) NOT NULL, + `objectType` char(30) NOT NULL, + `objectID` mediumint(8) NOT NULL, + `extra` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +-- DROP TABLE IF EXISTS `zt_approvalrole`; +CREATE TABLE `zt_approvalrole` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `code` char(30) NOT NULL, + `name` varchar(255) NOT NULL, + `desc` text NOT NULL, + `users` longtext NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_block`; CREATE TABLE IF NOT EXISTS `zt_block` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -12889,6 +12977,11 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (11,'workloadbudget','unlink'), (11,'workloadbudget','view'); +REPLACE INTO `zt_approvalflow` (`id`, `name`, `code`, `desc`, `version`, `createdBy`, `createdDate`, `type`, `deleted`) VALUES +(1, '最简审批', 'simple', '', 1, 'admin', '2022-04-29 08:46:40', 'project', 0); +REPLACE INTO `zt_approvalflowspec` (`id`, `flow`, `version`, `nodes`, `createdBy`, `createdDate`) VALUES +(1, 1, 1, '[{\"type\":\"start\",\"ccs\":[]},{\"id\":\"3ewcj92p55e\",\"type\":\"approval\",\"title\":\"审批\",\"reviewType\":\"manual\",\"multiple\":\"and\",\"agentType\":\"pass\",\"reviewers\":[{\"type\":\"select\"}],\"ccs\":[]},{\"type\":\"end\",\"ccs\":[]}]', 'admin', '2022-04-29 08:46:40'); + REPLACE INTO `zt_grouppriv`(`module`, `method`,`group`) SELECT `module`, `method`, 14 from `zt_grouppriv` where `group` = 1; From e71094decc62221da5fc2e4aff3a548806e905ca Mon Sep 17 00:00:00 2001 From: zhujinyong Date: Thu, 19 May 2022 15:56:19 +0800 Subject: [PATCH 32/92] * Fix code style. --- db/zentao.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/db/zentao.sql b/db/zentao.sql index b17bd48b0c..05fdae8af7 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -12979,6 +12979,7 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES REPLACE INTO `zt_approvalflow` (`id`, `name`, `code`, `desc`, `version`, `createdBy`, `createdDate`, `type`, `deleted`) VALUES (1, '最简审批', 'simple', '', 1, 'admin', '2022-04-29 08:46:40', 'project', 0); + REPLACE INTO `zt_approvalflowspec` (`id`, `flow`, `version`, `nodes`, `createdBy`, `createdDate`) VALUES (1, 1, 1, '[{\"type\":\"start\",\"ccs\":[]},{\"id\":\"3ewcj92p55e\",\"type\":\"approval\",\"title\":\"审批\",\"reviewType\":\"manual\",\"multiple\":\"and\",\"agentType\":\"pass\",\"reviewers\":[{\"type\":\"select\"}],\"ccs\":[]},{\"type\":\"end\",\"ccs\":[]}]', 'admin', '2022-04-29 08:46:40'); From 3179fd289b6738c579eea7858f5d4b35fdb77996 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Thu, 19 May 2022 16:10:17 +0800 Subject: [PATCH 33/92] * Fix bug #22669. --- module/story/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/model.php b/module/story/model.php index 98518ae4f2..5eea4e5a18 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -3806,7 +3806,7 @@ class storyModel extends model $menu .= $this->buildMenu('story', 'recall', $params, $story, $type, 'undo', '', 'showinonlybody'); $menu .= $this->buildMenu('story', 'review', $params, $story, $type, 'search', '', 'showinonlybody'); - if(!isonlybody()) $menu .= $this->buildMenu('story', 'batchCreate', "productID=$story->product&branch=$story->branch&moduleID=$story->module&$params", $story, $type, 'split', '', 'divideStory', '', "data-toggle='modal' data-type='iframe' data-width='95%'", $this->lang->story->subdivide); + if(!isonlybody()) $menu .= $this->buildMenu('story', 'batchCreate', "productID=$story->product&branch=$story->branch&moduleID=$story->module&$params", $story, $type, 'split', '', 'divideStory', true, "data-toggle='modal' data-type='iframe' data-width='95%'", $this->lang->story->subdivide); $menu .= $this->buildMenu('story', 'assignTo', $params, $story, $type, '', '', 'iframe showinonlybody', true); $menu .= $this->buildMenu('story', 'close', $params, $story, $type, '', '', 'iframe showinonlybody', true); From 92e8a84230e648095fc33467baf3968fbe1d025d Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 19 May 2022 16:15:03 +0800 Subject: [PATCH 34/92] * adjust for edit project. --- module/project/model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/project/model.php b/module/project/model.php index 535914388f..9e18c25efa 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1344,6 +1344,7 @@ class projectModel extends model ->checkFlow() ->where('id')->eq($projectID) ->exec(); + if(dao::isError()) return false; /* Get team and language item. */ $this->loadModel('user'); From e07457cd29810305297cd1f5814738dca6b248d2 Mon Sep 17 00:00:00 2001 From: zhujinyong Date: Thu, 19 May 2022 16:28:45 +0800 Subject: [PATCH 35/92] * Update16.5. --- db/update16.5.sql | 96 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/db/update16.5.sql b/db/update16.5.sql index d5d09c8f50..72fb71bc3e 100644 --- a/db/update16.5.sql +++ b/db/update16.5.sql @@ -433,3 +433,99 @@ UPDATE `zt_workflowaction` SET `method`='browse' WHERE module='product' and `act UPDATE `zt_workflowaction` SET `type` ='single' WHERE `action`='browse' AND `type`='batch' AND `buildin`=1; UPDATE `zt_workflowlayout` SET `mobileShow`='0' WHERE `mobileShow`='1' AND `module` IN('product', 'story', 'productplan', 'release', 'project', 'task', 'build', 'bug', 'testcase', 'testtask', 'testsuite', 'caselib', 'feedback'); + +UPDATE `zt_project` SET `status` = 'doing' WHERE `type` = 'program' and `status` = 'wait' and `realBegan` != '0000-00-00' and `realBegan` != ''; + +CREATE TABLE `zt_approval` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `flow` mediumint(8) NOT NULL, + `objectType` varchar(30) NOT NULL, + `objectID` mediumint(9) NOT NULL, + `nodes` mediumtext NOT NULL, + `version` mediumint(9) NOT NULL, + `status` varchar(20) NOT NULL DEFAULT 'doing', + `result` varchar(20) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` int(11) NOT NULL, + `deleted` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE `zt_approvalflow` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `code` varchar(100) NOT NULL, + `desc` mediumtext NOT NULL, + `version` mediumint(8) NOT NULL DEFAULT '1', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `type` varchar(30) NOT NULL, + `deleted` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE `zt_approvalflowobject` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `root` int(8) NOT NULL, + `flow` int(8) NOT NULL, + `objectType` char(30) NOT NULL, + `objectID` mediumint(9) NOT NULL, + `extra` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE `zt_approvalflowspec` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `flow` mediumint(8) NOT NULL, + `version` mediumint(8) NOT NULL, + `nodes` mediumtext NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE `zt_approvalnode` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `approval` mediumint(8) NOT NULL, + `type` enum('review','cc') NOT NULL, + `title` varchar(255) NOT NULL, + `account` char(30) NOT NULL, + `node` varchar(100) NOT NULL, + `reviewType` varchar(100) NOT NULL DEFAULT 'manual', + `multipleType` enum('and','or') NOT NULL DEFAULT 'and', + `prev` mediumtext NOT NULL, + `next` mediumtext NOT NULL, + `status` varchar(20) NOT NULL DEFAULT 'wait', + `result` varchar(10) NOT NULL, + `date` date NOT NULL, + `opinion` mediumtext NOT NULL, + `extra` mediumtext NOT NULL, + `reviewedBy` char(30) NOT NULL, + `reviewedDate` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE `zt_approvalobject` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `approval` int(8) NOT NULL, + `objectType` char(30) NOT NULL, + `objectID` mediumint(8) NOT NULL, + `extra` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE `zt_approvalrole` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `code` char(30) NOT NULL, + `name` varchar(255) NOT NULL, + `desc` text NOT NULL, + `users` longtext NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +REPLACE INTO `zt_approvalflow` (`id`, `name`, `code`, `desc`, `version`, `createdBy`, `createdDate`, `type`, `deleted`) VALUES +(1, '最简审批', 'simple', '', 1, 'admin', '2022-04-29 08:46:40', 'project', 0); + +REPLACE INTO `zt_approvalflowspec` (`id`, `flow`, `version`, `nodes`, `createdBy`, `createdDate`) VALUES +(1, 1, 1, '[{\"type\":\"start\",\"ccs\":[]},{\"id\":\"3ewcj92p55e\",\"type\":\"approval\",\"title\":\"审批\",\"reviewType\":\"manual\",\"multiple\":\"and\",\"agentType\":\"pass\",\"reviewers\":[{\"type\":\"select\"}],\"ccs\":[]},{\"type\":\"end\",\"ccs\":[]}]', 'admin', '2022-04-29 08:46:40'); From 29354d4be9fa11280931be82673aa160f69bb665 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Thu, 19 May 2022 16:48:49 +0800 Subject: [PATCH 36/92] * Fix bug #22691. --- module/kanban/view/viewarchivedcard.html.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/kanban/view/viewarchivedcard.html.php b/module/kanban/view/viewarchivedcard.html.php index 1a18aed718..d0729209f8 100644 --- a/module/kanban/view/viewarchivedcard.html.php +++ b/module/kanban/view/viewarchivedcard.html.php @@ -53,6 +53,7 @@ $app->loadLang('execution'); $app->loadLang('release'); $app->loadLang('build'); $app->loadLang('productplan'); +js::set('systemMode', $this->config->systemMode); ?>
@@ -198,8 +199,9 @@ $(function() var icon = ''; if($item.children('.build').length) icon = ''; - if($item.children('.execution').length) icon = ''; if($item.children('.productplan').length) icon = ''; + if($item.children('.execution').length && systemMode == 'new') icon = ''; + if($item.children('.execution').length && systemMode == 'classic') icon = ''; if($item.children('.release').length) icon = ''; $item.children('.cardName').prepend(icon); From 496dc6d211a5a7a7284e43fded65371b61c95167 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Thu, 19 May 2022 16:59:33 +0800 Subject: [PATCH 37/92] * Code format for bug 22691. --- module/kanban/view/viewarchivedcard.html.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/kanban/view/viewarchivedcard.html.php b/module/kanban/view/viewarchivedcard.html.php index d0729209f8..ba13822b65 100644 --- a/module/kanban/view/viewarchivedcard.html.php +++ b/module/kanban/view/viewarchivedcard.html.php @@ -200,10 +200,11 @@ $(function() if($item.children('.build').length) icon = ''; if($item.children('.productplan').length) icon = ''; - if($item.children('.execution').length && systemMode == 'new') icon = ''; - if($item.children('.execution').length && systemMode == 'classic') icon = ''; if($item.children('.release').length) icon = ''; + if($item.children('.execution').length && systemMode == 'new') icon = ''; + if($item.children('.execution').length && systemMode == 'classic') icon = ''; + $item.children('.cardName').prepend(icon); }); }) From 868bc4c7e04fcbd2634f75392638bbb20a7239ff Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Thu, 19 May 2022 09:34:12 +0000 Subject: [PATCH 38/92] * Fix bug. --- db/update16.5.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/update16.5.sql b/db/update16.5.sql index 72fb71bc3e..51f42999d7 100644 --- a/db/update16.5.sql +++ b/db/update16.5.sql @@ -434,7 +434,7 @@ UPDATE `zt_workflowaction` SET `type` ='single' WHERE `action`='browse' AND `ty UPDATE `zt_workflowlayout` SET `mobileShow`='0' WHERE `mobileShow`='1' AND `module` IN('product', 'story', 'productplan', 'release', 'project', 'task', 'build', 'bug', 'testcase', 'testtask', 'testsuite', 'caselib', 'feedback'); -UPDATE `zt_project` SET `status` = 'doing' WHERE `type` = 'program' and `status` = 'wait' and `realBegan` != '0000-00-00' and `realBegan` != ''; +UPDATE `zt_project` SET `status` = 'doing' WHERE `type` = 'program' and `status` = 'wait' and `realBegan` != '0000-00-00'; CREATE TABLE `zt_approval` ( `id` mediumint(8) NOT NULL AUTO_INCREMENT, From e94adb7e51510180cbf8e003c6f4e6ba46cf83a8 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 20 May 2022 08:32:20 +0800 Subject: [PATCH 39/92] * adjust for get installed version. --- framework/base/router.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/base/router.class.php b/framework/base/router.class.php index 1a44b0585d..ddcd89acb0 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -724,7 +724,7 @@ class baseRouter */ public function getInstalledVersion() { - $version = $this->dbh->query("SELECT value FROM " . TABLE_CONFIG . " WHERE owner = 'system' AND `key` = 'version' LIMIT 1")->fetch(); + $version = $this->dbh->query("SELECT value FROM " . TABLE_CONFIG . " WHERE `owner` = 'system' AND `key` = 'version' AND `module` = 'common' AND `section` = 'global' LIMIT 1")->fetch(); $version = $version ? $version->value : '0.3.beta'; // No version, set as 0.3.beta. if($version == '3.0.stable') $version = '3.0'; // convert 3.0.stable to 3.0. return $version; From eec42b3e5733da0a0c6901c27758b46b469e452e Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 20 May 2022 09:44:43 +0800 Subject: [PATCH 40/92] * adjust for upgrade. --- module/setting/model.php | 2 +- .../model/hook/loadConfigFromDB.xuanxuan.php | 27 ++++++++++--------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/module/setting/model.php b/module/setting/model.php index 064c6f4aa2..1b28086680 100644 --- a/module/setting/model.php +++ b/module/setting/model.php @@ -77,7 +77,7 @@ class settingModel extends model $item->section = $section; $item->key = $key; $item->value = $value; - $item->vision = empty($vision) ? '' : $vision; + if(!empty($vision)) $item->vision = $vision; $this->dao->replace(TABLE_CONFIG)->data($item)->exec(); } diff --git a/xuanxuan/extension/xuan/common/ext/model/hook/loadConfigFromDB.xuanxuan.php b/xuanxuan/extension/xuan/common/ext/model/hook/loadConfigFromDB.xuanxuan.php index 6e49cb585d..0106b72dd5 100644 --- a/xuanxuan/extension/xuan/common/ext/model/hook/loadConfigFromDB.xuanxuan.php +++ b/xuanxuan/extension/xuan/common/ext/model/hook/loadConfigFromDB.xuanxuan.php @@ -1,15 +1,18 @@ loadModel('setting'); -$xxItems = $this->setting->getItems('owner=system&module=common§ion=xuanxuan'); -$xxConfig = array(); -foreach($xxItems as $xxItem) $xxConfig[$xxItem->key] = $xxItem->value; -if(empty($xxConfig['key'])) +if(defined('IN_USE') or (defined('RUN_MODE') and RUN_MODE == 'api')) { - $this->setting->setItem('system.common.xuanxuan.turnon', 0); - $this->setting->setItem('system.common.xuanxuan.key', $this->setting->computeSN()); + $this->loadModel('setting'); + $xxItems = $this->setting->getItems('owner=system&module=common§ion=xuanxuan'); + $xxConfig = array(); + foreach($xxItems as $xxItem) $xxConfig[$xxItem->key] = $xxItem->value; + if(empty($xxConfig['key'])) + { + $this->setting->setItem('system.common.xuanxuan.turnon', 0); + $this->setting->setItem('system.common.xuanxuan.key', $this->setting->computeSN()); + } + if(!isset($xxConfig['chatPort'])) $this->setting->setItem('system.common.xuanxuan.chatPort', 11444); + if(!isset($xxConfig['commonPort'])) $this->setting->setItem('system.common.xuanxuan.commonPort', 11443); + if(!isset($xxConfig['ip'])) $this->setting->setItem('system.common.xuanxuan.ip', '0.0.0.0'); + if(!isset($xxConfig['uploadFileSize'])) $this->setting->setItem('system.common.xuanxuan.uploadFileSize', 20); + if(!isset($xxConfig['https']) and !isset($xxConfig['isHttps'])) $this->setting->setItem('system.common.xuanxuan.https', 'off'); } -if(!isset($xxConfig['chatPort'])) $this->setting->setItem('system.common.xuanxuan.chatPort', 11444); -if(!isset($xxConfig['commonPort'])) $this->setting->setItem('system.common.xuanxuan.commonPort', 11443); -if(!isset($xxConfig['ip'])) $this->setting->setItem('system.common.xuanxuan.ip', '0.0.0.0'); -if(!isset($xxConfig['uploadFileSize'])) $this->setting->setItem('system.common.xuanxuan.uploadFileSize', 20); -if(!isset($xxConfig['https']) and !isset($xxConfig['isHttps'])) $this->setting->setItem('system.common.xuanxuan.https', 'off'); From a8531b8e585c550015860d9bc869dde2d757a30c Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 20 May 2022 10:40:45 +0800 Subject: [PATCH 41/92] * fix bug. --- framework/base/router.class.php | 14 ++++++++++++++ module/custom/model.php | 1 + 2 files changed, 15 insertions(+) diff --git a/framework/base/router.class.php b/framework/base/router.class.php index ddcd89acb0..931645b528 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -617,6 +617,20 @@ class baseRouter */ public function setSuperVars() { + $URI = $_SERVER['REQUEST_URI']; + if(strpos($URI, '?') !== false) + { + $parsedURL = parse_url($URI); + if(isset($parsedURL['query'])) + { + parse_str($parsedURL['query'], $parsedQuery); + foreach($parsedQuery as $key => $value) + { + if(!isset($_GET[$key])) $_GET[$key] = $value; + } + } + } + $this->post = new super('post'); $this->get = new super('get'); $this->server = new super('server'); diff --git a/module/custom/model.php b/module/custom/model.php index a8ffc88a32..fbd6131dd4 100644 --- a/module/custom/model.php +++ b/module/custom/model.php @@ -261,6 +261,7 @@ class customModel extends model if($module == 'execution' and $method == 'more') $hasPriv = true; if($module == 'project' and $method == 'other') $hasPriv = true; + if(!$hasPriv and isset($vars)) unset($vars); } if($isTutorialMode || $hasPriv) From 2051f9a3711455f1fdef181850bd18476519aeb6 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 20 May 2022 10:56:23 +0800 Subject: [PATCH 42/92] * code for bug #22577. --- module/common/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/common/model.php b/module/common/model.php index 616bc1d5b4..363835bbd6 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -1524,7 +1524,7 @@ class commonModel extends model